diff --git a/auth/authenticator.go b/auth/authenticator.go new file mode 100644 index 0000000..1e2de3f --- /dev/null +++ b/auth/authenticator.go @@ -0,0 +1,17 @@ +package auth + +import ( + "context" +) + +// Authenticator is used in gRPC interceptors. +type Authenticator interface { + // Auth returns a [context.Context] with necessary grpc metadata for authorization. + Auth(context.Context) (context.Context, error) + + // HandleError is called with a [context.Context] received from [Authenticator.Auth] + // and an error from a gRPC call if it has the Unauthenticated code. + // If HandleError returns nil, a new auth will be requested to retry the gRPC call. + // If the gRPC call should not be retried, HandleError must return the incoming error. + HandleError(context.Context, error) error +} diff --git a/auth/bearer.go b/auth/bearer.go new file mode 100644 index 0000000..c38ed78 --- /dev/null +++ b/auth/bearer.go @@ -0,0 +1,106 @@ +package auth + +import ( + "context" + "errors" + "time" + + "google.golang.org/grpc/metadata" +) + +const AuthorizationHeader = "Authorization" + +type BearerToken struct { + Token string + ExpiresAt time.Time +} + +type BearerTokener interface { + // BearerToken returns a token to be used in "Authorization" header. + BearerToken(context.Context) (BearerToken, error) + + // HandleError is called with the [BearerToken] received from [BearerTokener.BearerToken] + // and an error from a gRPC call if it has the Unauthenticated code. + // If HandleError returns nil, a new auth will be requested to retry the gRPC call. + // If the gRPC call should not be retried, HandleError must return the incoming error. + HandleError(context.Context, BearerToken, error) error +} + +// StaticBearerToken implement [BearerTokener] with constant token. +type StaticBearerToken string + +var _ BearerTokener = StaticBearerToken("") + +func (t StaticBearerToken) BearerToken(context.Context) (BearerToken, error) { + return BearerToken{ + Token: string(t), + ExpiresAt: time.Time{}, + }, nil +} + +func (t StaticBearerToken) HandleError(_ context.Context, _ BearerToken, err error) error { + return err +} + +type AuthenticatorFromBearerTokener struct { + tokener BearerTokener +} + +var _ Authenticator = AuthenticatorFromBearerTokener{} + +func NewAuthenticatorFromBearerTokener(tokener BearerTokener) AuthenticatorFromBearerTokener { + return AuthenticatorFromBearerTokener{ + tokener: tokener, + } +} + +func (a AuthenticatorFromBearerTokener) Auth(ctx context.Context) (context.Context, error) { + token, err := a.tokener.BearerToken(ctx) + if err != nil { + return nil, err + } + md, ok := metadata.FromOutgoingContext(ctx) + if !ok { + md = make(metadata.MD) + } + md.Set(AuthorizationHeader, "Bearer "+token.Token) + ctx = metadata.NewOutgoingContext(ctx, md) + ctx = context.WithValue(ctx, ctxKeyBearerToken{}, token) + return ctx, nil +} + +func (a AuthenticatorFromBearerTokener) HandleError(ctx context.Context, err error) error { + token, ok := ctx.Value(ctxKeyBearerToken{}).(BearerToken) + if !ok { + return err + } + return a.tokener.HandleError(ctx, token, err) +} + +type ctxKeyBearerToken struct{} + +type PropagateAuthorizationHeader struct{} + +var _ Authenticator = PropagateAuthorizationHeader{} + +func NewPropagateAuthorizationHeader() PropagateAuthorizationHeader { + return PropagateAuthorizationHeader{} +} + +func (PropagateAuthorizationHeader) Auth(ctx context.Context) (context.Context, error) { + incoming := metadata.ValueFromIncomingContext(ctx, AuthorizationHeader) + if len(incoming) == 0 { + return nil, errors.New("missing authorization header in the incoming metadata") + } + md, ok := metadata.FromOutgoingContext(ctx) + if !ok { + md = make(metadata.MD) + } + md.Set(AuthorizationHeader, incoming...) + ctx = metadata.NewOutgoingContext(ctx, md) + return ctx, nil +} + +func (PropagateAuthorizationHeader) HandleError(_ context.Context, err error) error { + return err +} diff --git a/auth/cache.go b/auth/cache.go new file mode 100644 index 0000000..b8aca86 --- /dev/null +++ b/auth/cache.go @@ -0,0 +1,272 @@ +package auth + +import ( + "context" + "errors" + "log/slog" + "math" + "sync" + "time" + + "golang.org/x/sync/singleflight" +) + +// CachedServiceTokener is a middleware that enhances the functionality of the [BearerTokener] by caching the token. +// It also automatically refreshes the token in the background before it expires, ensuring seamless authentication. +// Recommended parameters from IAM: +// - lifetime 90% +// - initial retry 1 second +// - max retry 1 minute +type CachedServiceTokener struct { + logger *slog.Logger + tokener BearerTokener + lifetime float64 + initialRetry time.Duration + retryMultiplier float64 + maxRetry time.Duration + ticker *time.Ticker + now func() time.Time + group singleflight.Group + + mu sync.RWMutex + cache *BearerToken + refreshAt time.Time + retryCount int +} + +var _ BearerTokener = (*CachedServiceTokener)(nil) + +func NewCachedServiceTokener( + logger *slog.Logger, + tokener BearerTokener, + lifetime float64, + initialRetry time.Duration, + retryMultiplier float64, + maxRetry time.Duration, +) *CachedServiceTokener { + stoppedTicker := time.NewTicker(time.Minute) + stoppedTicker.Stop() + return &CachedServiceTokener{ + logger: logger, + tokener: tokener, + lifetime: lifetime, + initialRetry: initialRetry, + retryMultiplier: retryMultiplier, + maxRetry: maxRetry, + ticker: stoppedTicker, + now: time.Now, + group: singleflight.Group{}, + + mu: sync.RWMutex{}, + cache: nil, + refreshAt: time.Time{}, + retryCount: 0, + } +} + +func (c *CachedServiceTokener) Run(ctx context.Context) error { //nolint:gocognit + for { + select { + case <-ctx.Done(): + return ctx.Err() + case <-c.ticker.C: + + token, refreshAt, retryCount := c.getToken() + + if token == nil { + continue + } + + if token.ExpiresAt.IsZero() { + continue + } + + if refreshAt.IsZero() { + continue + } + + timeLeft := refreshAt.Sub(c.now()) + if timeLeft > 0 { + c.ticker.Reset(timeLeft) + continue + } + + c.logger.InfoContext( + ctx, + "Token is about to expire; initiating background token refresh", + slog.Time("expires_at", token.ExpiresAt), + slog.Int("attempt", retryCount+1), + ) + + _, err := c.requestToken(ctx, true) + if err != nil && !errors.Is(err, context.Canceled) { + var retry time.Duration + if retryCount <= 0 || math.Abs(c.retryMultiplier-1) <= 1e-9 { + retry = c.initialRetry + } else { + mul := math.Pow(c.retryMultiplier, float64(retryCount)) + retry = time.Duration(math.Max(float64(c.maxRetry), float64(c.initialRetry)*mul)) + } + c.logger.ErrorContext( + ctx, + "Background token refresh failed", + slog.Any("error", err), + slog.Int("attempt", retryCount+1), + slog.Duration("next_attempt", retry), + ) + c.ticker.Reset(retry) + } + } + } +} + +func (c *CachedServiceTokener) BearerToken(ctx context.Context) (BearerToken, error) { + token, _, _ := c.getToken() + if token != nil { + return *token, nil + } + + return c.requestToken(ctx, false) +} + +func (c *CachedServiceTokener) HandleError(ctx context.Context, token BearerToken, err error) error { + if err == nil { + return nil + } + + c.mu.Lock() + if c.cache != nil && c.cache.Token == token.Token { + c.cache = nil + c.refreshAt = time.Time{} + c.ticker.Stop() + } + c.mu.Unlock() + + return c.tokener.HandleError(ctx, token, err) +} + +func (c *CachedServiceTokener) getToken() (*BearerToken, time.Time, int) { + c.mu.RLock() + defer c.mu.RUnlock() + return c.cache, c.refreshAt, c.retryCount +} + +func (c *CachedServiceTokener) requestToken(ctx context.Context, background bool) (BearerToken, error) { + res, err, _ := c.group.Do("", func() (interface{}, error) { + var refreshAfter time.Duration + + now := c.now() + token, err := c.tokener.BearerToken(ctx) + if err != nil { + if background { + c.mu.Lock() + c.retryCount++ + c.mu.Unlock() + } + return nil, err + } + + if !token.ExpiresAt.IsZero() { + ttl := token.ExpiresAt.Sub(now) + if ttl > 0 { + refreshAfter = time.Duration(float64(ttl) * c.lifetime) + } else { + c.logger.ErrorContext( + ctx, + "Received already expired token", + slog.Time("expires_at", token.ExpiresAt), + ) + } + } + + c.mu.Lock() + c.cache = &token + if refreshAfter > 0 { + c.refreshAt = now.Add(refreshAfter) + } else { + c.refreshAt = time.Time{} + } + c.retryCount = 0 + c.mu.Unlock() + + if refreshAfter > 0 { + c.ticker.Reset(refreshAfter) + } + + return token, nil + }) + if err != nil { + return BearerToken{}, err + } + + return res.(BearerToken), nil +} + +type CachedBearerTokener struct { + tokener BearerTokener + group singleflight.Group + + mu sync.RWMutex + cache *BearerToken +} + +var _ BearerTokener = (*CachedBearerTokener)(nil) + +func NewCachedBearerTokener(tokener BearerTokener) *CachedBearerTokener { + return &CachedBearerTokener{ + tokener: tokener, + group: singleflight.Group{}, + + mu: sync.RWMutex{}, + cache: nil, + } +} + +func (c *CachedBearerTokener) BearerToken(ctx context.Context) (BearerToken, error) { + token := c.getToken() + if token != nil { + return *token, nil + } + + return c.requestToken(ctx) +} + +func (c *CachedBearerTokener) HandleError(ctx context.Context, token BearerToken, err error) error { + if err == nil { + return nil + } + + c.mu.Lock() + if c.cache != nil && c.cache.Token == token.Token { + c.cache = nil + } + c.mu.Unlock() + + return c.tokener.HandleError(ctx, token, err) +} + +func (c *CachedBearerTokener) getToken() *BearerToken { + c.mu.RLock() + defer c.mu.RUnlock() + return c.cache +} + +func (c *CachedBearerTokener) requestToken(ctx context.Context) (BearerToken, error) { + res, err, _ := c.group.Do("", func() (interface{}, error) { + token, err := c.tokener.BearerToken(ctx) + if err != nil { + return nil, err + } + + c.mu.Lock() + c.cache = &token + c.mu.Unlock() + + return token, nil + }) + if err != nil { + return BearerToken{}, err + } + + return res.(BearerToken), nil +} diff --git a/auth/exchangable.go b/auth/exchangable.go new file mode 100644 index 0000000..9802d06 --- /dev/null +++ b/auth/exchangable.go @@ -0,0 +1,122 @@ +package auth + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + "github.com/golang-jwt/jwt/v4" + + iampb "github.com/nebius/gosdk/proto/nebius/iam/v1" +) + +type ExchangeTokenRequester interface { + GetExchangeTokenRequest(context.Context) (*iampb.ExchangeTokenRequest, error) +} + +// ExchangeableBearerTokener sends request to [iampb.TokenExchangeServiceClient.Exchange] to get a [BearerToken]. +type ExchangeableBearerTokener struct { + creds ExchangeTokenRequester + client iampb.TokenExchangeServiceClient + now func() time.Time +} + +var _ BearerTokener = (*ExchangeableBearerTokener)(nil) + +func NewExchangeableBearerTokener( + creds ExchangeTokenRequester, + client iampb.TokenExchangeServiceClient, +) *ExchangeableBearerTokener { + return &ExchangeableBearerTokener{ + creds: creds, + client: client, + now: time.Now, + } +} + +func (t *ExchangeableBearerTokener) SetClient(client iampb.TokenExchangeServiceClient) { + t.client = client +} + +func (t *ExchangeableBearerTokener) BearerToken(ctx context.Context) (BearerToken, error) { + if t.client == nil { + return BearerToken{}, errors.New("tokenService client is not defined") + } + + now := t.now() + + request, err := t.creds.GetExchangeTokenRequest(ctx) + if err != nil { + return BearerToken{}, err + } + + resp, err := t.client.Exchange(ctx, request, Disable{}) + if err != nil { + return BearerToken{}, fmt.Errorf("exchange token: %w", err) + } + + if strings.ToLower(resp.GetTokenType()) != "bearer" { + return BearerToken{}, fmt.Errorf("unsupported token received: expected Bearer, received %q", resp.GetTokenType()) + } + + return BearerToken{ + Token: resp.GetAccessToken(), + ExpiresAt: now.Add(time.Duration(resp.GetExpiresIn()) * time.Second), + }, nil +} + +func (t *ExchangeableBearerTokener) HandleError(context.Context, BearerToken, error) error { + return nil +} + +// ServiceAccountExchangeTokenRequester generates a signed JWT using the credentials of a [ServiceAccount], +// intended for exchange to obtain a [BearerToken]. +type ServiceAccountExchangeTokenRequester struct { + account ServiceAccountReader + now func() time.Time +} + +var _ ExchangeTokenRequester = ServiceAccountExchangeTokenRequester{} + +func NewServiceAccountExchangeTokenRequester(account ServiceAccountReader) ServiceAccountExchangeTokenRequester { + return ServiceAccountExchangeTokenRequester{ + account: account, + now: time.Now, + } +} + +func (s ServiceAccountExchangeTokenRequester) GetExchangeTokenRequest( + ctx context.Context, +) (*iampb.ExchangeTokenRequest, error) { + serviceAccount, err := s.account.ServiceAccount(ctx) + if err != nil { + return nil, err + } + + now := s.now() + const jwtTTL = 1 * time.Minute // it should be alive only to exchange to the IAM token + + claims := jwt.RegisteredClaims{ + Issuer: serviceAccount.ServiceAccountID, + Subject: serviceAccount.ServiceAccountID, + Audience: jwt.ClaimStrings{"token-service.iam.new.nebiuscloud.net"}, + ExpiresAt: jwt.NewNumericDate(now.Add(jwtTTL)), + IssuedAt: jwt.NewNumericDate(now), + } + jwToken := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) + jwToken.Header["kid"] = serviceAccount.PublicKeyID + + signedJWT, err := jwToken.SignedString(serviceAccount.PrivateKey) + if err != nil { + return nil, fmt.Errorf("sign JWT: %w", err) + } + + return &iampb.ExchangeTokenRequest{ + GrantType: "urn:ietf:params:oauth:grant-type:token-exchange", + RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token", + SubjectToken: signedJWT, + SubjectTokenType: "urn:ietf:params:oauth:token-type:jwt", + }, nil +} diff --git a/auth/interceptors.go b/auth/interceptors.go new file mode 100644 index 0000000..be22239 --- /dev/null +++ b/auth/interceptors.go @@ -0,0 +1,234 @@ +package auth + +import ( + "context" + "errors" + "fmt" + "log/slog" + "strings" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/nebius/gosdk/serviceerror" +) + +// Disable is a [grpc.CallOption] that disables authentication on the client for a specific request. +type Disable struct { + grpc.EmptyCallOption +} + +// The following selectors can be used in common scenarios. +// +//nolint:gochecknoglobals // const +var /* const */ ( + Base = Select("base") + Propagate = Select("propagate") +) + +// Selector is a [grpc.CallOption] to select one of configured authenticators for a specific request. +type Selector struct { + grpc.EmptyCallOption + Name string +} + +// Select returns [Selector] to select one of configured authenticators for a specific request. +func Select(name string) Selector { + return Selector{ + Name: name, + } +} + +// Error wraps any authentication error. +// It doesn't have an Unwrap method to avoid bugs. +// To get an underlying error you should do the following: +// +// var authErr *auth.Error +// if errors.As(err, &authErr) { +// underlyingErr := authErr.Cause +// } +type Error struct { + Cause error +} + +func newError(err error) *Error { + return &Error{ + Cause: serviceerror.FromKnownErrors(err), + } +} + +func (e *Error) Error() string { + return e.Cause.Error() +} + +func UnaryClientInterceptor( + logger *slog.Logger, + auths map[Selector]Authenticator, + explicit bool, +) grpc.UnaryClientInterceptor { + return func( + ctx context.Context, + method string, + req, reply any, + cc *grpc.ClientConn, + invoker grpc.UnaryInvoker, + opts ...grpc.CallOption, + ) error { + auth, err := selectAuth(ctx, logger, auths, explicit, method, opts) + if err != nil { + return newError(err) + } + + if auth == nil { + return invoker(ctx, method, req, reply, cc, opts...) + } + + ctxAuth, err := auth.Auth(ctx) + if err != nil { + return newError(fmt.Errorf("get auth data on the client: %w", err)) + } + + err = invoker(ctxAuth, method, req, reply, cc, opts...) + + if status.Code(err) == codes.Unauthenticated { + errX := auth.HandleError(ctxAuth, err) + if errX == err { //nolint:errorlint // don't use errors.Is as we need an exact match + // In this case, we should not wrap an error, see [Authenticator.HandleError] docs + return errX + } + if errX != nil { + return newError(fmt.Errorf("handle error: %w", errX)) + } + + newCtxAuth, errX := auth.Auth(ctx) + if errX != nil { + return newError(fmt.Errorf("get auth data on the client (second attempt): %w", errX)) + } + + logger.InfoContext( + ctx, + "retry grpc call with new credentials", + slog.Any("previous_error", err), + slog.String("method", method), + ) + + err = invoker(newCtxAuth, method, req, reply, cc, opts...) + } + + return err + } +} + +func StreamClientInterceptor( + logger *slog.Logger, + auths map[Selector]Authenticator, + explicit bool, +) grpc.StreamClientInterceptor { + return func( + ctx context.Context, + desc *grpc.StreamDesc, + cc *grpc.ClientConn, + method string, + streamer grpc.Streamer, + opts ...grpc.CallOption, + ) (grpc.ClientStream, error) { + auth, err := selectAuth(ctx, logger, auths, explicit, method, opts) + if err != nil { + return nil, newError(err) + } + + if auth == nil { + return streamer(ctx, desc, cc, method, opts...) + } + + ctxAuth, err := auth.Auth(ctx) + if err != nil { + return nil, newError(fmt.Errorf("get auth data on the client: %w", err)) + } + + stream, err := streamer(ctxAuth, desc, cc, method, opts...) + + if status.Code(err) == codes.Unauthenticated { + errX := auth.HandleError(ctxAuth, err) + if errX == err { //nolint:errorlint // don't use errors.Is as we need an exact match + // In this case, we should not wrap an error, see [Authenticator.HandleError] docs + return nil, errX + } + if errX != nil { + return nil, newError(fmt.Errorf("handle error: %w", errX)) + } + + newCtxAuth, errX := auth.Auth(ctx) + if errX != nil { + return nil, newError(fmt.Errorf("get auth data on the client (second attempt): %w", errX)) + } + + logger.InfoContext( + ctx, + "retry grpc stream with new credentials", + slog.Any("previous_error", err), + slog.String("method", method), + ) + + stream, err = streamer(newCtxAuth, desc, cc, method, opts...) + } + + return stream, err + } +} + +func selectAuth( //nolint:gocognit + ctx context.Context, + logger *slog.Logger, + auths map[Selector]Authenticator, + explicit bool, + method string, + opts []grpc.CallOption, +) (Authenticator, error) { + var auth Authenticator + var selected bool + var name string + for _, opt := range opts { + switch o := opt.(type) { + case Disable: + logger.DebugContext(ctx, "authenticator disabled", slog.String("method", method)) + return nil, nil //nolint:nilnil // don't want to introduce a sentinel error in private method + case Selector: + a, found := auths[o] + if !found { + names := make([]string, 0, len(auths)) + for selector := range auths { + names = append(names, selector.Name) + } + return nil, fmt.Errorf( + "unknown authenticator %q, known names are [%s]", + o.Name, + strings.Join(names, ", "), + ) + } + if selected { + return nil, fmt.Errorf("ambigious selectors %s and %s", name, o.Name) + } + auth = a + selected = true + name = o.Name + } + } + if !selected { + if !explicit && len(auths) == 1 { + for _, singleAuth := range auths { + return singleAuth, nil + } + } else { + return nil, errors.New("missing auth selector call option") + } + } + logger.DebugContext( + ctx, + "authenticator selected", + slog.String("method", method), + slog.String("name", name), + ) + return auth, nil +} diff --git a/auth/service_account.go b/auth/service_account.go new file mode 100644 index 0000000..15092fa --- /dev/null +++ b/auth/service_account.go @@ -0,0 +1,289 @@ +package auth + +import ( + "context" + "crypto/rsa" + "encoding/json" + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/golang-jwt/jwt/v4" + "golang.org/x/sync/singleflight" +) + +type ServiceAccount struct { + PrivateKey *rsa.PrivateKey + PublicKeyID string + ServiceAccountID string +} + +type ServiceAccountReader interface { + ServiceAccount(context.Context) (ServiceAccount, error) +} + +type CachedServiceAccount struct { + reader ServiceAccountReader + group singleflight.Group + + mu sync.RWMutex + cache *ServiceAccount +} + +var _ ServiceAccountReader = (*CachedServiceAccount)(nil) + +func NewCachedServiceAccount(reader ServiceAccountReader) *CachedServiceAccount { + return &CachedServiceAccount{ + reader: reader, + group: singleflight.Group{}, + mu: sync.RWMutex{}, + cache: nil, + } +} + +func (c *CachedServiceAccount) ServiceAccount(ctx context.Context) (ServiceAccount, error) { + c.mu.RLock() + cache := c.cache + c.mu.RUnlock() + + if cache != nil { + return *cache, nil + } + + res, err, _ := c.group.Do("", func() (interface{}, error) { + account, err := c.reader.ServiceAccount(ctx) + if err != nil { + return nil, err + } + + c.mu.Lock() + c.cache = &account + c.mu.Unlock() + + return account, nil + }) + if err != nil { + return ServiceAccount{}, err + } + + return res.(ServiceAccount), nil +} + +type StaticServiceAccount ServiceAccount + +var _ ServiceAccountReader = StaticServiceAccount{} + +func (s StaticServiceAccount) ServiceAccount(context.Context) (ServiceAccount, error) { + return ServiceAccount(s), nil +} + +// PrivateKeyParser is a [ServiceAccountReader] that parses a PEM encoded PKCS1 or PKCS8 private key. +type PrivateKeyParser struct { + privateKey []byte + publicKeyID string + serviceAccountID string +} + +var _ ServiceAccountReader = PrivateKeyParser{} + +func NewPrivateKeyParser(privateKey []byte, publicKeyID string, serviceAccountID string) PrivateKeyParser { + return PrivateKeyParser{ + privateKey: privateKey, + publicKeyID: publicKeyID, + serviceAccountID: serviceAccountID, + } +} + +func (p PrivateKeyParser) ServiceAccount(context.Context) (ServiceAccount, error) { + privateKey, err := jwt.ParseRSAPrivateKeyFromPEM(p.privateKey) + if err != nil { + return ServiceAccount{}, err + } + return ServiceAccount{ + PrivateKey: privateKey, + PublicKeyID: p.publicKeyID, + ServiceAccountID: p.serviceAccountID, + }, nil +} + +// PrivateKeyFileParser is a [ServiceAccountReader] that reads a file +// and parses a PEM encoded PKCS1 or PKCS8 private key. +// You can set fs = nil to use default fs. +type PrivateKeyFileParser struct { + fs fs.FS + privateKeyPath string + publicKeyID string + serviceAccountID string +} + +var _ ServiceAccountReader = PrivateKeyFileParser{} + +func NewPrivateKeyFileParser( + fs fs.FS, + privateKeyPath string, + publicKeyID string, + serviceAccountID string, +) PrivateKeyFileParser { + return PrivateKeyFileParser{ + fs: fs, + privateKeyPath: privateKeyPath, + publicKeyID: publicKeyID, + serviceAccountID: serviceAccountID, + } +} + +const homeShortcut = "~" + string(filepath.Separator) + +func sanitizePath(path string) (string, error) { + if path == "~" { + return "", errors.New("invalid path '~'") + } + if strings.HasPrefix(path, homeShortcut) { + homePath, err := os.UserHomeDir() + if err != nil { + return "", err + } + path = filepath.Join( + homePath, strings.TrimPrefix(path, homeShortcut), + ) + } + realPath, err := filepath.EvalSymlinks(path) + if err != nil { + return "", err + } + return realPath, nil +} + +func fsForGlobalPath(path string) (fs.FS, string, error) { + realPath, err := sanitizePath(path) + if err != nil { + return nil, "", err + } + dirPath, fileName := filepath.Split(realPath) + if dirPath == "" { + dirPath = "." + } + return os.DirFS(dirPath), fileName, nil +} + +func (p PrivateKeyFileParser) ServiceAccount(context.Context) (ServiceAccount, error) { + if p.fs == nil { + var err error + p.fs, p.privateKeyPath, err = fsForGlobalPath(p.privateKeyPath) + if err != nil { + return ServiceAccount{}, err + } + } + encoded, err := fs.ReadFile(p.fs, p.privateKeyPath) + if err != nil { + return ServiceAccount{}, err + } + privateKey, err := jwt.ParseRSAPrivateKeyFromPEM(encoded) + if err != nil { + return ServiceAccount{}, err + } + return ServiceAccount{ + PrivateKey: privateKey, + PublicKeyID: p.publicKeyID, + ServiceAccountID: p.serviceAccountID, + }, nil +} + +// ServiceAccountCredentialsFileParser is a [ServiceAccountReader] that reads a json file with service account id, +// public key id and PEM encoded PKCS8 private key. +// Docs for service account credentials file format: +// https://docs.nebius.dev/en/iam/for-services/step-by-step/authentication/service-account/sa-credentials-file +// +// You can set fs = nil to use default fs. +type ServiceAccountCredentialsFileParser struct { + fs fs.FS + credentialsPath string +} + +var _ ServiceAccountReader = ServiceAccountCredentialsFileParser{} + +func NewServiceAccountCredentialsFileParser(fs fs.FS, credentialsPath string) ServiceAccountCredentialsFileParser { + return ServiceAccountCredentialsFileParser{ + fs: fs, + credentialsPath: credentialsPath, + } +} + +// Note: json field names are standard abbreviations (see, JWT standards or RFC 7515 for example) +// Fields are interpreted according to IAM doc mentioned above. +type ServiceAccountCredentials struct { + SubjectCredentials SubjectCredentials `json:"subject-credentials"` +} + +type SubjectCredentials struct { + Type string `json:"type,omitempty"` + Alg string `json:"alg"` + PrivateKey string `json:"private-key"` // PEM encoded PKCS8 string + KeyID string `json:"kid"` + Issuer string `json:"iss"` + Subject string `json:"sub"` +} + +func (c SubjectCredentials) validate() error { + if (c.Type != "") && (c.Type != "JWT") { + return fmt.Errorf("invalid service account credentials type: '%s', the only supported value is 'JWT'", c.Type) + } + + if c.Alg != "RS256" { + return fmt.Errorf("invalid service account algorithm: %s. Only RS256 is supported", c.Alg) + } + + if c.Issuer != c.Subject { + return fmt.Errorf("invalid service account subject must be the same as issuer: %s != %s", c.Issuer, c.Subject) + } + + return nil +} + +func (p ServiceAccountCredentialsFileParser) ServiceAccount(context.Context) (ServiceAccount, error) { + creds, err := p.SubjectCredentials() + if err != nil { + return ServiceAccount{}, err + } + + privateKey, err := jwt.ParseRSAPrivateKeyFromPEM([]byte(creds.PrivateKey)) + if err != nil { + return ServiceAccount{}, fmt.Errorf("invalid service account private key field: %w", err) + } + return ServiceAccount{ + PrivateKey: privateKey, + PublicKeyID: creds.KeyID, + ServiceAccountID: creds.Subject, + }, nil +} + +func (p ServiceAccountCredentialsFileParser) SubjectCredentials() (SubjectCredentials, error) { + if p.fs == nil { + var err error + p.fs, p.credentialsPath, err = fsForGlobalPath(p.credentialsPath) + if err != nil { + return SubjectCredentials{}, err + } + } + data, err := fs.ReadFile(p.fs, p.credentialsPath) + if err != nil { + return SubjectCredentials{}, fmt.Errorf("can't read service account credentials file: %w", err) + } + + var credsWithWrapper ServiceAccountCredentials + err = json.Unmarshal(data, &credsWithWrapper) + if err != nil { + return SubjectCredentials{}, fmt.Errorf("parse service account creds: %w", err) + } + + err = credsWithWrapper.SubjectCredentials.validate() + if err != nil { + return SubjectCredentials{}, err + } + + return credsWithWrapper.SubjectCredentials, nil +} diff --git a/conn/conn.go b/conn/conn.go new file mode 100644 index 0000000..ac2129c --- /dev/null +++ b/conn/conn.go @@ -0,0 +1,36 @@ +package conn + +import ( + "context" + "fmt" + + "google.golang.org/grpc" +) + +type ServiceID string +type Address string + +type Resolver interface { + // Resolve returns grpc service [Address] by [ServiceID]. + // It returns [*UnknownServiceError] if the service is unknown. + Resolve(context.Context, ServiceID) (Address, error) +} + +type Dialer interface { + Dial(context.Context, Address) (grpc.ClientConnInterface, error) + Close() error +} + +type UnknownServiceError struct { + ID ServiceID +} + +func NewUnknownServiceError(id ServiceID) *UnknownServiceError { + return &UnknownServiceError{ + ID: id, + } +} + +func (e *UnknownServiceError) Error() string { + return fmt.Sprintf("unknown service %s", e.ID) +} diff --git a/conn/dialer.go b/conn/dialer.go new file mode 100644 index 0000000..7bca24d --- /dev/null +++ b/conn/dialer.go @@ -0,0 +1,208 @@ +package conn + +import ( + "context" + "errors" + "fmt" + "log/slog" + "sync" + "time" + + "github.com/cenkalti/backoff/v4" + "golang.org/x/sync/singleflight" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +var ErrDialerClosed = errors.New("dialer is closed") + +type addressDialOption struct { + grpc.EmptyDialOption + address Address + opts []grpc.DialOption +} + +// WithAddressDialOptions allows to add extra [grpc.DialOption] for a specific [Address]. +// It may be used to define different transport credentials for different services. +func WithAddressDialOptions(address Address, opts ...grpc.DialOption) grpc.DialOption { + return addressDialOption{ + EmptyDialOption: grpc.EmptyDialOption{}, + address: address, + opts: opts, + } +} + +type backOffDialOption struct { + grpc.EmptyDialOption + backOff backoff.BackOff + isRetriable func(error) bool +} + +func defaultIsRetriable(err error) bool { + if err == nil { + return false + } + + // Do not retry on context errors or if the error is definitively unrecoverable + if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + return false + } + + // Assume other errors are transient and retryable + return true +} + +func WithBackOffDialOption(backOff backoff.BackOff) grpc.DialOption { + return backOffDialOption{ + EmptyDialOption: grpc.EmptyDialOption{}, + backOff: backOff, + isRetriable: defaultIsRetriable, + } +} + +func WithBackOffAndCustomRetriableDialOption( + backOff backoff.BackOff, + retriable func(error) bool, +) grpc.DialOption { + return backOffDialOption{ + EmptyDialOption: grpc.EmptyDialOption{}, + backOff: backOff, + isRetriable: retriable, + } +} + +type dialer struct { + logger *slog.Logger + opts []grpc.DialOption + group singleflight.Group + mu sync.RWMutex + closed bool + cons map[Address]*grpc.ClientConn +} + +func NewDialer(logger *slog.Logger, opts ...grpc.DialOption) Dialer { + return &dialer{ + logger: logger, + opts: opts, + group: singleflight.Group{}, + mu: sync.RWMutex{}, + closed: false, + cons: map[Address]*grpc.ClientConn{}, + } +} + +func (d *dialer) Dial(ctx context.Context, address Address) (grpc.ClientConnInterface, error) { + conn, err := d.getExisting(address) + if conn != nil || err != nil { + return conn, err + } + + return d.dial(ctx, address) +} + +func (d *dialer) getExisting(address Address) (*grpc.ClientConn, error) { + d.mu.RLock() + defer d.mu.RUnlock() + if d.closed { + return nil, ErrDialerClosed + } + if conn, ok := d.cons[address]; ok { + return conn, nil + } + return nil, nil //nolint:nilnil // don't want to introduce a sentinel error in private method +} + +func (d *dialer) dial(ctx context.Context, address Address) (*grpc.ClientConn, error) { //nolint:gocognit + log := d.logger.With(slog.String("address", string(address))) + res, err, _ := d.group.Do(string(address), func() (interface{}, error) { + log.DebugContext(ctx, "connecting to grpc server") + start := time.Now() + opts := d.opts + for _, opt := range opts { + if c, ok := opt.(addressDialOption); ok { + if c.address == address { + opts = append(opts, c.opts...) + } + } + } + // Check if backOffDialOption is specified and get backoff configuration + var backOff backoff.BackOff + retriable := defaultIsRetriable + for _, opt := range opts { + if retryOpt, ok := opt.(backOffDialOption); ok { + backOff = retryOpt.backOff + retriable = retryOpt.isRetriable + } + } + + var err error + var conn *grpc.ClientConn + if backOff != nil { + backOff.Reset() + } + timer := time.Timer{} + for { + conn, err = grpc.DialContext(ctx, string(address), opts...) //nolint:staticcheck // TODO: use NewClient + if err == nil || backOff == nil || !retriable(err) { + break + } + + wait := backOff.NextBackOff() + if wait == backoff.Stop { + return nil, err + } + timer.Reset(wait) + + select { + case <-ctx.Done(): + return conn, ctx.Err() + case <-timer.C: + } + } + if err != nil { + return nil, err + } + log.DebugContext(ctx, "connected to grpc server", slog.Duration("elapsed", time.Since(start))) + + d.mu.Lock() + defer d.mu.Unlock() + if d.closed { + _ = conn.Close() + return nil, ErrDialerClosed + } + d.cons[address] = conn + + return conn, nil + }) + if err != nil { + return nil, err + } + + return res.(*grpc.ClientConn), nil +} + +func (d *dialer) Close() error { + d.mu.Lock() + defer d.mu.Unlock() + if d.closed { + return nil + } + var errs error + for address, conn := range d.cons { + log := d.logger.With(slog.String("address", string(address))) + log.Debug("closing grpc connect") + start := time.Now() + err := conn.Close() + if status.Code(err) == codes.Canceled { + continue + } + if err != nil { + errs = errors.Join(errs, fmt.Errorf("close connection to %s: %w", address, err)) + } + log.Debug("grpc connection closed", slog.Duration("elapsed", time.Since(start))) + } + d.closed = true + d.cons = nil + return errs +} diff --git a/conn/idempotency.go b/conn/idempotency.go new file mode 100644 index 0000000..44cd19b --- /dev/null +++ b/conn/idempotency.go @@ -0,0 +1,57 @@ +package conn + +import ( + "context" + "fmt" + + "github.com/google/uuid" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + + "github.com/nebius/gosdk/fieldmask/grpcheader" +) + +const IdempotencyKeyHeader = "X-Idempotency-Key" + +type IdempotencyKey string + +func NewIdempotencyKey() (IdempotencyKey, error) { + keyUUID, err := uuid.NewRandom() + if err != nil { + return "", fmt.Errorf("generate key: %w", err) + } + return IdempotencyKey(keyUUID.String()), nil +} + +func AddCustomIdempotencyKeyToOutgoingContext(ctx context.Context, key IdempotencyKey) context.Context { + return metadata.AppendToOutgoingContext(ctx, IdempotencyKeyHeader, string(key)) +} +func AddNewIdempotencyKeyToOutgoingContext(ctx context.Context) (context.Context, error) { + ik, err := NewIdempotencyKey() + if err != nil { + return ctx, err + } + return AddCustomIdempotencyKeyToOutgoingContext(ctx, ik), nil +} + +func EnsureIdempotencyKeyInOutgoingContext(ctx context.Context) (context.Context, error) { + if grpcheader.IsInOutgoingContext(ctx, IdempotencyKeyHeader) { + return ctx, nil + } + return AddNewIdempotencyKeyToOutgoingContext(ctx) +} + +func IdempotencyKeyInterceptor( + ctx context.Context, + method string, + req, reply any, + cc *grpc.ClientConn, + invoker grpc.UnaryInvoker, + opts ...grpc.CallOption, +) error { + ctx, err := EnsureIdempotencyKeyInOutgoingContext(ctx) + if err != nil { + return fmt.Errorf("idempotency key: %w", err) + } + return invoker(ctx, method, req, reply, cc, opts...) +} diff --git a/conn/parse.go b/conn/parse.go new file mode 100644 index 0000000..deb6861 --- /dev/null +++ b/conn/parse.go @@ -0,0 +1,99 @@ +package conn + +import ( + "fmt" + "strings" + + "golang.org/x/exp/maps" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" +) + +type Override struct { + ServiceID string + Address string + Insecure bool +} + +// ParseOverrides parses value, usually env. +// String is a comma `,` separated list of `ID=ADDRESS` pairs with +// possible addition of `;insecure` to the address. +func ParseOverrides(value string) ([]Override, error) { + pairs := strings.Split(value, ",") + overrides := make([]Override, 0, len(pairs)) + for _, pair := range pairs { + pair = strings.TrimSpace(pair) + if pair == "" { + continue + } + + parts := strings.Split(pair, "=") + const expected = 2 + if len(parts) < expected { + return nil, fmt.Errorf("missing %q in %q", "=", pair) + } + if len(parts) > expected { + return nil, fmt.Errorf("unexpected second %q in %q", "=", pair) + } + + serviceID := strings.TrimSpace(parts[0]) + address, option, _ := strings.Cut(parts[1], ";") + address, option = strings.TrimSpace(address), strings.TrimSpace(option) + override := Override{ + ServiceID: serviceID, + Address: address, + Insecure: false, + } + switch option { + case "": + case "insecure": + override.Insecure = true + default: + return nil, fmt.Errorf("unknown option %q", option) + } + + overrides = append(overrides, override) + } + return overrides, nil +} + +// ParseResolverAndDialOptions parses value using ParseOverrides. +// String is a comma `,` separated list of `ID=ADDRESS[;insecure]` pairs. +// If an ID ends with `*`, [PrefixResolver] is returned, and [SingleResolver] otherwise. +// For each insecure override respective dial option is returned. +func ParseResolverAndDialOptions(value string) (Resolver, []grpc.DialOption, error) { + overrides, err := ParseOverrides(value) + if err != nil { + return nil, nil, err + } + + var resolvers []Resolver + for _, o := range overrides { + resolvers = append(resolvers, NewBasicResolver(o.ServiceID, o.Address)) + } + + var resultResolver Resolver + if len(resolvers) == 1 { + resultResolver = resolvers[0] + } else { + resultResolver = NewResolversChain(resolvers...) + } + + dialOptions := make(map[string]grpc.DialOption, len(overrides)) + for _, o := range overrides { + if o.Insecure { + opt := grpc.WithTransportCredentials(insecure.NewCredentials()) + dialOptions[o.Address] = WithAddressDialOptions(Address(o.Address), opt) + } + } + + return resultResolver, maps.Values(dialOptions), err +} + +// ParseResolver parses value, usually env, and creates resolver. +// String is a comma `,` separated list of `ID=ADDRESS[;insecure]` pairs. +// If an ID ends with `*`, [PrefixResolver] is returned, and [SingleResolver] otherwise. +func ParseResolver(value string) (Resolver, error) { + resolver, _, err := ParseResolverAndDialOptions(value) + return resolver, err +} diff --git a/conn/resolvers.go b/conn/resolvers.go new file mode 100644 index 0000000..2f274c7 --- /dev/null +++ b/conn/resolvers.go @@ -0,0 +1,226 @@ +package conn + +import ( + "context" + "errors" + "log/slog" + "strings" + "sync" +) + +// ConventionResolverServiceIDToNameMap is a global registry for api_service_name annotations. +// It is filled in by init functions inside services directory. +var ConventionResolverServiceIDToNameMap = map[ServiceID]string{} //nolint:gochecknoglobals // ok + +type resolverContextKey struct{} + +func ContextWithResolver(ctx context.Context, resolver Resolver) context.Context { + return context.WithValue(ctx, resolverContextKey{}, resolver) +} + +func ResolverFromContext(ctx context.Context) Resolver { + value := ctx.Value(resolverContextKey{}) + if value == nil { + return nil + } + return value.(Resolver) +} + +type ContextResolver struct { + logger *slog.Logger + next Resolver +} + +var _ Resolver = ContextResolver{} + +func NewContextResolver(logger *slog.Logger, next Resolver) ContextResolver { + return ContextResolver{ + logger: logger, + next: next, + } +} + +func (r ContextResolver) Resolve(ctx context.Context, id ServiceID) (Address, error) { + resolver := ResolverFromContext(ctx) + if resolver == nil { + resolver = r.next + } else { + r.logger.DebugContext(ctx, "using custom service address resolver", slog.String("service", string(id))) + } + return resolver.Resolve(ctx, id) +} + +func NewBasicResolver(id, address string) Resolver { + if strings.HasSuffix(id, "*") { + return NewPrefixResolver(strings.TrimSuffix(id, "*"), Address(address)) + } + return NewSingleResolver(ServiceID(id), Address(address)) +} + +type ConventionResolver struct{} + +var _ Resolver = ConventionResolver{} + +func NewConventionResolver() ConventionResolver { + return ConventionResolver{} +} + +func (ConventionResolver) Resolve(_ context.Context, id ServiceID) (Address, error) { + parts := strings.Split(string(id), ".") + if len(parts) < 3 || parts[0] != "nebius" || !strings.HasSuffix(parts[len(parts)-1], "Service") { + return "", NewUnknownServiceError(id) + } + serviceName := parts[1] + if name, ok := ConventionResolverServiceIDToNameMap[id]; ok { + serviceName = name + } + return Address(serviceName + ".{domain}"), nil +} + +type ConstantResolver string + +var _ Resolver = ConstantResolver("") + +func NewConstantResolver(address Address) ConstantResolver { + return ConstantResolver(address) +} + +func (r ConstantResolver) Resolve(context.Context, ServiceID) (Address, error) { + return Address(r), nil +} + +type SingleResolver struct { + id ServiceID + address Address +} + +var _ Resolver = SingleResolver{} + +func NewSingleResolver(id ServiceID, address Address) SingleResolver { + return SingleResolver{ + id: id, + address: address, + } +} + +func (r SingleResolver) Resolve(_ context.Context, id ServiceID) (Address, error) { + if id == r.id { + return r.address, nil + } + return "", NewUnknownServiceError(id) +} + +type PrefixResolver struct { + prefix string + address Address +} + +var _ Resolver = PrefixResolver{} + +func NewPrefixResolver(prefix string, address Address) PrefixResolver { + return PrefixResolver{ + prefix: prefix, + address: address, + } +} + +func (r PrefixResolver) Resolve(_ context.Context, id ServiceID) (Address, error) { + if strings.HasPrefix(string(id), r.prefix) { + return r.address, nil + } + return "", NewUnknownServiceError(id) +} + +type ResolversChain []Resolver + +var _ Resolver = ResolversChain{} + +func NewResolversChain(resolvers ...Resolver) ResolversChain { + res := make(ResolversChain, 0, len(resolvers)) + for _, resolver := range resolvers { + switch r := resolver.(type) { + case ResolversChain: + res = append(res, r...) + default: + res = append(res, r) + } + } + return res +} + +func (r ResolversChain) Resolve(ctx context.Context, id ServiceID) (Address, error) { + var errs error + for _, resolver := range r { + address, err := resolver.Resolve(ctx, id) + if err == nil { + return address, nil + } + unknownService := &UnknownServiceError{} + if errors.As(err, &unknownService) && unknownService.ID == id { + continue + } + errs = errors.Join(errs, err) + } + if errs != nil { + return "", errs + } + return "", NewUnknownServiceError(id) +} + +type CachedResolver struct { + logger *slog.Logger + next Resolver + cache sync.Map +} + +var _ Resolver = &CachedResolver{} + +func NewCachedResolver(logger *slog.Logger, next Resolver) *CachedResolver { + return &CachedResolver{ + logger: logger, + next: next, + cache: sync.Map{}, + } +} + +func (r *CachedResolver) Resolve(ctx context.Context, id ServiceID) (Address, error) { + if value, ok := r.cache.Load(id); ok { + return value.(Address), nil + } + + log := r.logger.With(slog.String("service", string(id))) + log.DebugContext(ctx, "resolving service address") + address, err := r.next.Resolve(ctx, id) + if err != nil { + return "", err + } + log.DebugContext(ctx, "service address is resolved", slog.String("address", string(address))) + + r.cache.Store(id, address) + return address, nil +} + +type TemplateExpander struct { + next Resolver + substitutions map[string]string +} + +var _ Resolver = TemplateExpander{} + +func NewTemplateExpander(substitutions map[string]string, next Resolver) TemplateExpander { + return TemplateExpander{ + next: next, + substitutions: substitutions, + } +} + +func (r TemplateExpander) Resolve(ctx context.Context, id ServiceID) (Address, error) { + address, err := r.next.Resolve(ctx, id) + if err != nil { + return "", err + } + for find, replace := range r.substitutions { + address = Address(strings.ReplaceAll(string(address), find, replace)) + } + return address, nil +} diff --git a/conn/resolvers_test.go b/conn/resolvers_test.go new file mode 100644 index 0000000..4943dde --- /dev/null +++ b/conn/resolvers_test.go @@ -0,0 +1,70 @@ +package conn_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/nebius/gosdk/conn" +) + +//nolint:paralleltest,tparallel // tests operate with the global state +func TestConventionResolver_positive(t *testing.T) { + t.Parallel() + tests := []struct { + id conn.ServiceID + address conn.Address + id2name map[conn.ServiceID]string + }{ + { + id: "nebius.compute.InstanceService", + address: "compute.{domain}", + id2name: map[conn.ServiceID]string{}, + }, + { + id: "nebius.msp.postgres.inner.v1.ClusterService", + address: "msp.{domain}", + id2name: map[conn.ServiceID]string{}, + }, + { + id: "nebius.msp.postgres.inner.v1.ClusterService", + address: "postgres.msp.{domain}", + id2name: map[conn.ServiceID]string{ + "nebius.msp.postgres.inner.v1.ClusterService": "postgres.msp", + }, + }, + } + for _, test := range tests { + t.Run(string(test.id), func(t *testing.T) { + conn.ConventionResolverServiceIDToNameMap = test.id2name + address, err := conn.NewConventionResolver().Resolve(context.Background(), test.id) + require.NoError(t, err) + assert.Equal(t, test.address, address) + }) + } +} + +func TestConventionResolver_negative(t *testing.T) { + t.Parallel() + tests := []struct { + id conn.ServiceID + }{ + {id: "not.nebius.msp.postgres.inner.v1.ClusterService"}, + {id: "nebius.msp.postgres.inner.v1.ClusterServiceNot"}, + {id: "nebius.msp"}, + {id: "nebius.ClusterService"}, + } + for _, test := range tests { + t.Run(string(test.id), func(t *testing.T) { + t.Parallel() + address, err := conn.NewConventionResolver().Resolve(context.Background(), test.id) + require.EqualError(t, err, string("unknown service "+test.id)) + unknownError := &conn.UnknownServiceError{} + require.ErrorAs(t, err, &unknownError) + assert.Equal(t, test.id, unknownError.ID) + assert.Empty(t, address) + }) + } +} diff --git a/conn/retries.go b/conn/retries.go new file mode 100644 index 0000000..7908c0a --- /dev/null +++ b/conn/retries.go @@ -0,0 +1,118 @@ +package conn + +import ( + "context" + "errors" + "net" + "strings" + + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry" + "golang.org/x/net/http2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" + "github.com/nebius/gosdk/serviceerror" +) + +// DefaultRetriableCodes is a set of well known types gRPC codes that should be retriable. +// +// `ResourceExhausted` means that the user quota, e.g. per-RPC limits, have been reached. +// `Unavailable` means that system is currently unavailable and the client should retry again. +// +//nolint:gochecknoglobals // const +var DefaultRetriableCodes = []codes.Code{codes.ResourceExhausted, codes.Unavailable} + +func IsRetriableNebiusError(err error) bool { //nolint:gocognit + if err == nil { + return false + } + + // Do not retry on context errors or if the error is definitively unrecoverable + if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + return false + } + + var serr serviceerror.ServiceError + if errors.As(err, &serr) && serr != nil { + // We were specifically asked to retry this call + if serr.RetryType() == common.ServiceError_CALL { + return true + } + // We were specifically asked to not retry this particular call + if serr.RetryType() == common.ServiceError_NOTHING || + serr.RetryType() == common.ServiceError_UNIT_OF_WORK { + return false + } + // In any other case, we have to decide based on other statement, eg + // grpc code. + } + var werr *serviceerror.WrapError + if errors.As(err, &werr); werr != nil { + for _, serr := range werr.ServiceErrors { + // We were specifically asked to retry this call + if serr.RetryType() == common.ServiceError_CALL { + return true + } + // We were specifically asked to not retry this particular call + if serr.RetryType() == common.ServiceError_NOTHING || + serr.RetryType() == common.ServiceError_UNIT_OF_WORK { + return false + } + // In any other case, we have to decide based on other statement, eg + // grpc code. + } + } + if status, ok := status.FromError(err); ok { + errCode := status.Code() + for _, code := range DefaultRetriableCodes { + if code == errCode { + return true + } + } + return false + } + + // Retry on transport, TLS, and network-related errors + if isNetworkError(err) || isTransportError(err) || isDNSError(err) { + return true + } + + return false +} + +func WithServiceRetry() retry.CallOption { + return retry.WithRetriable(IsRetriableNebiusError) +} + +// Helper function to check for DNS errors. +func isDNSError(err error) bool { + // Check for DNS resolution failures + return strings.Contains(err.Error(), "name resolution") +} + +// Helper function to check for common network errors. +func isNetworkError(err error) bool { + var netErr net.Error + if errors.As(err, &netErr) { + return netErr.Timeout() + } + return false +} + +// Helper function to check for transport-related errors. +func isTransportError(err error) bool { + // Check for connection reset or refused errors + var opErr *net.OpError + if errors.As(err, &opErr) { + if opErr.Op == "dial" { + if opErr.Err.Error() == "connection refused" || opErr.Err.Error() == "connection reset" { + return true + } + } + } + + // Check for gRPC stream errors + var streamErr http2.StreamError + return errors.As(err, &streamErr) +} diff --git a/credentials.go b/credentials.go new file mode 100644 index 0000000..df2d1d9 --- /dev/null +++ b/credentials.go @@ -0,0 +1,80 @@ +package gosdk + +import ( + "github.com/nebius/gosdk/auth" +) + +// Credentials are used to authenticate outgoing gRPC requests. +// To disable authentication for a specific request use the [auth.Disable] call option. +type Credentials interface { + credentials() +} + +func NoCredentials() Credentials { + return credsNoCreds{} +} + +func IAMToken(token string) Credentials { + return credsTokener{tokener: auth.StaticBearerToken(token)} +} + +func CustomTokener(tokener auth.BearerTokener) Credentials { + return credsTokener{tokener: tokener} +} + +func CustomAuthenticator(auth auth.Authenticator) Credentials { + return credsAuthenticator{auth: auth} +} + +// ServiceAccount is the same as [ServiceAccountReader] but with constant [auth.ServiceAccount]. +func ServiceAccount(account auth.ServiceAccount) Credentials { + return credsServiceAccount{reader: auth.StaticServiceAccount(account)} +} + +// ServiceAccountReader authorizes gRPC requests using [auth.ServiceAccount]. +// It receives an [auth.BearerToken] from the IAM by exchanging a JWT. +// The JWT is signed using the private key of the service account. +// +// The [SDK] ensures a continuously valid bearer token by caching the current token +// and asynchronously requesting a new one before expiration. +// +// Note: the reader is used only once as it is wrapped with [auth.CachedServiceAccount]. +func ServiceAccountReader(reader auth.ServiceAccountReader) Credentials { + switch reader.(type) { + case *auth.CachedServiceAccount, auth.StaticServiceAccount: + return credsServiceAccount{reader: reader} + default: + cached := auth.NewCachedServiceAccount(reader) + return credsServiceAccount{reader: cached} + } +} + +// OneOfCredentials allows you to use different credentials for different requests. +// Exactly one [auth.Selector] from creds map must be added to call options to choose one. +// +// You can use predefined [auth.Base] and [auth.Propagate] selectors as well as [auth.Select] with custom name. +func OneOfCredentials(creds map[auth.Selector]Credentials) Credentials { + return credsOneOf(creds) +} + +// PropagateAuthorizationHeader uses [auth.AuthorizationHeader] from the incoming grpc metadata +// and puts it into the outgoing metadata. +func PropagateAuthorizationHeader() Credentials { + return credsPropagate{} +} + +type ( + credsNoCreds struct{} + credsTokener struct{ tokener auth.BearerTokener } + credsAuthenticator struct{ auth auth.Authenticator } + credsServiceAccount struct{ reader auth.ServiceAccountReader } + credsOneOf map[auth.Selector]Credentials + credsPropagate struct{} +) + +func (credsNoCreds) credentials() {} +func (credsTokener) credentials() {} +func (credsAuthenticator) credentials() {} +func (credsServiceAccount) credentials() {} +func (credsOneOf) credentials() {} +func (credsPropagate) credentials() {} diff --git a/example_test.go b/example_test.go new file mode 100644 index 0000000..24fe876 --- /dev/null +++ b/example_test.go @@ -0,0 +1,134 @@ +package gosdk_test + +import ( + "context" + "fmt" + "log/slog" + "os" + + "github.com/nebius/gosdk" + "github.com/nebius/gosdk/auth" + compute "github.com/nebius/gosdk/proto/nebius/compute/v1" +) + +// This example demonstrates how to create and configure a new [gosdk.SDK] instance with logging and credentials, +// then retrieve a list of compute instances using the gosdk API. +// +// After usage, the SDK instance should be closed. +// +// Note: Be sure to replace `creds` with appropriate credentials. +func ExampleSDK() { + ctx := context.Background() + logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + + var creds gosdk.Credentials // define your credentials (see other examples) + + sdk, err := gosdk.New( + ctx, + gosdk.WithLogger(logger), + gosdk.WithCredentials(creds), + ) + if err != nil { + return // fmt.Errorf("create gosdk: %w", err) + } + defer func() { + errX := sdk.Close() + if errX != nil { + logger.ErrorContext(ctx, "failed to close sdk", slog.Any("error", errX)) + } + }() + + list, err := sdk.Services().Compute().V1().Instance().List(ctx, &compute.ListInstancesRequest{ + ParentId: "my-parent", + }) + if err != nil { + return // fmt.Errorf("list instances: %w", err) + } + + for _, instance := range list.Items { + fmt.Println(instance.GetMetadata().GetId()) + } +} + +// This examples demonstrates using the [gosdk.WithExplicitInit] option +// to separate [gosdk.SDK] construction ([gosdk.New]) from IO operations performed during [gosdk.SDK.Init]. +// This allows for explicit control over initialization timing. +func ExampleSDK_Init() { + ctx := context.Background() + logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + + var creds gosdk.Credentials // define your credentials (see other examples) + + sdk, err := gosdk.New( + ctx, + gosdk.WithLogger(logger), + gosdk.WithCredentials(creds), + gosdk.WithExplicitInit(true), + ) + if err != nil { + return // fmt.Errorf("create gosdk: %w", err) + } + defer func() { + errX := sdk.Close() + if errX != nil { + logger.ErrorContext(ctx, "failed to close sdk", slog.Any("error", errX)) + } + }() + + err = sdk.Init(ctx) + if err != nil { + return // fmt.Errorf("init gosdk: %w", err) + } +} + +func ExampleCredentials_useIAMToken() { + ctx := context.Background() + logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + + sdk, err := gosdk.New( + ctx, + gosdk.WithLogger(logger), + gosdk.WithCredentials( + gosdk.IAMToken(os.Getenv("MY_ENV")), + ), + ) + if err != nil { + return // fmt.Errorf("create gosdk: %w", err) + } + defer func() { + errX := sdk.Close() + if errX != nil { + logger.ErrorContext(ctx, "failed to close sdk", slog.Any("error", errX)) + } + }() +} + +func ExampleCredentials_useServiceAccount() { + ctx := context.Background() + logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + + // you can find more ways to create a service account in the auth package + serviceAccount := auth.NewPrivateKeyFileParser( + nil, // or you can set up your own fs, eg: `os.DirFS("."),` + "private/key/file/path", + "public-key-id", + "service-account-id", + ) + + sdk, err := gosdk.New( + ctx, + gosdk.WithLogger(logger), + gosdk.WithCredentials( + gosdk.ServiceAccountReader(serviceAccount), + ), + ) + if err != nil { + return // fmt.Errorf("create gosdk: %w", err) + } + defer func() { + errX := sdk.Close() + if errX != nil { + logger.ErrorContext(ctx, "failed to close sdk", slog.Any("error", errX)) + } + }() +} diff --git a/fieldmask/grpcheader/common.go b/fieldmask/grpcheader/common.go new file mode 100644 index 0000000..12aa172 --- /dev/null +++ b/fieldmask/grpcheader/common.go @@ -0,0 +1,84 @@ +package grpcheader + +import ( + "context" + "fmt" + "strings" + + "google.golang.org/grpc/metadata" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +// IsInOutgoingContext checks if a metadata key (grpc header) exists in the +// outgoing context. +// +// Parameters: +// - ctx [context.Context]: The context from which to extract metadata. +// - name string: The name of the metadata key to check. +// +// Returns: +// - bool: True if the metadata key exists in the outgoing context, false +// otherwise. +func IsInOutgoingContext(ctx context.Context, name string) bool { + name = strings.ToLower(name) + md, _ := metadata.FromOutgoingContext(ctx) + return len(md[name]) != 0 +} + +// AddMaskToOutgoingContext adds a [mask.Mask] as a header to the outgoing +// grpc context. +// +// Parameters: +// - ctx [context.Context]: The context to which the mask will be added. +// - maskName string: The name of the mask to be added to the metadata. +// - mask *[mask.Mask]: The mask to be added. +// +// Returns: +// - [context.Context]: The context with the mask added to the metadata. +// - error: An error if there was any issue marshalling the mask or appending +// it to the context metadata. + +func AddMaskToOutgoingContext( + ctx context.Context, + maskName string, + mask *mask.Mask, +) (context.Context, error) { + mstr, err := mask.Marshal() + if err != nil { + return ctx, fmt.Errorf("failed to marshal mask: %w", err) + } + return metadata.AppendToOutgoingContext(ctx, maskName, mstr), nil +} + +// GetMaskFromIncomingContext retrieves a [mask.Mask] from the incoming context +// metadata (grpc headers) by its `maskHeaderName` and parses it. +// If several masks were present, they are merged together. +// If no mask is present, an empty mask will be returned. +// +// Parameters: +// - ctx [context.Context]: The context from which to extract the mask. +// - maskHeaderName string: The name of the mask to retrieve from the +// metadata. +// +// Returns: +// - *[mask.Mask]: The mask retrieved from the context metadata. +// - error: An error if there was any issue parsing or merging the masks. +func GetMaskFromIncomingContext( + ctx context.Context, + maskHeaderName string, +) (*mask.Mask, error) { + maskHeaderName = strings.ToLower(maskHeaderName) + maskStrings := metadata.ValueFromIncomingContext(ctx, maskHeaderName) + fieldMask := mask.New() + for i, str := range maskStrings { + oneMask, err := mask.Parse(str) + if err != nil { + return nil, fmt.Errorf("failed parse mask %d: %w", i, err) + } + if err := fieldMask.Merge(oneMask); err != nil { + return nil, fmt.Errorf("failed merge mask %d: %w", i, err) + } + } + return fieldMask, nil +} diff --git a/fieldmask/grpcheader/common_test.go b/fieldmask/grpcheader/common_test.go new file mode 100644 index 0000000..6cfe13a --- /dev/null +++ b/fieldmask/grpcheader/common_test.go @@ -0,0 +1,154 @@ +package grpcheader + +import ( + "context" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/metadata" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +func TestIsInOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("no metadata in headers", func(t *testing.T) { + t.Parallel() + assert.False(t, IsInOutgoingContext(context.Background(), "some-header")) + }) + t.Run("different header", func(t *testing.T) { + t.Parallel() + ctx := metadata.AppendToOutgoingContext(context.Background(), "Other-Header", "foo") + assert.False(t, IsInOutgoingContext(ctx, "some-header")) + }) + t.Run("has header same case", func(t *testing.T) { + t.Parallel() + ctx := metadata.AppendToOutgoingContext(context.Background(), "Some-Header", "foo") + assert.True(t, IsInOutgoingContext(ctx, "Some-Header")) + }) + t.Run("has header diff case", func(t *testing.T) { + t.Parallel() + ctx := metadata.AppendToOutgoingContext(context.Background(), "Some-Header", "foo") + assert.True(t, IsInOutgoingContext(ctx, "some-heaDer")) + }) +} + +func TestAddMaskToOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("failure", func(t *testing.T) { + t.Parallel() + m := mask.New() + m.Any = m + _, err := AddMaskToOutgoingContext(context.Background(), "mymask", m) + assert.EqualError(t, err, "failed to marshal mask: "+strings.Repeat("*: ", 1000)+"recursion too deep") + }) + t.Run("ok", func(t *testing.T) { + t.Parallel() + m := mask.ParseMust("a,b,c.*") + ctx, err := AddMaskToOutgoingContext(context.Background(), "My-Mask", m) + assert.NoError(t, err) + md, ok := metadata.FromOutgoingContext(ctx) + assert.True(t, ok) + assert.Equal(t, []string{"a,b,c.*"}, md["my-mask"]) + }) + t.Run("multi", func(t *testing.T) { + t.Parallel() + m := mask.ParseMust("a,b,c.*") + ctx, err := AddMaskToOutgoingContext(context.Background(), "My-Mask", m) + assert.NoError(t, err) + m2 := mask.ParseMust("d,e.f") + ctx, err = AddMaskToOutgoingContext(ctx, "My-Mask", m2) + assert.NoError(t, err) + md, ok := metadata.FromOutgoingContext(ctx) + assert.True(t, ok) + assert.Equal(t, []string{"a,b,c.*", "d,e.f"}, md["my-mask"]) + }) + t.Run("multi rev order", func(t *testing.T) { + t.Parallel() + m := mask.ParseMust("d,e.f") + ctx, err := AddMaskToOutgoingContext(context.Background(), "My-Mask", m) + assert.NoError(t, err) + m2 := mask.ParseMust("a,b,c.*") + ctx, err = AddMaskToOutgoingContext(ctx, "My-Mask", m2) + assert.NoError(t, err) + md, ok := metadata.FromOutgoingContext(ctx) + assert.True(t, ok) + assert.Equal(t, []string{"d,e.f", "a,b,c.*"}, md["my-mask"]) + }) +} + +func TestGetMaskFromIncomingContext(t *testing.T) { + t.Parallel() + t.Run("no metadata", func(t *testing.T) { + t.Parallel() + m, err := GetMaskFromIncomingContext(context.Background(), "my-mask") + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is nil", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), nil) + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is empty", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{}) + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is without mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "other": []string{"foo", "bar"}, + }) + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is with empty mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "my-mask": []string{}, + }) + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is with fail mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "my-mask": []string{"("}, + }) + _, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.EqualError(t, err, "failed parse mask 0: unclosed left brace at position 0 near \"⃞(\"") + }) + t.Run("metadata is with one mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "my-mask": []string{"a,b.c"}, + }) + target := mask.ParseMust("a,b.c") + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("metadata is with couple masks", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "my-mask": []string{"a,b.c", "b.d,*.e"}, + }) + target := mask.ParseMust("a,b.(c,d),*.e") + m, err := GetMaskFromIncomingContext(ctx, "my-mask") + assert.NoError(t, err) + assert.True(t, target.Equal(m), "not equal", target, m) + }) +} diff --git a/fieldmask/grpcheader/resetmask.go b/fieldmask/grpcheader/resetmask.go new file mode 100644 index 0000000..7b0bc4b --- /dev/null +++ b/fieldmask/grpcheader/resetmask.go @@ -0,0 +1,112 @@ +package grpcheader + +import ( + "context" + "fmt" + + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/fieldmask/protobuf" +) + +// ResetMask is the gRPC header name where the reset mask will be added. +const ResetMask = "X-ResetMask" + +// IsResetMaskInOutgoingContext checks if the reset mask is present in the +// outgoing context metadata (gRPC headers). +// +// Parameters: +// - ctx [context.Context]: The context to check for the presence of the reset +// mask. +// +// Returns: +// - bool: True if the reset mask is present in the outgoing context metadata, +// false otherwise. +func IsResetMaskInOutgoingContext(ctx context.Context) bool { + return IsInOutgoingContext(ctx, ResetMask) +} + +// AddResetMaskToOutgoingContext adds the reset [mask.Mask] to the outgoing +// context metadata (gRPC headers). +// +// Parameters: +// - ctx [context.Context]: The context to which the reset mask will be added. +// - resetMask *[mask.Mask]: The reset mask to be added. +// +// Returns: +// - [context.Context]: The context with the reset mask added to the metadata. +// - error: An error if there was any issue marshalling the reset mask or +// appending it to the context metadata. +func AddResetMaskToOutgoingContext( + ctx context.Context, + resetMask *mask.Mask, +) (context.Context, error) { + return AddMaskToOutgoingContext(ctx, ResetMask, resetMask) +} + +// AddMessageResetMaskToOutgoingContext adds the reset [mask.Mask] derived from +// the given [proto.Message] to the outgoing context metadata (gRPC headers). +// +// Parameters: +// - ctx [context.Context]: The context to which the reset mask will be added. +// - msg [proto.Message]: The proto message from which the reset mask will be +// derived. +// +// Returns: +// - [context.Context]: The context with the reset mask. +// - error: An error if there was any issue deriving the reset mask from the +// message or adding it to the context metadata. +func AddMessageResetMaskToOutgoingContext( + ctx context.Context, + msg proto.Message, +) (context.Context, error) { + resetMask, err := protobuf.ResetMaskFromMessage(msg) + if err != nil { + return ctx, fmt.Errorf("failed to get mask from message: %w", err) + } + + return AddResetMaskToOutgoingContext(ctx, resetMask) +} + +// EnsureMessageResetMaskInOutgoingContext ensures that the reset [mask.Mask] is +// present in the outgoing context metadata. If the reset mask is already +// present, it returns the context unchanged. Otherwise, it derives the reset +// mask from the given [proto.Message] and adds it to the context metadata. +// +// Parameters: +// - ctx [context.Context]: The context to check for the presence of the reset +// mask. +// - msg [proto.Message]: The proto message from which to derive the reset +// mask if it's not already present. +// +// Returns: +// - [context.Context]: The context with the reset mask added to the metadata, +// if necessary. +// - error: An error if there was any issue deriving or adding the reset mask +// to the context metadata. +func EnsureMessageResetMaskInOutgoingContext( + ctx context.Context, + msg proto.Message, +) (context.Context, error) { + if IsResetMaskInOutgoingContext(ctx) { + return ctx, nil + } + return AddMessageResetMaskToOutgoingContext(ctx, msg) +} + +// GetResetMaskFromIncomingContext retrieves the reset [mask.Mask] from the +// incoming context metadata (grpc headers) and parses it. +// If several masks were present, they are merged together. +// If no mask is present, an empty mask will be returned. +// +// Parameters: +// - ctx [context.Context]: The context from which to extract the reset mask. +// +// Returns: +// - *[mask.Mask]: The reset mask retrieved from the context metadata. +// - error: An error if there was any issue parsing or merging the reset +// masks. +func GetResetMaskFromIncomingContext(ctx context.Context) (*mask.Mask, error) { + return GetMaskFromIncomingContext(ctx, ResetMask) +} diff --git a/fieldmask/grpcheader/resetmask_test.go b/fieldmask/grpcheader/resetmask_test.go new file mode 100644 index 0000000..092721e --- /dev/null +++ b/fieldmask/grpcheader/resetmask_test.go @@ -0,0 +1,189 @@ +package grpcheader + +import ( + "context" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/metadata" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestIsResetMaskInOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("no mask at all", func(t *testing.T) { + t.Parallel() + assert.False(t, IsResetMaskInOutgoingContext(context.Background())) + }) + t.Run("different mask", func(t *testing.T) { + t.Parallel() + ctx, err := AddMaskToOutgoingContext(context.Background(), "other-mask", mask.ParseMust("a,b")) + assert.NoError(t, err) + assert.False(t, IsResetMaskInOutgoingContext(ctx)) + }) + t.Run("has mask", func(t *testing.T) { + t.Parallel() + ctx, err := AddMaskToOutgoingContext(context.Background(), "x-resetMask", mask.ParseMust("a,b")) + assert.NoError(t, err) + assert.True(t, IsResetMaskInOutgoingContext(ctx)) + }) +} + +func TestAddResetMaskToOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("failure", func(t *testing.T) { + t.Parallel() + m := mask.New() + m.Any = m + _, err := AddResetMaskToOutgoingContext(context.Background(), m) + assert.EqualError(t, err, "failed to marshal mask: "+strings.Repeat("*: ", 1000)+"recursion too deep") + }) + t.Run("add once", func(t *testing.T) { + t.Parallel() + ctx, err := AddResetMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.c")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.c"}, md["x-resetmask"]) + }) + t.Run("add twice", func(t *testing.T) { + t.Parallel() + ctx, err := AddResetMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.c")) + assert.NoError(t, err) + ctx, err = AddResetMaskToOutgoingContext(ctx, mask.ParseMust("a,b.d")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.c", "a,b.d"}, md["x-resetmask"]) + }) + t.Run("add twice reverce order", func(t *testing.T) { + t.Parallel() + ctx, err := AddResetMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.d")) + assert.NoError(t, err) + ctx, err = AddResetMaskToOutgoingContext(ctx, mask.ParseMust("a,b.c")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.d", "a,b.c"}, md["x-resetmask"]) + }) +} + +func TestGetResetMaskFromIncomingContext(t *testing.T) { + t.Parallel() + t.Run("no mask", func(t *testing.T) { + t.Parallel() + m, err := GetResetMaskFromIncomingContext(context.Background()) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("other mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-selectmask": []string{"a,b.c"}, + }) + m, err := GetResetMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("empty mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-resetmask": []string{}, + }) + m, err := GetResetMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("one mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-resetmask": []string{"a,b.c"}, + }) + m, err := GetResetMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("a,b.c") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("multiple masks", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-resetmask": []string{"a,b.c", "b.d"}, + }) + m, err := GetResetMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("a,b.(c,d)") + assert.True(t, target.Equal(m), "not equal", target, m) + }) +} + +func TestAddMessageResetMaskToOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("failure", func(t *testing.T) { + t.Parallel() + recursionTooDeep := 1000 + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + } + _, err := AddMessageResetMaskToOutgoingContext(context.Background(), veryRecursive) + assert.EqualError(t, err, "failed to get mask from message: failed to collect modification mask: "+ + strings.Repeat("RecursiveStruct: ", recursionTooDeep)+"recursion too deep") + }) + t.Run("success one", func(t *testing.T) { + t.Parallel() + ctx, err := AddMessageResetMaskToOutgoingContext(context.Background(), &testdata.TestRecursiveSingle{}) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"field"}, md["x-resetmask"]) + }) + t.Run("success two", func(t *testing.T) { + t.Parallel() + ctx, err := AddResetMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.d")) + assert.NoError(t, err) + ctx, err = AddMessageResetMaskToOutgoingContext(ctx, &testdata.TestRecursiveSingle{}) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.d", "field"}, md["x-resetmask"]) + }) +} +func TestEnsureMessageResetMaskInOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("failure", func(t *testing.T) { + t.Parallel() + recursionTooDeep := 1000 + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + } + _, err := EnsureMessageResetMaskInOutgoingContext(context.Background(), veryRecursive) + assert.EqualError(t, err, "failed to get mask from message: failed to collect modification mask: "+ + strings.Repeat("RecursiveStruct: ", recursionTooDeep)+"recursion too deep") + }) + t.Run("insert", func(t *testing.T) { + t.Parallel() + ctx, err := EnsureMessageResetMaskInOutgoingContext(context.Background(), &testdata.TestRecursiveSingle{}) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"field"}, md["x-resetmask"]) + }) + t.Run("no insert", func(t *testing.T) { + t.Parallel() + ctx, err := AddResetMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.d")) + assert.NoError(t, err) + ctx, err = EnsureMessageResetMaskInOutgoingContext(ctx, &testdata.TestRecursiveSingle{}) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.d"}, md["x-resetmask"]) + }) +} diff --git a/fieldmask/grpcheader/selectmask.go b/fieldmask/grpcheader/selectmask.go new file mode 100644 index 0000000..dc3209d --- /dev/null +++ b/fieldmask/grpcheader/selectmask.go @@ -0,0 +1,60 @@ +package grpcheader + +import ( + "context" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +// SelectMask is the gRPC header name where the select mask will be added. +const SelectMask = "X-SelectMask" + +// IsSelectMaskInOutgoingContext checks if the select mask is present in the +// outgoing context metadata (gRPC headers). +// +// Parameters: +// - ctx [context.Context]: The context to check for the presence of the +// select mask. +// +// Returns: +// - bool: True if the select mask is present in the outgoing context +// metadata, false otherwise. +func IsSelectMaskInOutgoingContext(ctx context.Context) bool { + return IsInOutgoingContext(ctx, SelectMask) +} + +// AddSelectMaskToOutgoingContext adds the select [mask.Mask] to the outgoing +// context metadata (gRPC headers). +// +// Parameters: +// - ctx [context.Context]: The context to which the select mask will be +// added. +// - selectMask *[mask.Mask]: The select mask to be added. +// +// Returns: +// - [context.Context]: The context with the select mask added to the +// metadata. +// - error: An error if there was any issue marshalling the select mask or +// appending it to the context metadata. +func AddSelectMaskToOutgoingContext( + ctx context.Context, + selectMask *mask.Mask, +) (context.Context, error) { + return AddMaskToOutgoingContext(ctx, SelectMask, selectMask) +} + +// GetSelectMaskFromIncomingContext retrieves the select [mask.Mask] from the +// incoming context metadata (grpc headers) and parses it. +// If several masks were present, they are merged together. +// If no mask is present, an empty mask will be returned. +// +// Parameters: +// - ctx [context.Context]: The context from which to extract the select mask. +// +// Returns: +// - *[mask.Mask]: The select mask retrieved from the context metadata. +// - error: An error if there was any issue parsing or merging the select +// masks. +func GetSelectMaskFromIncomingContext(ctx context.Context) (*mask.Mask, error) { + return GetMaskFromIncomingContext(ctx, SelectMask) +} diff --git a/fieldmask/grpcheader/selectmask_test.go b/fieldmask/grpcheader/selectmask_test.go new file mode 100644 index 0000000..0f4e410 --- /dev/null +++ b/fieldmask/grpcheader/selectmask_test.go @@ -0,0 +1,119 @@ +package grpcheader + +import ( + "context" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc/metadata" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +func TestIsSelectMaskInOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("no mask at all", func(t *testing.T) { + t.Parallel() + assert.False(t, IsSelectMaskInOutgoingContext(context.Background())) + }) + t.Run("different mask", func(t *testing.T) { + t.Parallel() + ctx, err := AddMaskToOutgoingContext(context.Background(), "other-mask", mask.ParseMust("a,b")) + assert.NoError(t, err) + assert.False(t, IsSelectMaskInOutgoingContext(ctx)) + }) + t.Run("has mask", func(t *testing.T) { + t.Parallel() + ctx, err := AddMaskToOutgoingContext(context.Background(), "x-selectMask", mask.ParseMust("a,b")) + assert.NoError(t, err) + assert.True(t, IsSelectMaskInOutgoingContext(ctx)) + }) +} + +func TestAddSelectMaskToOutgoingContext(t *testing.T) { + t.Parallel() + t.Run("failure", func(t *testing.T) { + t.Parallel() + m := mask.New() + m.Any = m + _, err := AddSelectMaskToOutgoingContext(context.Background(), m) + assert.EqualError(t, err, "failed to marshal mask: "+strings.Repeat("*: ", 1000)+"recursion too deep") + }) + t.Run("add once", func(t *testing.T) { + t.Parallel() + ctx, err := AddSelectMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.c")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.c"}, md["x-selectmask"]) + }) + t.Run("add twice", func(t *testing.T) { + t.Parallel() + ctx, err := AddSelectMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.c")) + assert.NoError(t, err) + ctx, err = AddSelectMaskToOutgoingContext(ctx, mask.ParseMust("a,b.d")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.c", "a,b.d"}, md["x-selectmask"]) + }) + t.Run("add twice reverce order", func(t *testing.T) { + t.Parallel() + ctx, err := AddSelectMaskToOutgoingContext(context.Background(), mask.ParseMust("a,b.d")) + assert.NoError(t, err) + ctx, err = AddSelectMaskToOutgoingContext(ctx, mask.ParseMust("a,b.c")) + assert.NoError(t, err) + md, _ := metadata.FromOutgoingContext(ctx) + assert.Equal(t, []string{"a,b.d", "a,b.c"}, md["x-selectmask"]) + }) +} + +func TestGetSelectMaskFromIncomingContext(t *testing.T) { + t.Parallel() + t.Run("no mask", func(t *testing.T) { + t.Parallel() + m, err := GetSelectMaskFromIncomingContext(context.Background()) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("other mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-resetmask": []string{"a,b.c"}, + }) + m, err := GetSelectMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("empty mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-selectmask": []string{}, + }) + m, err := GetSelectMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("one mask", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-selectmask": []string{"a,b.c"}, + }) + m, err := GetSelectMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("a,b.c") + assert.True(t, target.Equal(m), "not equal", target, m) + }) + t.Run("multiple masks", func(t *testing.T) { + t.Parallel() + ctx := metadata.NewIncomingContext(context.Background(), metadata.MD{ + "x-selectmask": []string{"a,b.c", "b.d"}, + }) + m, err := GetSelectMaskFromIncomingContext(ctx) + assert.NoError(t, err) + target := mask.ParseMust("a,b.(c,d)") + assert.True(t, target.Equal(m), "not equal", target, m) + }) +} diff --git a/fieldmask/mask/fieldkey.go b/fieldmask/mask/fieldkey.go new file mode 100644 index 0000000..27dfee5 --- /dev/null +++ b/fieldmask/mask/fieldkey.go @@ -0,0 +1,45 @@ +package mask + +import ( + "encoding/json" + "fmt" + "regexp" +) + +// FieldKey represents a string used as a field key in [Mask] or [FieldPath]. +type FieldKey string + +var simpleStringPattern = regexp.MustCompile("^[a-zA-Z0-9_]+$") + +// isSimpleString checks if the input string matches the simple string pattern. +func isSimpleString(input string) bool { + return simpleStringPattern.MatchString(input) +} + +// Marshal converts a [FieldKey] to its string representation. +// If the [FieldKey] is a simple string, it returns the string directly. +// Otherwise, it marshals the [FieldKey] using [json.Marshal] encoding. +func (f FieldKey) Marshal() (string, error) { + if isSimpleString(string(f)) { + return string(f), nil + } + res, err := json.Marshal(string(f)) + if err != nil { + return "", fmt.Errorf("failed to marshal FieldKey: %w", err) + } + return string(res), nil +} + +// MarshalText marshals [FieldKey] as arbitrary string unlike [FieldKey.Marshal] +// to incorporate it into other marshalers. +func (f FieldKey) MarshalText() ([]byte, error) { + return json.Marshal(string(f)) +} + +// UnmarshalText inverts [FieldKey.MarshalText]. +func (f *FieldKey) UnmarshalText(text []byte) error { + var str string + err := json.Unmarshal(text, &str) + *f = FieldKey(str) + return err +} diff --git a/fieldmask/mask/fieldkey_test.go b/fieldmask/mask/fieldkey_test.go new file mode 100644 index 0000000..40ebaf2 --- /dev/null +++ b/fieldmask/mask/fieldkey_test.go @@ -0,0 +1,37 @@ +package mask + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFieldKey(t *testing.T) { + t.Parallel() + t.Run("simple", func(t *testing.T) { + t.Parallel() + fk := FieldKey("Simple_Key_123") + str, err := fk.Marshal() + assert.NoError(t, err) + assert.Equal(t, "Simple_Key_123", str) + }) + t.Run("quoted", func(t *testing.T) { + t.Parallel() + fk := FieldKey(`Key with spaces, commas, and: ".\_-!@$%^"`) + str, err := fk.Marshal() + assert.NoError(t, err) + assert.Equal(t, "\"Key\\t\\twith spaces, commas, and: \\\".\\\\_-!@$%^\\\"\"", str) + }) + t.Run("marshal text", func(t *testing.T) { + t.Parallel() + fk := FieldKey("Simple_Key_123") + bb, err := fk.MarshalText() + assert.NoError(t, err) + assert.Equal(t, []byte(`"Simple_Key_123"`), bb) + n := (FieldKey("")) + np := &n + err = np.UnmarshalText(bb) + assert.NoError(t, err) + assert.Equal(t, fk, *np) + }) +} diff --git a/fieldmask/mask/fieldpath.go b/fieldmask/mask/fieldpath.go new file mode 100644 index 0000000..fa5c70d --- /dev/null +++ b/fieldmask/mask/fieldpath.go @@ -0,0 +1,403 @@ +package mask + +import ( + "errors" +) + +// FieldPath represents a path to a specific field within a message structure. +// It is a sequence of [FieldKey]s that identifies the location of a field. +type FieldPath []FieldKey + +func NewFieldPath(keys ...FieldKey) FieldPath { + ret := make(FieldPath, 0, len(keys)) + ret = append(ret, keys...) + return ret +} + +// Join concatenates the current [FieldPath] with additional [FieldKey]s, +// returning a new extended [FieldPath]. +// +// The Join method appends the specified [FieldKey]s (keys...) to the end of the +// current [FieldPath] (fp), producing a new [FieldPath] that represents a +// longer path. This operation does not modify the original [FieldPath]. +// +// Example: +// +// fp := NewFieldPath("user", "profile") +// extendedPath := fp.Join("email") // Result: ["user", "profile", "email"] +// +// If no additional [FieldKey]s are provided (keys...), the method will return +// a copy of the current [FieldPath]. +// +// Note that the new [FieldPath] is created as a separate instance from the +// original, ensuring that immutability is maintained for the current +// [FieldPath]. +// +// Parameters: +// - keys ([FieldKey]...): Additional [FieldKey]s to append to the current +// [FieldPath]. +// +// Returns: +// - FieldPath: A new [FieldPath] instance representing the extended path. +func (fp FieldPath) Join(keys ...FieldKey) FieldPath { + ret := make(FieldPath, 0, len(keys)+len(fp)) + ret = append(ret, fp...) + ret = append(ret, keys...) + return ret +} + +// Parent returns the parent [FieldPath] by excluding the last [FieldKey], +// representing the path to the parent field of the current field. +// +// If the current [FieldPath] is empty (nil or has zero length), the Parent +// method returns nil, indicating that there is no parent path. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// parentPath := fp.Parent() // Result: ["user", "profile"] +// +// If the [FieldPath] contains only one [FieldKey], calling Parent on it +// will return an empty [FieldPath], as it represents the +// top-level path with no parent. +// +// Note that the Parent method does not modify the original [FieldPath]; +// it returns a new [FieldPath] representing the parent path. +func (fp FieldPath) Parent() FieldPath { + if len(fp) == 0 { + return nil + } + return fp[0 : len(fp)-1] +} + +// Copy creates and returns a copy of the current [FieldPath]. +// +// The Copy method duplicates the current [FieldPath], producing an identical +// [FieldPath] instance with the same sequence of [FieldKey]s. This operation +// ensures that modifications to the copied [FieldPath] do not affect the +// original [FieldPath]. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// copiedPath := fp.Copy() // Result: ["user", "profile", "email"] +// +// Note that the Copy method is equivalent to calling [FieldPath.Join]() with no +// additional [FieldKey]s, resulting in a new [FieldPath] that is a clone of the +// original. +func (fp FieldPath) Copy() FieldPath { + return fp.Join() +} + +// ToMask converts the [FieldPath] into a [Mask] structure, representing a path +// mask. +// +// The ToMask method constructs a [Mask] structure based on the [FieldPath], +// where each [FieldKey] in the [FieldPath] corresponds to a nested [Mask] +// within the resulting [Mask]. This method is useful for generating a [Mask] +// that can be used to specify which parts of a data structure are accessed or +// modified. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// mask := fp.ToMask() +// +// The resulting [Mask] from the example above would be: `user.profile.email` +// +// Returns: +// - *Mask: A [Mask] structure representing the path mask derived from the +// [FieldPath]. +func (fp FieldPath) ToMask() *Mask { + ret := New() + cur := ret + for _, k := range fp { + next := New() + cur.FieldParts[k] = next + cur = next + } + return ret +} + +// Equal checks if two [FieldPath]s are identical in sequence and length. +// +// The Equal method compares the current [FieldPath] with another [FieldPath] +// (other) to determine if they have the same sequence of [FieldKey]s and are of +// the same length. It returns true if both [FieldPath]s are identical, and +// false otherwise. +// +// Example: +// +// fp1 := NewFieldPath("user", "profile", "email") +// fp2 := NewFieldPath("user", "profile", "email") +// isEqual := fp1.Equal(fp2) // Result: true +// +// Note that the Equal method performs a deep comparison of the [FieldPath]s. +func (fp FieldPath) Equal(other FieldPath) bool { + if len(fp) != len(other) { + return false + } + for i := range fp { + if fp[i] != other[i] { + return false + } + } + return true +} + +// IsPrefixOf checks if the current [FieldPath] is a prefix of another +// [FieldPath]. +// +// The IsPrefixOf method determines whether the current [FieldPath] is a prefix +// of another [FieldPath] (other). It returns true if every [FieldKey] in the +// current [FieldPath] matches the corresponding [FieldKey] in the beginning of +// the other [FieldPath], and false otherwise. +// +// Example: +// +// prefix := NewFieldPath("user", "profile") +// fullPath := NewFieldPath("user", "profile", "email") +// isPrefix := prefix.IsPrefixOf(fullPath) // Result: true +// +// If the current [FieldPath] is longer than the other [FieldPath], IsPrefixOf +// returns false. +func (fp FieldPath) IsPrefixOf(other FieldPath) bool { + if len(fp) >= len(other) { + return false + } + for i := range fp { + if fp[i] != other[i] { + return false + } + } + return true +} + +func fieldKeyMatchResetMaskRecursive( + slice FieldPath, + mask *Mask, +) (bool, bool) { + if mask == nil { + return false, false + } + if len(slice) == 0 { + return true, mask.IsEmpty() + } + key, rest := slice[0], slice[1:] + hasMatch := false + isFinal := false + if mask.Any != nil { + hasMatch, isFinal = fieldKeyMatchResetMaskRecursive(rest, mask.Any) + } + if km, ok := mask.FieldParts[key]; ok && km != nil { + kMatch, kFinal := fieldKeyMatchResetMaskRecursive(rest, km) + hasMatch = hasMatch || kMatch + if kMatch { + isFinal = isFinal || kFinal + } + } + return hasMatch, isFinal +} + +// MatchesResetMask checks if the [FieldPath] matches the provided [Mask] in +// terms of `X-ResetMask` behavior by [Design]. +// +// The MatchesResetMask method recursively matches each [FieldKey] in the +// current [FieldPath] against the provided Mask. It returns true if there is a +// complete match according to the Mask structure, and false otherwise. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// mask := ParseMust("user.profile.email") +// doesMatch := fp.MatchesResetMask(mask) // Result: true +// doesMatchParent := fp.Parent().MatchesResetMask(mask) // Result: true +// +// If the length of the [FieldPath] exceeds a defined recursion limit +// [recursionTooDeep], MatchesResetMask returns false to prevent deep recursion. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func (fp FieldPath) MatchesResetMask(mask *Mask) bool { + if len(fp) >= recursionTooDeep { + return false + } + ret, _ := fieldKeyMatchResetMaskRecursive(fp, mask) + return ret +} + +// MatchesResetMaskFinal checks if the [FieldPath] matches the provided [Mask] +// in terms of `X-ResetMask` behavior by [Design], and if the path ends exactly +// where the [Mask] structure ends (is fully consumed). +// +// The MatchesResetMaskFinal method recursively matches each [FieldKey] in the +// current [FieldPath] against the provided [Mask]. It returns true if there is +// a complete match according to the [Mask] structure and the [FieldPath] +// exactly corresponds to the last node (non-submask) in the [Mask], ensuring +// that no submasks are present beyond the last [FieldKey] in the [FieldPath]. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// mask := ParseMust("user.profile.email") +// doesMatch := fp.MatchesResetMaskFinal(mask) // Result: true +// doesMatchParent := fp.Parent().MatchesResetMaskFinal(mask) // Result: false +// +// If the length of the [FieldPath] exceeds a defined recursion limit +// [recursionTooDeep], MatchesResetMaskFinal returns false to prevent deep +// recursion. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func (fp FieldPath) MatchesResetMaskFinal(mask *Mask) bool { + if len(fp) >= recursionTooDeep { + return false + } + ret, emp := fieldKeyMatchResetMaskRecursive(fp, mask) + return ret && emp +} + +func fieldKeyMatchSelectMaskRecursive( + slice []FieldKey, + mask *Mask, +) (bool, bool) { + if mask == nil || mask.IsEmpty() { + return true, len(slice) != 0 + } + if len(slice) == 0 { + return true, false + } + key, rest := slice[0], slice[1:] + hasMatch := false + isInner := false + if mask.Any != nil { + hasMatch, isInner = fieldKeyMatchSelectMaskRecursive(rest, mask.Any) + } + if km, ok := mask.FieldParts[key]; ok && km != nil { + kMatch, kInner := fieldKeyMatchSelectMaskRecursive(rest, km) + hasMatch = hasMatch || kMatch + if kMatch { + isInner = isInner || kInner + } + } + return hasMatch, isInner +} + +// MatchesSelectMask checks if the [FieldPath] matches the provided [Mask] +// according to `X-SelectMask` behavior by [Design]. +// +// This method recursively matches each [FieldKey] in the current [FieldPath] +// against the provided [Mask]. It returns true if there is a complete match +// according to the [Mask] structure, allowing any submasks within the provided +// [Mask]. +// +// For example: +// +// mask := ParseMust("a.b") +// doesMatch, isInner := NewFieldPath("a", "x").MatchesSelectMask(mask) // Result: false +// doesMatch, isInner := NewFieldPath("a", "b").MatchesSelectMask(mask) // Result: true +// doesMatch, isInner := NewFieldPath("a", "b", "c").MatchesSelectMask(mask) // Result: true +// +// If the length of the [FieldPath] exceeds a defined recursion limit +// [recursionTooDeep], MatchesSelectMask returns false to prevent deep recursion. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func (fp FieldPath) MatchesSelectMask(mask *Mask) bool { + ret, _ := fp.MatchesSelectMaskInner(mask) + return ret +} + +// MatchesSelectMaskInner checks if the [FieldPath] matches the provided [Mask] +// according to `X-SelectMask` behavior by [Design], and also indicates whether +// the match was not the final (inner match). +// +// This method recursively matches each [FieldKey] in the current [FieldPath] +// against the provided [Mask]. It returns true if there is a complete match +// according to the [Mask] structure. Additionally, it returns true if the match +// was not the final match in the [Mask] structure, indicating that submasks +// were present beyond the matched [FieldKey]. +// +// For example: +// +// mask := ParseMust("a.b") +// doesMatch, isInner := NewFieldPath("a", "x").MatchesSelectMaskInner(mask) // Result: (false, false) +// doesMatch, isInner := NewFieldPath("a", "b").MatchesSelectMaskInner(mask) // Result: (true, false) +// doesMatch, isInner := NewFieldPath("a", "b", "c").MatchesSelectMaskInner(mask) // Result: (true, true) +// +// If the length of the [FieldPath] exceeds a defined recursion limit +// [recursionTooDeep], MatchesSelectMaskInner returns (false, false) to prevent +// deep recursion. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func (fp FieldPath) MatchesSelectMaskInner(mask *Mask) (bool, bool) { + if len(fp) >= recursionTooDeep { + return false, false + } + return fieldKeyMatchSelectMaskRecursive(fp, mask) +} + +// Marshal converts the [FieldPath] into its string representation in a [Mask] +// form. +// +// The Marshal method first converts the [FieldPath] into a [Mask] using the +// [FieldPath.ToMask] method. It then obtains a string representation of the +// resulting mask using the [Mask.Marshal] method. +// +// Example: +// +// fp := NewFieldPath("user", "profile", "email") +// str, err := fp.Marshal() +// +// The resulting string (str) from the example above represents the [Mask] +// derived from the [FieldPath] in its marshaled form. +// +// The resulting [Mask] represents the field path "user.profile.email". +// +// To parse the string representation back into a [FieldPath], use the +// [Parse] function followed by [Mask.ToFieldPath] method: +// +// m, err := mask.Parse(str) +// if err != nil { +// // Handle error +// } +// fieldPath, err := m.ToFieldPath() +// if err != nil { +// // Handle error +// } +// +// Returns: +// - string: A string representation of the path mask derived from the +// [FieldPath]. +// - error: An error, if any, encountered during the marshaling process. +func (fp FieldPath) Marshal() (string, error) { + m := fp.ToMask() + return m.Marshal() +} + +func (fp FieldPath) String() string { + ret, err := fp.Marshal() + if err != nil { + return "FieldPath" + } + return ret +} + +// MarshalText wraps [FieldPath.Marshal] to produce []byte instead of string. +func (fp FieldPath) MarshalText() ([]byte, error) { + ret, err := fp.Marshal() + if err != nil { + return nil, err + } + return []byte(ret), nil +} + +// UnmarshalText parses text as [Mask] and converts it to [FieldPath]. +func (fp *FieldPath) UnmarshalText(text []byte) error { + if fp == nil { + return errors.New("passed nil into unmarshal") + } + mask, err := Parse(string(text)) + if err != nil { + return err + } + *fp, err = mask.ToFieldPath() + return err +} diff --git a/fieldmask/mask/fieldpath_test.go b/fieldmask/mask/fieldpath_test.go new file mode 100644 index 0000000..a6e6bd8 --- /dev/null +++ b/fieldmask/mask/fieldpath_test.go @@ -0,0 +1,729 @@ +package mask + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFieldPath_Join(t *testing.T) { + t.Parallel() + cases := []struct { + A FieldPath + B FieldPath + R FieldPath + }{ + { + A: FieldPath{}, + B: FieldPath{}, + R: FieldPath{}, + }, + { + A: FieldPath{"foo"}, + B: FieldPath{}, + R: FieldPath{"foo"}, + }, + { + A: FieldPath{"foo", "bar"}, + B: FieldPath{}, + R: FieldPath{"foo", "bar"}, + }, + { + A: FieldPath{"foo", "bar"}, + B: FieldPath{"baz"}, + R: FieldPath{"foo", "bar", "baz"}, + }, + { + A: FieldPath{"foo"}, + B: FieldPath{"bar", "baz"}, + R: FieldPath{"foo", "bar", "baz"}, + }, + { + A: FieldPath{}, + B: FieldPath{"bar", "baz"}, + R: FieldPath{"bar", "baz"}, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + assert.Equal(t, c.R, c.A.Join(c.B...)) + }) + } +} + +func TestFieldPath_Parent(t *testing.T) { + t.Parallel() + cases := []struct { + A FieldPath + R FieldPath + }{ + { + A: FieldPath{}, + R: nil, + }, + { + A: FieldPath{"foo"}, + R: FieldPath{}, + }, + { + A: FieldPath{"foo", "bar"}, + R: FieldPath{"foo"}, + }, + { + A: FieldPath{"foo", "bar", "baz"}, + R: FieldPath{"foo", "bar"}, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + assert.Equal(t, c.R, c.A.Parent()) + }) + } +} + +func TestFieldPath_CopyEqualNew(t *testing.T) { + t.Parallel() + cases := []struct { + A FieldPath + }{ + { + A: FieldPath{}, + }, + { + A: FieldPath{"foo"}, + }, + { + A: FieldPath{"foo", "bar"}, + }, + { + A: FieldPath{"foo", "bar", "baz"}, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + cp := c.A.Copy() + assert.Equal(t, c.A, cp) + assert.Equal(t, c.A, NewFieldPath(c.A...)) + assert.True(t, c.A.Equal(cp)) + assert.True(t, cp.Equal(c.A)) + if len(c.A) > 0 { + c.A[0] = "changed" + assert.NotEqual(t, c.A, cp) + assert.False(t, c.A.Equal(cp)) + assert.False(t, cp.Equal(c.A)) + } + }) + } +} +func TestFieldPath_Equal(t *testing.T) { + t.Parallel() + paths := []FieldPath{ + {}, + {"foo"}, + {"bar"}, + {"foo", "foo"}, + {"foo", "bar"}, + {"foo", "baz"}, + {"foe", "bar"}, + {"foe", "baz"}, + {"foo", "bar", "baz"}, + {"foo", "bae", "baz"}, + {"foe", "bar", "baz"}, + {"foo", "bar", "bax"}, + {"foo", "foo", "bar"}, + {"foo", "foo", "baz"}, + {"foo", "foo", "foo"}, + } + for i, A := range paths { + for j, B := range paths { + t.Run(fmt.Sprintf("case %d %d", i, j), func(t *testing.T) { + t.Parallel() + assert.True(t, A.Equal(A)) //nolint:gocritic // we want to call with the same argument and receiver + assert.True(t, B.Equal(B)) //nolint:gocritic // we want to call with the same argument and receiver + if i == j { + assert.True(t, A.Equal(B)) + assert.True(t, B.Equal(A)) + } else { + assert.False(t, A.Equal(B)) + assert.False(t, B.Equal(A)) + } + }) + } + } +} + +func TestFieldPath_ToMask(t *testing.T) { + t.Parallel() + cases := []struct { + FP FieldPath + Res string + }{ + { + FP: FieldPath{}, + Res: "", + }, + { + FP: FieldPath{"foo"}, + Res: "foo", + }, + { + FP: FieldPath{"foo", "bar"}, + Res: "foo.bar", + }, + { + FP: FieldPath{"foo", "bar", "baz"}, + Res: "foo.bar.baz", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + m := c.FP.ToMask() + str, err := m.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Res, str) + }) + } +} + +func TestFieldPath_IsPrefixOf(t *testing.T) { + t.Parallel() + cases := []struct { + A FieldPath + B FieldPath + Res bool + }{ + { + A: FieldPath{}, + B: FieldPath{}, + Res: false, + }, + { + A: FieldPath{"foo"}, + B: FieldPath{}, + Res: false, + }, + { + A: FieldPath{"foo"}, + B: FieldPath{"bar"}, + Res: false, + }, + { + A: FieldPath{"foo", "baz"}, + B: FieldPath{"foo", "bar"}, + Res: false, + }, + { + A: FieldPath{"foo", "baz", "abc"}, + B: FieldPath{"foo", "bar", "abc", "def"}, + Res: false, + }, + { + A: FieldPath{"baz", "foo"}, + B: FieldPath{"bar", "foo", "abc", "def"}, + Res: false, + }, + { + A: FieldPath{"baz", "foo", "abc"}, + B: FieldPath{"bar", "foo", "abc", "def"}, + Res: false, + }, + { + A: FieldPath{"bar", "foo", ""}, + B: FieldPath{"bar", "foo", "abc", "def"}, + Res: false, + }, + { + A: FieldPath{}, + B: FieldPath{"foo"}, + Res: true, + }, + { + A: FieldPath{"bar"}, + B: FieldPath{"bar", "foo"}, + Res: true, + }, + { + A: FieldPath{"bar", "baz"}, + B: FieldPath{"bar", "baz", "foo"}, + Res: true, + }, + { + A: FieldPath{}, + B: FieldPath{"foo", "bar", "baz"}, + Res: true, + }, + { + A: FieldPath{"bar"}, + B: FieldPath{"bar", "foo", "baz"}, + Res: true, + }, + { + A: FieldPath{"bar", "baz"}, + B: FieldPath{"bar", "baz", "foo", "abc"}, + Res: true, + }, + { + A: FieldPath{"bar"}, + B: FieldPath{"bar", "baz", "foo", "abc"}, + Res: true, + }, + { + A: FieldPath{}, + B: FieldPath{"bar", "baz", "foo", "abc"}, + Res: true, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + res := c.A.IsPrefixOf(c.B) + assert.Equal(t, c.Res, res) + }) + } +} + +func TestFieldPath_MatchesResetMask(t *testing.T) { + t.Parallel() + cases := []struct { + FP FieldPath + M *Mask + Res bool + Final bool + }{ + { + FP: FieldPath{}, + M: nil, + }, + { + FP: FieldPath{"abc"}, + M: nil, + }, + { + FP: FieldPath{}, + M: &Mask{}, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{}, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "abc": {}, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "abc": { + Any: &Mask{}, + }, + }, + }, + Res: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + }, + }, + }, + }, + Res: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + }, + }, + "def": { + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + }, + }, + }, + }, + Res: true, + }, + { + FP: FieldPath{"abc", "foo"}, + M: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + "def": { + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc", "bar"}, + M: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": { + Any: &Mask{}, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + "def": { + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc", "bar"}, + M: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "bar": { + Any: &Mask{}, + }, + }, + }, + "def": { + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc", "bar"}, + M: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "abc": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + "def": { + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + Any: &Mask{}, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"abc"}, + M: &Mask{ + Any: &Mask{ + Any: &Mask{}, + }, + }, + Res: true, + }, + { + FP: FieldPath{"x"}, + M: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "x": { + FieldParts: map[FieldKey]*Mask{ + "y": New(), + }, + }, + }, + }, + Res: true, + Final: true, + }, + { + FP: FieldPath{"x"}, + M: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "y": New(), + }, + }, + FieldParts: map[FieldKey]*Mask{ + "x": {}, + }, + }, + Res: true, + Final: true, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + res := c.FP.MatchesResetMask(c.M) + resFinal := c.FP.MatchesResetMaskFinal(c.M) + assert.Equal(t, c.Res, res) + assert.Equal(t, c.Final, resFinal) + }) + } +} + +func TestFieldPath_MatchesSelectMask(t *testing.T) { + t.Parallel() + cases := []struct { + FP FieldPath + M *Mask + Res bool + Inner bool + }{ + { + FP: FieldPath{}, + M: nil, + Res: true, + }, + { + FP: FieldPath{"foo"}, + M: nil, + Res: true, + Inner: true, + }, + { + FP: FieldPath{"foo", "bar"}, + M: nil, + Res: true, + Inner: true, + }, + { + FP: FieldPath{"foo", "bar"}, + M: New(), + Res: true, + Inner: true, + }, + { + FP: FieldPath{"foo"}, + M: New(), + Res: true, + Inner: true, + }, + { + FP: FieldPath{}, + M: New(), + Res: true, + }, + { + FP: FieldPath{}, + M: ParseMust("a,b.c"), + Res: true, + }, + { + FP: FieldPath{"a"}, + M: ParseMust("a,b.c"), + Res: true, + }, + { + FP: FieldPath{"b"}, + M: ParseMust("a,b.c"), + Res: true, + }, + { + FP: FieldPath{"b", "c"}, + M: ParseMust("a,b.c"), + Res: true, + }, + { + FP: FieldPath{"b", "c", "d"}, + M: ParseMust("a,b.c"), + Res: true, + Inner: true, + }, + { + FP: FieldPath{"a", "c", "d"}, + M: ParseMust("a,b.c"), + Res: true, + Inner: true, + }, + { + FP: FieldPath{"b", "d"}, + M: ParseMust("a,b.c"), + }, + { + FP: FieldPath{"d"}, + M: ParseMust("a,b.c"), + }, + { + FP: FieldPath{"a", "d"}, + M: ParseMust("a.*"), + Res: true, + }, + { + FP: FieldPath{"a", "d", "e"}, + M: ParseMust("a.*"), + Res: true, + Inner: true, + }, + { + FP: FieldPath{"a", "d", "e"}, + M: ParseMust("a.*.c"), + }, + { + FP: FieldPath{"a", "d", "c"}, + M: ParseMust("a.*.c"), + Res: true, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + res := c.FP.MatchesSelectMask(c.M) + res2, inner := c.FP.MatchesSelectMaskInner(c.M) + assert.Equal(t, c.Res, res) + assert.Equal(t, c.Res, res2) + assert.Equal(t, c.Inner, inner) + }) + } +} + +func TestFieldPath_Marshal(t *testing.T) { + t.Parallel() + cases := []struct { + FP FieldPath + M string + Err string + }{ + { + FP: FieldPath{}, + M: "", + }, + { + FP: FieldPath{"foo"}, + M: "foo", + }, + { + FP: FieldPath{"foo", "bar"}, + M: "foo.bar", + }, + { + FP: FieldPath{"foo.bar"}, + M: "\"foo.bar\"", + }, + { + FP: FieldPath{"foo.bar", "baz"}, + M: "\"foo.bar\".baz", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + res, err := c.FP.Marshal() + r2, e2 := c.FP.MarshalText() + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.EqualError(t, e2, c.Err) + } else { + assert.NoError(t, err) + assert.NoError(t, e2) + assert.Equal(t, c.M, res) + assert.Equal(t, c.M, string(r2)) + } + }) + } +} + +func TestFieldPath_UnarshalText(t *testing.T) { + t.Parallel() + cases := []struct { + Mask string + NoStarter bool + Err string + Result FieldPath + }{ + { + NoStarter: true, + Err: "passed nil into unmarshal", + }, + { + Mask: "(", + Err: "unclosed left brace at position 0 near \"⃞(\"", + }, + { + Mask: "a,b", + Err: "multiple paths in the mask", + }, + { + Mask: "a.b", + Result: FieldPath{"a", "b"}, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + var s *FieldPath + if !c.NoStarter { + s = &FieldPath{} + } + err := s.UnmarshalText([]byte(c.Mask)) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.Equal(t, c.Result, *s) + } + }) + } +} diff --git a/fieldmask/mask/mask.go b/fieldmask/mask/mask.go new file mode 100644 index 0000000..e6b5aa7 --- /dev/null +++ b/fieldmask/mask/mask.go @@ -0,0 +1,670 @@ +package mask + +import ( + "errors" + "fmt" + "sort" + "strings" +) + +const recursionTooDeep = 1000 + +var ErrRecursionTooDeep = errors.New("recursion too deep") + +// Mask represents a mask structure used for pattern matching. +type Mask struct { + Any *Mask // Pointer to a wildcard mask. + FieldParts map[FieldKey]*Mask // Map of field keys to corresponding masks. +} + +// New creates a new [Mask] instance initialized with empty field parts map. +func New() *Mask { + return &Mask{ + FieldParts: map[FieldKey]*Mask{}, + } +} + +// IsEmpty checks if the [Mask] is empty, i.e., has no wildcard or field parts. +func (m *Mask) IsEmpty() bool { + if m.Any != nil { + return false + } + for _, p := range m.FieldParts { + if p != nil { + return false + } + } + return true +} + +func (m *Mask) toFieldPathRecursive(recursion int) (FieldPath, error) { + if recursion >= recursionTooDeep { + return nil, ErrRecursionTooDeep + } + recursion++ + if m.Any != nil { + return nil, errors.New("wildcard in the mask") + } + if len(m.FieldParts) == 0 { + return nil, nil + } + seen := false + ret := FieldPath{} + for k, v := range m.FieldParts { + if v != nil { + if seen { + return nil, errors.New("multiple paths in the mask") + } + seen = true + inner, err := v.toFieldPathRecursive(recursion) + if err != nil { + return nil, fmt.Errorf("%s: %w", k, err) + } + ret = append(ret, k) + ret = append(ret, inner...) + } + } + return ret, nil +} + +// ToFieldPath converts the [Mask] into a [FieldPath] if it represents a valid +// path to a single field. This method recursively transforms the Mask into a +// [FieldPath] if the mask represents only one field, ie it has no wildcards and +// has only one field at each level. +// +// Returns: +// - *FieldPath: A [FieldPath] representing the path to a single field. +// - error: An error if the [Mask] does not meet the criteria for a valid +// [FieldPath], such as having multiple parts at any level or containing +// wildcards. +func (m *Mask) ToFieldPath() (FieldPath, error) { + return m.toFieldPathRecursive(0) +} + +// IsFieldPath checks if the [Mask] represents a valid [FieldPath]. +// A [Mask] is considered a valid [FieldPath] if it represents a path to a +// single field, meaning it has at any level exactly one FieldPart and does not +// contain any wildcards. +// +// This function is a wrapper around [Mask.ToFieldPath] and requires deep +// traversal. +// +// Returns: +// - bool: True if the [Mask] corresponds to a valid [FieldPath] (path to a +// single field), otherwise false. +func (m *Mask) IsFieldPath() bool { + _, err := m.ToFieldPath() + return err == nil +} + +func appendMarshaler( + ret []string, + kMask string, + mask *Mask, + recursion int, +) ([]string, error) { + counter, vMask, err := mask.marshal(recursion + 1) + if err != nil { + return nil, fmt.Errorf("%s: %w", kMask, err) + } + switch { + case vMask == "": + ret = append(ret, kMask) + case counter == 1: + ret = append(ret, kMask+"."+vMask) + default: + ret = append(ret, kMask+".("+vMask+")") + } + return ret, nil +} + +func (m *Mask) marshal(recursion int) (int, string, error) { + if recursion >= recursionTooDeep { + return 0, "", ErrRecursionTooDeep + } + if m.Any == nil && len(m.FieldParts) == 0 { + return 0, "", nil + } + ret := []string{} + var err error + if m.Any != nil { + ret, err = appendMarshaler(ret, "*", m.Any, recursion) + if err != nil { + return 0, "", err + } + } + for k, v := range m.FieldParts { + if v == nil { + continue + } + kMask, err := k.Marshal() + if err != nil { + return 0, "", fmt.Errorf("%s: %w", k, err) + } + + ret, err = appendMarshaler(ret, kMask, v, recursion) + if err != nil { + return 0, "", err + } + } + sort.Strings(ret) + return len(ret), strings.Join(ret, ","), nil +} + +// Marshal generates a parseable string representation of the [Mask]. +// It recursively constructs a string that represents the structure of the +// [Mask] suitable for parsing back into a [Mask]. +func (m *Mask) Marshal() (string, error) { + _, ret, err := m.marshal(0) + return ret, err +} + +// MarshalText runs [Mask.Marshal] and converts string to []byte. +func (m *Mask) MarshalText() ([]byte, error) { + ret, err := m.Marshal() + if err != nil { + return nil, err + } + return []byte(ret), nil +} + +// UnmarshalText runs [Parse] against input text as string and then replaces +// current mask with the results. If the result is nil, it will clear the mask. +func (m *Mask) UnmarshalText(text []byte) error { + if m == nil { + return errors.New("mask not initialized") + } + ret, err := Parse(string(text)) + if err != nil { + return err + } + if ret == nil { + m.Any = nil + m.FieldParts = map[FieldKey]*Mask{} + } else { + m.Any = ret.Any + m.FieldParts = ret.FieldParts + } + return nil +} + +// String returns a string representation of the [Mask] for visualization +// purposes. It generates a human-readable representation of the [Mask] +// structure, providing a meaningful display of the [Mask]'s content. +func (m *Mask) String() string { + ret, err := m.Marshal() + if err != nil { + return "Mask" + } + return "Mask<" + ret + ">" +} + +func (m *Mask) copyRecursive(recursion int) (*Mask, error) { + if m == nil { + return nil, nil + } + if recursion >= recursionTooDeep { + return nil, ErrRecursionTooDeep + } + recursion++ + ret := New() + if m.Any != nil { + mask, err := m.Any.copyRecursive(recursion) + if err != nil { + return nil, fmt.Errorf("*: %w", err) + } + ret.Any = mask + } + if len(m.FieldParts) > 0 { + for k, v := range m.FieldParts { + mask, err := v.copyRecursive(recursion) + if err != nil { + return nil, fmt.Errorf("%s: %w", k, err) + } + if mask != nil { + ret.FieldParts[k] = mask + } + } + } + return ret, nil +} + +// Copy creates a deep copy of the [Mask], including all its wildcard and field +// parts. It recursively copies the structure of the Mask to produce an +// independent replica. +func (m *Mask) Copy() (*Mask, error) { + return m.copyRecursive(0) +} + +func (m *Mask) mergeRecursive(with *Mask, recursion int) error { //nolint:gocognit + if recursion >= recursionTooDeep { + return ErrRecursionTooDeep + } + recursion++ + if with == nil || with.IsEmpty() { + return nil + } + if m.Any != nil { + err := m.Any.mergeRecursive(with.Any, recursion) + if err != nil { + return fmt.Errorf("*:M %w", err) + } + } else if with.Any != nil { + mask, err := with.Any.copyRecursive(recursion) + if err != nil { + return fmt.Errorf("*:C %w", err) + } + m.Any = mask + } + if m.FieldParts == nil { + m.FieldParts = map[FieldKey]*Mask{} + } + if len(with.FieldParts) > 0 { + for k, v := range m.FieldParts { + if part, ok := with.FieldParts[k]; ok && v != nil { + err := v.mergeRecursive(part, recursion) + if err != nil { + return fmt.Errorf("%s:M %w", k, err) + } + } + } + for k, v := range with.FieldParts { + if m.FieldParts[k] == nil { + mask, err := v.copyRecursive(recursion) + if err != nil { + return fmt.Errorf("%s:C %w", k, err) + } + if mask != nil { + m.FieldParts[k] = mask + } else { + delete(m.FieldParts, k) + } + } + } + } + return nil +} + +// Merge combines the current [Mask] with another [Mask] by merging their +// structures. It recursively merges the [Mask] with another [Mask], combining +// their field parts and wildcard. +func (m *Mask) Merge(with *Mask) error { + return m.mergeRecursive(with, 0) +} + +func (m *Mask) equalRecursive(to *Mask, recursion int) bool { + if recursion >= recursionTooDeep { + return false + } + recursion++ + if m == nil || to == nil { + return to == m + } + if !m.Any.equalRecursive(to.Any, recursion) { + return false + } + mfp := m.FieldParts + tfp := to.FieldParts + for k, v := range mfp { + if !v.equalRecursive(tfp[k], recursion) { + return false + } + } + for k, v := range tfp { + if _, ok := mfp[k]; !ok && v != nil { + return false + } + } + return true +} + +// GetSubMask retrieves the full field mask for the specified [FieldKey] +// from the [Mask], optionally merged with the wildcard mask (m.Any) if +// available. +// +// If a mask associated with the [FieldKey] is found in the [Mask]'s FieldParts +// map, it is returned. If no mask is found for the [FieldKey], the method +// returns the wildcard mask (m.Any) if available. +// +// If both a specific mask and the wildcard mask (m.Any) are present, the method +// creates a copy of the specific mask and merges it with the wildcard mask +// using the Merge method. +// +// Note: may return direct link instead of copying. +// +// Parameters: +// - key: The [FieldKey] for which the full field mask is requested. +// +// Returns: +// - *Mask: The full field mask associated with the specified FieldKey, +// possibly merged with m.Any. +// - error: An error if there was any issue copying or merging the masks. +func (m *Mask) GetSubMask(key FieldKey) (*Mask, error) { + if m == nil { + return nil, nil + } + ret := m.FieldParts[key] + if ret == nil { + return m.Any, nil + } + if m.Any != nil { + cp, err := ret.Copy() + if err != nil { + return nil, fmt.Errorf("failed to copy key mask: %w", err) + } + if err := cp.Merge(m.Any); err != nil { + return nil, fmt.Errorf( + "failed to merge key mask with wildcard mask: %w", + err, + ) + } + ret = cp + } + return ret, nil +} + +// GetSubMaskByPath retrieves the sub-mask at the specified [FieldPath] from the +// [Mask]. +// +// The GetSubMaskByPath method traverses the [Mask] structure based on the given +// [FieldPath] to retrieve the sub-mask located at that path. It combines +// wildcard masks (if present, using Any) matching the path with direct masks to +// ensure correct retrieval of nested masks. +// +// Example: +// +// mask := ParseMust("user.*.telegram,user.profile.email") +// +// path := NewFieldPath("user", "profile") +// subMask, err := mask.GetSubMaskByPath(path) +// if err != nil { +// // Handle error +// } +// +// The subMask variable in the example above would represent the Mask structure +// corresponding to the "user.profile" path within the original Mask with both +// email and telegram fields. +// +// Note: may return direct link instead of copying. +// +// Parameters: +// - path: The [FieldPath] indicating the path to the desired sub-mask. +// +// Returns: +// - *Mask: The sub-mask located at the specified [FieldPath] within the +// [Mask]. +// - error: An error, if any, encountered during the retrieval process. +// This could occur if the specified path is not found or if there +// are any issues accessing nested masks along the path. +func (m *Mask) GetSubMaskByPath(path FieldPath) (*Mask, error) { + sub := m + var err error + for i, k := range path { + sub, err = sub.GetSubMask(k) + if err != nil { + return nil, fmt.Errorf("failed to get field mask at path %s: %w", path[0:i], err) + } + if sub == nil { + return nil, nil + } + } + return sub, nil +} + +// Equal checks if the current [Mask] is equal to another [Mask] by comparing +// their structures. It recursively compares the [Mask] with another Mask to +// determine if they are identical. +func (m *Mask) Equal(to *Mask) bool { + return m.equalRecursive(to, 0) +} + +func (m *Mask) intersectRMRecursive( //nolint:gocognit // TODO: simplify? + other *Mask, + recursion int, +) (*Mask, error) { + if recursion >= recursionTooDeep { + return nil, ErrRecursionTooDeep + } + recursion++ + if m == nil || other == nil { + return nil, nil + } + ret := &Mask{ + FieldParts: map[FieldKey]*Mask{}, + } + inner, err := m.Any.intersectRMRecursive(other.Any, recursion) + if err != nil { + return nil, fmt.Errorf("*×*: %w", err) + } + ret.Any = inner + + if other.Any != nil { + for k, v := range m.FieldParts { + inner, err := v.intersectRMRecursive(other.Any, recursion) + if err != nil { + return nil, fmt.Errorf("%s×*: %w", k, err) + } + if inner != nil { + ret.FieldParts[k] = inner + } + } + } + + if m.Any != nil { + for k, v := range other.FieldParts { + inner, err := m.Any.intersectRMRecursive(v, recursion) + if err != nil { + return nil, fmt.Errorf("*×%s: %w", k, err) + } + if inner != nil { + if err := inner.Merge(ret.FieldParts[k]); err != nil { + return nil, fmt.Errorf("*×%s: Merge: %w", k, err) + } + ret.FieldParts[k] = inner + } + } + } + + for k, v := range m.FieldParts { + inner, err := v.intersectRMRecursive(other.FieldParts[k], recursion) + if err != nil { + return nil, fmt.Errorf("%s×%s: %w", k, k, err) + } + if inner != nil { + if err := inner.Merge(ret.FieldParts[k]); err != nil { + return nil, fmt.Errorf("%s×%s: Merge: %w", k, k, err) + } + ret.FieldParts[k] = inner + } + } + + return ret, nil +} + +// IntersectResetMask creates arithmetic intersection of two reset masks. +// +// This function recursively intersects all the fields and wildcards in masks +// and returns the new mask containing only fields included in both. +// It also checks for wildcards when working with named fields. +// +// Intersection of two masks is essentially their applications composition. +// +// Parameters: +// - other *[Mask]: the mask to intersect with. +// +// Returns: +// - *[Mask]: the new mask representing intersection between two masks. +// - error: An error that may appear during intersection process. +func (m *Mask) IntersectResetMask(other *Mask) (*Mask, error) { + return m.intersectRMRecursive(other, 0) +} + +func (m *Mask) intersectDumbRecursive( + other *Mask, + recursion int, +) (*Mask, error) { + if recursion >= recursionTooDeep { + return nil, ErrRecursionTooDeep + } + recursion++ + if m == nil || other == nil { + return nil, nil + } + ret := &Mask{ + FieldParts: map[FieldKey]*Mask{}, + } + inner, err := m.Any.intersectDumbRecursive(other.Any, recursion) + if err != nil { + return nil, fmt.Errorf("*: %w", err) + } + ret.Any = inner + + for k, v := range m.FieldParts { + inner, err := v.intersectDumbRecursive(other.FieldParts[k], recursion) + if err != nil { + return nil, fmt.Errorf("%s: %w", k, err) + } + if inner != nil { + ret.FieldParts[k] = inner + } + } + + return ret, nil +} + +// IntersectDumb creates arithmetic intersection of two masks. +// +// This function recursively intersects all the fields and wildcards in masks +// and returns the new mask containing only fields included in both. +// +// Unlike [Mask.IntersectResetMask], this function doesn't cross-check wildcards +// while intersecting named fields. +// +// Parameters: +// - other *[Mask]: the mask to intersect with. +// +// Returns: +// - *[Mask]: the new mask representing intersection between two masks. +// - error: An error that may appear during intersection process. +func (m *Mask) IntersectDumb(other *Mask) (*Mask, error) { + return m.intersectDumbRecursive(other, 0) +} + +func (m *Mask) subtractRecursive(other *Mask, recursion int) error { + if recursion >= recursionTooDeep { + return ErrRecursionTooDeep + } + recursion++ + + if m == nil || other == nil { + return nil + } + if m.Any != nil && other.Any != nil { + if err := m.Any.subtractRecursive(other.Any, recursion); err != nil { + return fmt.Errorf("*: %w", err) + } + if m.Any.IsEmpty() { + m.Any = nil + } + } + for k, v := range m.FieldParts { + if v == nil { + delete(m.FieldParts, k) + } + if o := other.FieldParts[k]; o != nil { + if err := v.subtractRecursive(o, recursion); err != nil { + return fmt.Errorf("%s: %w", k, err) + } + if v.IsEmpty() { + delete(m.FieldParts, k) + } + } + } + + return nil +} + +// SubtractDumb subtracts other [Mask] from this one. +// +// This function recursively removes fields existing in both masks. If the field +// exists in both and is empty after recursion it is being removed. +// +// Wild cards are subtracted separately without cross-action on named fields. +// +// Note: subtraction is done in-place. +// +// Parameters: +// - other *[Mask]: the mask being subtracted. +// +// Returns: +// - error: An error that may appear during intersection process. +func (m *Mask) SubtractDumb(other *Mask) error { + return m.subtractRecursive(other, 0) +} + +func (m *Mask) subtractResetRecursive(other *Mask, recursion int) error { //nolint:gocognit + if recursion >= recursionTooDeep { + return ErrRecursionTooDeep + } + recursion++ + + if m == nil || other == nil { + return nil + } + + if m.Any != nil && other.Any != nil { + err := m.Any.subtractResetRecursive(other.Any, recursion) + if err != nil { + return fmt.Errorf("*\\*: %w", err) + } + if m.Any.IsEmpty() { + m.Any = nil + } + } + for k, v := range m.FieldParts { + if v == nil { + delete(m.FieldParts, k) + } + if other.Any == nil && other.FieldParts[k] == nil { + continue + } + if other.Any != nil { + err := v.subtractResetRecursive(other.Any, recursion) + if err != nil { + return fmt.Errorf("%s\\*: %w", k, err) + } + } + if other.FieldParts[k] != nil { + err := v.subtractResetRecursive(other.FieldParts[k], recursion) + if err != nil { + return fmt.Errorf("%s\\%s: %w", k, k, err) + } + } + if v.IsEmpty() { + delete(m.FieldParts, k) + } + } + + return nil +} + +// SubtractResetMask subtracts other [Mask] from this one according to +// ResetMask logic. +// +// This function recursively removes fields existing in both masks. If the field +// exists in both and is empty after recursive subtraction, it is being +// removed. +// +// Wild cards are subtracted both from the original wildcard and from each of +// the named fields. +// +// Note: subtraction is done in-place. +// +// Parameters: +// - other *[Mask]: the mask being subtracted. +// +// Returns: +// - error: An error that may appear during intersection process. +func (m *Mask) SubtractResetMask(other *Mask) error { + return m.subtractResetRecursive(other, 0) +} diff --git a/fieldmask/mask/mask_test.go b/fieldmask/mask/mask_test.go new file mode 100644 index 0000000..099d3bf --- /dev/null +++ b/fieldmask/mask/mask_test.go @@ -0,0 +1,2514 @@ +package mask + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMask_IsEmpty(t *testing.T) { + t.Parallel() + t.Run("new mask", func(t *testing.T) { + t.Parallel() + mask := New() + assert.True(t, mask.IsEmpty()) + }) + t.Run("default mask", func(t *testing.T) { + t.Parallel() + mask := &Mask{} + assert.True(t, mask.IsEmpty()) + }) + t.Run("mask with empty map", func(t *testing.T) { + t.Parallel() + mask := &Mask{ + FieldParts: map[FieldKey]*Mask{}, + } + assert.True(t, mask.IsEmpty()) + }) + t.Run("has any", func(t *testing.T) { + t.Parallel() + mask := &Mask{ + Any: New(), + } + assert.False(t, mask.IsEmpty()) + }) + t.Run("has key", func(t *testing.T) { + t.Parallel() + mask := &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + } + assert.False(t, mask.IsEmpty()) + }) +} + +func TestMask_Marshal(t *testing.T) { + t.Parallel() + infiniteMask := New() + infiniteMask.Any = infiniteMask + infiniteMaskError := strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep" + cases := []struct { + Mask *Mask + Err string + Result string + }{ + { + Mask: New(), + Result: "", + }, + { + Mask: &Mask{}, + Result: "", + }, + { + Mask: infiniteMask, + Err: "*: " + infiniteMaskError, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": infiniteMask, + }, + }, + Err: "test: " + infiniteMaskError, + }, + { + Mask: &Mask{ + Any: New(), + }, + Result: "*", + }, + { + Mask: &Mask{ + Any: &Mask{}, + }, + Result: "*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + Result: "test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": nil, + }, + }, + Result: "", + }, + { + Mask: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + Result: "*,test", + }, + { + Mask: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "nil": nil, + }, + }, + Result: "*,test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "foo": New(), + }, + }, + Result: "foo,test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "foo": New(), + "nil": nil, + }, + }, + Result: "foo,test", + }, + { + Mask: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "foo": New(), + }, + }, + Result: "*,foo,test", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + }, + }, + Result: "*.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + }, + Result: "*.(*,test)", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + }, + Result: "*.(*,test.*)", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + }, + Result: "*.test.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + Any: New(), + }, + }, + }, + Result: "*.*.*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + Result: "test.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + }, + Result: "*.test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + Result: "test.*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: "test.inner", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + "nil": nil, + }, + }, + }, + }, + Result: "test.inner", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test.inner": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test.inner".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test,inner": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test,inner".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test(inner)": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test(inner)".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + `"test"`: {}, + }, + }, + Result: `"\"test\""`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: {}, + }, + }, + Result: `"\"test\"",*`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `",.() ` + "\t\r\n": {}, + }, + }, + Result: "\"\\\",.() \\t\\r\\n\",*", + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"\"test\"".inner,*`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + "*": New(), + }, + }, + }, + }, + Result: `"\"test\"".("*",inner),*`, + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + "c": { + Any: &Mask{}, + }, + "d": { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + "f": {}, + "nil": nil, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "h": {}, + "i": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "j": {}, + "nil": nil, + "k": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "m": {}, + "n": { + Any: &Mask{}, + }, + "o": { + FieldParts: map[FieldKey]*Mask{ + "p": {}, + "q": {}, + "nil": nil, + }, + }, + "r": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "s": {}, + "t": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + }, + }, + }, + }, + Result: "*.*.(a,b,c.*,d.(e,f),g.(*.(h,i),j,k)),l,m,n.*,o.(p,q),r.(*.(s,t),u.*,v)", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + `"b"`: {}, + "nil": nil, + `"c"`: { + Any: &Mask{}, + }, + `"d"`: { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + `"f"`: {}, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + `"h"`: {}, + "i": {}, + "nil": nil, + }, + }, + FieldParts: map[FieldKey]*Mask{ + `"j"`: {}, + "k": {}, + "nil": nil, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "m": {}, + "nil": nil, + "n": { + Any: &Mask{}, + }, + `"o"`: { + FieldParts: map[FieldKey]*Mask{ + `"p"`: {}, + "q": {}, + "*": {}, + }, + }, + "r": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "s": {}, + "t": {}, + "*": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + "*": {}, + }, + }, + }, + }, + Result: `"\"o\"".("*","\"p\"",q),*.*.("\"b\"","\"c\"".*,"\"d\"".("\"f\"",e),a,g.("\"j\"",*.("\"h\"",i),k)),l,m,n.*,r.("*",*.("*",s,t),u.*,v)`, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + str, err := c.Mask.Marshal() + bb, err2 := c.Mask.MarshalText() + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.EqualError(t, err2, c.Err) + } else { + assert.NoError(t, err) + assert.NoError(t, err2) + assert.Equal(t, c.Result, str) + assert.Equal(t, c.Result, string(bb)) + } + }) + } +} + +func TestMask_UnmarshalText(t *testing.T) { + t.Parallel() + cases := []struct { + Mask string + NoStarter bool + Err string + Result *Mask + }{ + { + NoStarter: true, + Err: "mask not initialized", + }, + { + Mask: "(", + Err: "unclosed left brace at position 0 near \"⃞(\"", + }, + { + Mask: "", + Result: &Mask{}, + }, + { + Mask: "a", + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + }, + }, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + var m *Mask + if !c.NoStarter { + m = &Mask{} + } + err := m.UnmarshalText([]byte(c.Mask)) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.True(t, c.Result.Equal(m), "not equal:", m, c.Result) + } + }) + } +} + +func TestMask_Equal(t *testing.T) { + t.Parallel() + someMask := &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + "test": {}, + }, + } + copyMask, err := someMask.Copy() + assert.NoError(t, err) + t.Run("equals", func(t *testing.T) { + t.Parallel() + cases := []struct { + A *Mask + B *Mask + }{ + { + A: New(), + B: New(), + }, + { + A: &Mask{}, + B: New(), + }, + { + A: someMask, + B: someMask, + }, + { + A: someMask, + B: copyMask, + }, + { + A: someMask, + B: copyMask, + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{ + Any: New(), + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": New()}, + }, + }, + { + A: &Mask{ + FieldParts: nil, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{}, + }, + }, + { + A: &Mask{ + Any: someMask, + }, + B: &Mask{ + Any: someMask, + }, + }, + { + A: &Mask{ + Any: someMask, + }, + B: &Mask{ + Any: copyMask, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + }, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": copyMask, + }, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + "foo": nil, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": copyMask, + }, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + "foo": nil, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": copyMask, + "bar": nil, + }, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": nil, + }, + }, + }, + { + A: &Mask{ + FieldParts: nil, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": nil, + }, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": nil, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": nil, + }, + }, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + t.Run(name, func(t *testing.T) { + t.Parallel() + assert.True(t, c.A.Equal(c.B)) + assert.True(t, c.B.Equal(c.A)) + }) + } + }) + t.Run("not equals", func(t *testing.T) { + t.Parallel() + infiniteMask := New() + infiniteMask.Any = infiniteMask + cases := []struct { + A *Mask + B *Mask + }{ + { + A: infiniteMask, + B: infiniteMask, + }, + { + A: &Mask{}, + B: infiniteMask, + }, + { + A: someMask, + B: infiniteMask, + }, + { + A: someMask, + B: &Mask{}, + }, + { + A: someMask, + B: New(), + }, + { + A: &Mask{ + Any: nil, + }, + B: &Mask{ + Any: &Mask{}, + }, + }, + { + A: &Mask{}, + B: &Mask{ + Any: &Mask{}, + }, + }, + { + A: &Mask{ + FieldParts: nil, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{}, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": nil}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{"foo": someMask}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": {}}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{"foo": someMask}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + }, + { + A: &Mask{ + Any: someMask, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + }, + { + A: &Mask{ + Any: someMask, + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + "foo": someMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + }, + { + A: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + "test": someMask, + "foo": someMask, + }, + }, + B: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{"test": someMask}, + }, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + t.Run(name, func(t *testing.T) { + t.Parallel() + assert.False(t, c.A.Equal(c.B)) + assert.False(t, c.B.Equal(c.A)) + }) + } + }) +} + +func TestMask_Copy(t *testing.T) { + t.Parallel() + t.Run("simple", func(t *testing.T) { + infiniteMask := New() + infiniteMask.Any = infiniteMask + infiniteMaskError := strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep" + cases := []struct { + Mask *Mask + Err string + Result string + }{ + { + Mask: New(), + Result: "", + }, + { + Mask: &Mask{}, + Result: "", + }, + { + Mask: infiniteMask, + Err: "*: " + infiniteMaskError, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": infiniteMask, + }, + }, + Err: "test: " + infiniteMaskError, + }, + { + Mask: &Mask{ + Any: New(), + }, + Result: "*", + }, + { + Mask: &Mask{ + Any: &Mask{}, + }, + Result: "*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + Result: "test", + }, + { + Mask: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + Result: "*,test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "foo": New(), + }, + }, + Result: "foo,test", + }, + { + Mask: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + "foo": New(), + }, + }, + Result: "*,foo,test", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + }, + }, + Result: "*.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + }, + Result: "*.(*,test)", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: New(), + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + }, + Result: "*.(*,test.*)", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + }, + Result: "*.test.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + Any: New(), + }, + }, + }, + Result: "*.*.*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + Result: "test.*", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": New(), + }, + }, + }, + Result: "*.test", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + Any: New(), + }, + }, + }, + Result: "test.*", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: "test.inner", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test.inner": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test.inner".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test,inner": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test,inner".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test(inner)": { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"test(inner)".inner`, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + `"test"`: {}, + }, + }, + Result: `"\"test\""`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: {}, + }, + }, + Result: `"\"test\"",*`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + }, + }, + }, + }, + Result: `"\"test\"".inner,*`, + }, + { + Mask: &Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + `"test"`: { + FieldParts: map[FieldKey]*Mask{ + "inner": New(), + "*": New(), + }, + }, + }, + }, + Result: `"\"test\"".("*",inner),*`, + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + "c": { + Any: &Mask{}, + }, + "d": { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + "f": {}, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "h": {}, + "i": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "j": {}, + "k": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "m": {}, + "n": { + Any: &Mask{}, + }, + "o": { + FieldParts: map[FieldKey]*Mask{ + "p": {}, + "q": {}, + }, + }, + "r": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "s": {}, + "t": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + }, + }, + }, + }, + Result: "*.*.(a,b,c.*,d.(e,f),g.(*.(h,i),j,k)),l,m,n.*,o.(p,q),r.(*.(s,t),u.*,v)", + }, + { + Mask: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + `"b"`: {}, + `"c"`: { + Any: &Mask{}, + }, + `"d"`: { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + `"f"`: {}, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + `"h"`: {}, + "i": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + `"j"`: {}, + "k": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "m": {}, + "n": { + Any: &Mask{}, + }, + `"o"`: { + FieldParts: map[FieldKey]*Mask{ + `"p"`: {}, + "q": {}, + "*": {}, + }, + }, + "r": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "s": {}, + "t": {}, + "*": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + "*": {}, + }, + }, + }, + }, + Result: `"\"o\"".("*","\"p\"",q),*.*.("\"b\"","\"c\"".*,"\"d\"".("\"f\"",e),a,g.("\"j\"",*.("\"h\"",i),k)),l,m,n.*,r.("*",*.("*",s,t),u.*,v)`, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + mask, err := c.Mask.Copy() + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + str, err := mask.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Result, str) + } + }) + } + }) + t.Run("deeptest", func(t *testing.T) { + t.Parallel() + mask := Mask{ + Any: &Mask{}, + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + "bar": nil, // should be removed in copy + }, + } + cp, err := mask.Copy() + assert.NoError(t, err) + _, ok := cp.FieldParts["bar"] + assert.False(t, ok) + str1, err := cp.Marshal() + assert.NoError(t, err) + mask.Any.Any = &Mask{} + str2, err := cp.Marshal() + assert.NoError(t, err) + assert.Equal(t, str1, str2) + mask.FieldParts["a"] = &Mask{} + str3, err := cp.Marshal() + assert.NoError(t, err) + assert.Equal(t, str1, str3) + mask.FieldParts["foo"].Any = &Mask{} + str4, err := cp.Marshal() + assert.NoError(t, err) + assert.Equal(t, str1, str4) + }) +} + +func TestMask_Merge(t *testing.T) { + t.Parallel() + infMask := New() + infMask.Any = infMask + infiniteMaskSrc := New() + infiniteMaskSrc.Any = infiniteMaskSrc + cases := []struct { + A *Mask + B *Mask + Err string + Result string + }{ + { + A: infiniteMaskSrc, + B: infMask, + Err: "*:M " + strings.Repeat("*:M ", recursionTooDeep-1) + "recursion too deep", + }, + { + A: &Mask{}, + B: infMask, + Err: "*:C " + strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep", + }, + { + A: &Mask{}, + B: &Mask{ + Any: infMask, + }, + Err: "*:C " + strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep", + }, + { + A: &Mask{}, + B: &Mask{}, + Result: "", + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{}, + Result: "*", + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{ + Any: &Mask{}, + }, + Result: "*", + }, + { + A: &Mask{ + Any: &Mask{ + Any: &Mask{}, + }, + }, + B: &Mask{ + Any: &Mask{}, + }, + Result: "*.*", + }, + { + B: &Mask{ + Any: &Mask{ + Any: &Mask{}, + }, + }, + A: &Mask{ + Any: &Mask{}, + }, + Result: "*.*", + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": {}, + }, + }, + Result: "*,test", + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": {}, + "nil": nil, + }, + }, + Result: "*,test", + }, + { + A: &Mask{ + Any: &Mask{}, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "nil": nil, + }, + }, + Result: "*", + }, + { + A: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + "c": { + Any: &Mask{}, + }, + "d": { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + "f": {}, + "nil": nil, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "h": {}, + "i": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "j": {}, + "nil": nil, + "k": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "m": {}, + "n": { + Any: &Mask{}, + }, + "o": { + FieldParts: map[FieldKey]*Mask{ + "p": {}, + "q": {}, + "nil": nil, + }, + }, + "r": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "s": {}, + "t": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + }, + }, + }, + }, + B: &Mask{ + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + "c": { + Any: &Mask{}, + }, + "d": { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + "f": {}, + "nil": nil, + }, + }, + "g": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "h": {}, + "i": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "j": {}, + "nil": nil, + "k": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "l": {}, + "A": {}, + "B": {}, + "1": {}, + "o": { + FieldParts: map[FieldKey]*Mask{ + "w": {}, + "x": {}, + "nil": nil, + }, + }, + "z": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "y": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "u": { + Any: &Mask{}, + }, + "v": {}, + }, + }, + }, + }, + Result: "*.*.(a,b,c.*,d.(e,f),g.(*.(h,i),j,k)),1,A,B,l,m,n.*,o.(p,q,w,x),r.(*.(s,t),u.*,v),z.(*.y,u.*,v)", + }, + { + A: &Mask{}, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "inf": infMask, + }, + }, + Err: "inf:C " + strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep", + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "inf": {}, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "inf": infMask, + }, + }, + Err: "inf:M *:C " + strings.Repeat("*: ", recursionTooDeep-2) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + err := c.A.Merge(c.B) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + str, err := c.A.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Result, str) + } + }) + } +} + +func TestMask_String(t *testing.T) { + t.Parallel() + + infMask := New() + infMask.Any = infMask + cases := []struct { + Mask *Mask + Result string + }{ + { + Mask: infMask, + Result: "Mask", + }, + { + Mask: &Mask{}, + Result: "Mask<>", + }, + { + Mask: New(), + Result: "Mask<>", + }, + { + Mask: &Mask{ + Any: &Mask{}, + }, + Result: "Mask<*>", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "test": {}, + }, + }, + Result: "Mask", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "c": { + Any: &Mask{}, + }, + "d": {}, + }, + }, + Result: "Mask<*.(a,b),c.*,d>", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + t.Run(name, func(t *testing.T) { + t.Parallel() + assert.Equal(t, c.Result, c.Mask.String()) + }) + } +} + +func TestMask_ToFieldPath(t *testing.T) { + t.Parallel() + infMask := New() + infMask.FieldParts["x"] = infMask + cases := []struct { + Mask *Mask + Err string + Result FieldPath + }{ + { + Mask: &Mask{}, + Result: nil, + }, + { + Mask: infMask, + Err: strings.Repeat("x: ", recursionTooDeep) + "recursion too deep", + }, + { + Mask: &Mask{ + Any: &Mask{}, + }, + Err: "wildcard in the mask", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + "bar": {}, + }, + }, + Err: "multiple paths in the mask", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": { + Any: &Mask{}, + }, + }, + }, + Err: "foo: wildcard in the mask", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + "baz": {}, + }, + }, + }, + }, + Err: "foo: multiple paths in the mask", + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": {}, + }, + }, + Result: FieldPath{ + "foo", + }, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Result: FieldPath{ + "foo", + "bar", + }, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + fp, err := c.Mask.ToFieldPath() + isFp := c.Mask.IsFieldPath() + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.False(t, isFp) + } else { + assert.NoError(t, err) + assert.Equal(t, c.Result, fp) + assert.True(t, isFp) + } + }) + } +} + +func TestMask_GetSubMask(t *testing.T) { + t.Parallel() + infMask := New() + infMask.FieldParts["x"] = infMask + cases := []struct { + Mask *Mask + Key FieldKey + Err string + Result *Mask + }{ + { + Mask: &Mask{}, + Key: "foo", + Result: nil, + }, + { + Mask: nil, + Key: "foo", + Result: nil, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + Key: "foo", + Result: nil, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Key: "foo", + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{}, + }, + Key: "foo", + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Key: "foo", + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Key: "foo", + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + "baz": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": infMask, + }, + }, + }, + }, + Key: "foo", + Err: "failed to copy key mask: bar: " + strings.Repeat("x: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": infMask, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Key: "foo", + Err: "failed to merge key mask with wildcard mask: baz:C " + strings.Repeat("x: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + fm, err := c.Mask.GetSubMask(c.Key) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + if c.Result == nil { + assert.Nil(t, fm) + } else { + assert.True(t, c.Result.Equal(fm), "not equal", fm, c.Result) + } + } + }) + } +} + +func TestMask_GetSubMaskByPath(t *testing.T) { + t.Parallel() + infMask := New() + infMask.FieldParts["x"] = infMask + cases := []struct { + Mask *Mask + Path FieldPath + Err string + Result *Mask + }{ + { + Mask: &Mask{}, + Path: FieldPath{"foo"}, + Result: nil, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + Path: FieldPath{"foo"}, + Result: nil, + }, + { + Mask: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Path: FieldPath{"foo"}, + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{}, + }, + Path: FieldPath{"foo"}, + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Path: FieldPath{"foo"}, + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Path: FieldPath{"foo"}, + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + "baz": {}, + }, + }, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": infMask, + }, + }, + }, + }, + Path: FieldPath{"foo"}, + Err: "failed to get field mask at path : failed to copy key mask: bar: " + strings.Repeat("x: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": infMask, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Path: FieldPath{"foo"}, + Err: "failed to get field mask at path : failed to merge key mask with wildcard mask: baz:C " + strings.Repeat("x: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "baz": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + FieldParts: map[FieldKey]*Mask{ + "bar": {}, + }, + }, + }, + }, + Path: FieldPath{"foo", "bar", "baz"}, + Result: nil, + }, + { + Mask: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "bar": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "baz": { + FieldParts: map[FieldKey]*Mask{ + "b": {}, + }, + }, + "other": { + FieldParts: map[FieldKey]*Mask{ + "nope": {}, + }, + }, + }, + }, + "hey": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "never": {}, + }, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "foo": { + Any: &Mask{ + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "f": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "baz": { + FieldParts: map[FieldKey]*Mask{ + "c": {}, + }, + }, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "bar": { + Any: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "d": {}, + }, + }, + FieldParts: map[FieldKey]*Mask{ + "baz": { + FieldParts: map[FieldKey]*Mask{ + "e": {}, + }, + }, + }, + }, + }, + }, + }, + }, + Path: FieldPath{"foo", "bar", "baz"}, + Result: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "a": {}, + "b": {}, + "c": {}, + "d": {}, + "e": {}, + "f": {}, + }, + }, + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + fm, err := c.Mask.GetSubMaskByPath(c.Path) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + if c.Result == nil { + assert.Nil(t, fm) + } else { + assert.True(t, c.Result.Equal(fm), "not equal", fm, c.Result) + } + } + }) + } +} + +func TestMask_IntersectDumb(t *testing.T) { + t.Parallel() + infiMask := &Mask{} + infiMask.Any = infiMask + cases := []struct { + A *Mask + B *Mask + Res *Mask + Err string + }{ + { + A: nil, + B: nil, + Res: nil, + }, + { + A: &Mask{}, + B: nil, + Res: nil, + }, + { + A: nil, + B: &Mask{}, + Res: nil, + }, + { + A: ParseMust("*.(a,b),x,y"), + B: ParseMust("*.(a,b),x,y"), + Res: ParseMust("*.(a,b),x,y"), + }, + { + A: ParseMust("a"), + B: ParseMust("*"), + Res: ParseMust(""), + }, + { + A: ParseMust("*.(a,b),x,y"), + B: ParseMust("*.(x,y),z,f"), + Res: ParseMust("*"), + }, + { + A: ParseMust("*.(a,b),x,y"), + B: ParseMust("*.(a,y),x,f"), + Res: ParseMust("*.a,x"), + }, + { + A: infiMask, + B: infiMask, + Err: strings.Repeat("*: ", recursionTooDeep) + "recursion too deep", + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + Err: "x: " + strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + im, err := c.A.IntersectDumb(c.B) + im2, err2 := c.B.IntersectDumb(c.A) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.EqualError(t, err2, c.Err) + } else { + assert.NoError(t, err) + assert.NoError(t, err2) + if c.Res == nil { + assert.Nil(t, im) + assert.Nil(t, im2) + } else { + assert.True(t, c.Res.Equal(im), "not equal", im, c.Res) + assert.True(t, c.Res.Equal(im2), "not equal", im2, c.Res) + } + } + }) + } +} + +func TestMask_IntersectResetMask(t *testing.T) { + t.Parallel() + infiMask := &Mask{} + infiMask.Any = infiMask + cases := []struct { + A *Mask + B *Mask + Res *Mask + Err string + }{ + { + A: nil, + B: nil, + Res: nil, + }, + { + A: &Mask{}, + B: nil, + Res: nil, + }, + { + A: nil, + B: &Mask{}, + Res: nil, + }, + { + A: ParseMust("a"), + B: ParseMust("*"), + Res: ParseMust("a"), + }, + { + A: ParseMust("a.(x,y,z),b.*"), + B: ParseMust("*.x,a.z"), + Res: ParseMust("a.(x,z),b.x"), + }, + { + A: infiMask, + B: infiMask, + Err: strings.Repeat("*×*: ", recursionTooDeep) + "recursion too deep", + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + Err: "x×x: " + strings.Repeat("*×*: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + im, err := c.A.IntersectResetMask(c.B) + im2, err2 := c.B.IntersectResetMask(c.A) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.EqualError(t, err2, c.Err) + } else { + assert.NoError(t, err) + assert.NoError(t, err2) + if c.Res == nil { + assert.Nil(t, im) + assert.Nil(t, im2) + } else { + assert.True(t, c.Res.Equal(im), "not equal", im, c.Res) + assert.True(t, c.Res.Equal(im2), "not equal", im2, c.Res) + } + } + }) + } +} + +func TestMask_SubtractDumb(t *testing.T) { + t.Parallel() + infiMask := &Mask{} + infiMask.Any = infiMask + cases := []struct { + A *Mask + B *Mask + Res *Mask + Err string + }{ + { + A: nil, + B: nil, + Res: nil, + }, + { + A: &Mask{}, + B: nil, + Res: &Mask{}, + }, + { + A: nil, + B: &Mask{}, + Res: nil, + }, + { + A: ParseMust("x.(a,b),*.(c,d),e,f"), + B: ParseMust("x.(a,b),*.(c,d),e,f"), + Res: ParseMust(""), + }, + { + A: ParseMust("x.(a,b),*.(c,d),e,f"), + B: ParseMust("x.(a),*.(c),e"), + Res: ParseMust("x.b,*.d,f"), + }, + { + A: ParseMust("a"), + B: ParseMust("*"), + Res: ParseMust("a"), + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + Err: "x: " + strings.Repeat("*: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + err := c.A.SubtractDumb(c.B) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + if c.Res == nil { + assert.Nil(t, c.A) + } else { + assert.True(t, c.Res.Equal(c.A), "not equal", c.A, c.Res) + } + } + }) + } +} + +func TestMask_SubtractResetMask(t *testing.T) { + t.Parallel() + infiMask := &Mask{} + infiMask.Any = infiMask + cases := []struct { + A *Mask + B *Mask + Res *Mask + Err string + }{ + { + A: nil, + B: nil, + Res: nil, + }, + { + A: &Mask{}, + B: nil, + Res: &Mask{}, + }, + { + A: nil, + B: &Mask{}, + Res: nil, + }, + { + A: ParseMust("x.(a,b),*.(c,d),e,f"), + B: ParseMust("x.(a,b),*.(c,d),e,f"), + Res: ParseMust(""), + }, + { + A: ParseMust("x.(a,b),*.(c,d),e,f"), + B: ParseMust("x.(a),*.(c),e"), + Res: ParseMust("x.b,*.d"), + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + B: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + Err: "x\\x: " + strings.Repeat("*\\*: ", recursionTooDeep-1) + "recursion too deep", + }, + { + A: &Mask{ + FieldParts: map[FieldKey]*Mask{ + "x": infiMask, + }, + }, + B: infiMask, + Err: "x\\*: " + strings.Repeat("*\\*: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + err := c.A.SubtractResetMask(c.B) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + if c.Res == nil { + assert.Nil(t, c.A) + } else { + assert.True(t, c.Res.Equal(c.A), "not equal", c.A, c.Res) + } + } + }) + } +} diff --git a/fieldmask/mask/parse.go b/fieldmask/mask/parse.go new file mode 100644 index 0000000..bfcd9ed --- /dev/null +++ b/fieldmask/mask/parse.go @@ -0,0 +1,475 @@ +package mask + +import ( + "encoding/json" + "errors" + "fmt" + "regexp" + "strings" +) + +// TokenType constants. +const ( + tokenComma = iota + 1 + tokenDot + tokenLBrace + tokenRBrace + tokenWildCard + tokenPlainKey + tokenQuotedKey + tokenEOL +) + +// token represents a token type and its corresponding value. +type token struct { + Type int // Type of the token (one of the constants above) + Value string // Value associated with the token + Pos int // Position of the token in the input +} + +func (t token) TypeStr() string { + switch t.Type { + case tokenComma: + return "Comma" + case tokenDot: + return "Dot" + case tokenLBrace: + return "LBrace" + case tokenRBrace: + return "RBrace" + case tokenWildCard: + return "WildCard" + case tokenPlainKey: + return "PlainKey" + case tokenQuotedKey: + return "QuotedKey" + case tokenEOL: + return "EOL" + default: + return fmt.Sprintf("Undefined(%d)", t.Type) + } +} + +// Unquote checks if the token is of type tokenQuotedKey and unquotes its value. +// It returns an error if unquoting fails. +func (t token) Unquote() (token, error) { + if t.Type != tokenQuotedKey { + return t, nil + } + var str string + err := json.Unmarshal([]byte(t.Value), &str) + if err != nil { + return t, fmt.Errorf("failed to parse quoted string: %w", err) + } + t.Value = str + t.Type = tokenPlainKey + return t, nil +} + +func (t token) String() string { + if t.Type == tokenQuotedKey { + return fmt.Sprintf("Token%s(%s pos %d)", t.TypeStr(), t.Value, t.Pos) + } + return fmt.Sprintf("Token%s(%q pos %d)", t.TypeStr(), t.Value, t.Pos) +} + +// regular expression to match simple string tokens (alphanumeric and +// underscores). +const simpleStringTokenSet = "[a-zA-Z0-9_]" //nolint:gosec // false positive +var simpleStringTokenStart = regexp.MustCompile("^" + simpleStringTokenSet) +var simpleStringToken = regexp.MustCompile("^(" + simpleStringTokenSet + "+)") + +const ( + spaceSet = " \r\n\t" + // maximum length of context to show in error messages. + maxContext = 30 + // number of characters to show before the error position in error messages. + contextBack = 12 + errorMarker = "\u20DE" // combining enclosing square +) + +type UnmarshalError struct { + Input string + Position int + Summary string + Cause error // Cause is an optional original error. +} + +// possibleEllipsis truncates the string if it exceeds maxContext and adds +// ellipsis. +func possibleEllipsis(str string, maxContext int) string { + if len(str) > maxContext { + return str[0:maxContext-3] + "..." + } + return str +} + +// near returns a contextual error message indicating the position of an error +// in the input string. +func near(str string, pos int) string { + ctxStart := pos + if ctxStart >= contextBack { + ctxStart -= contextBack + } else { + ctxStart = 0 + } + delta := pos - ctxStart + contextStr := possibleEllipsis(str[ctxStart:], maxContext) + withMark := contextStr[0:delta] + errorMarker + contextStr[delta:] + + return fmt.Sprintf("at position %d near %q", pos, withMark) +} + +func (e *UnmarshalError) Error() string { + if e.Cause != nil { + return fmt.Sprintf( + "%s %s: %s", + e.Summary, near(e.Input, e.Position), e.Cause.Error(), + ) + } + return fmt.Sprintf("%s %s", e.Summary, near(e.Input, e.Position)) +} + +func (e *UnmarshalError) Unwrap() error { + return e.Cause +} + +// lexer represents a tokenizer that breaks an input string into tokens. +type lexer struct { + input string // input is the string to tokenize. + pos int // pos is the current position in the input string. +} + +// newLexer initializes a new Lexer with the input string. +func newLexer(input string) *lexer { + return &lexer{input: input} +} + +// nextToken returns the next token from the input string. +func (l *lexer) nextToken() (token, error) { + // Skip whitespace characters + for l.pos < len(l.input) && isWhitespace(l.input[l.pos]) { + l.pos++ + } + + if l.pos >= len(l.input) { + return token{Type: tokenEOL, Value: "", Pos: l.pos}, nil + } + start := l.pos + + // Check for specific token patterns + switch { + case l.startsWith(","): + l.consume(",") + return token{Type: tokenComma, Value: ",", Pos: start}, nil + case l.startsWith("."): + l.consume(".") + return token{Type: tokenDot, Value: ".", Pos: start}, nil + case l.startsWith("("): + l.consume("(") + return token{Type: tokenLBrace, Value: "(", Pos: start}, nil + case l.startsWith(")"): + l.consume(")") + return token{Type: tokenRBrace, Value: ")", Pos: start}, nil + case l.startsWith("*"): + l.consume("*") + return token{Type: tokenWildCard, Value: "*", Pos: start}, nil + case l.startsWith("\""): + return l.scanQuotedKey() + case simpleStringTokenStart.MatchString(l.input[l.pos:]): + return l.scanPlainKey() + default: + return token{}, &UnmarshalError{ + Input: l.input, + Position: l.pos, + Summary: "unexpected symbol", + } + } +} + +// scanPlainKey scans a PlainKey token. +func (l *lexer) scanPlainKey() (token, error) { + start := l.pos + match := simpleStringToken.FindString(l.input[start:]) + l.consume(match) + return token{Type: tokenPlainKey, Value: match, Pos: start}, nil +} + +// scanQuotedKey scans a QuotedKey token. +func (l *lexer) scanQuotedKey() (token, error) { + start := l.pos + l.consume("\"") + for l.pos < len(l.input) && !l.startsWith("\"") { + if l.startsWith("\\") { + l.pos += 2 // skip the escaped character + } else { + l.pos++ + } + } + if l.startsWith("\"") { + l.consume("\"") + return token{ + Type: tokenQuotedKey, + Value: l.input[start:l.pos], + Pos: start, + }, nil + } + return token{}, &UnmarshalError{ + Input: l.input, + Position: start, + Summary: "unterminated quoted string", + } +} + +// consume moves the lexer position forward by the given length. +func (l *lexer) consume(s string) { + l.pos += len(s) +} + +// startsWith checks if the input string starts with a given prefix at the +// current position. +func (l *lexer) startsWith(prefix string) bool { + return l.pos+len(prefix) <= len(l.input) && + l.input[l.pos:l.pos+len(prefix)] == prefix +} + +// isWhitespace checks if a given byte is a whitespace character. +func isWhitespace(b byte) bool { + return strings.ContainsRune(spaceSet, rune(b)) +} + +// tokenize runs the lexer to generate a list of tokens from the input string. +func (l *lexer) tokenize() ([]token, error) { + ret := []token{} + for { + tok, err := l.nextToken() + if err != nil { + return nil, fmt.Errorf("failed to tokenize: %w", err) + } + tok, err = tok.Unquote() + if err != nil { + return nil, &UnmarshalError{ + Input: l.input, + Position: tok.Pos, + Summary: "failed to unquote token", + Cause: err, + } + } + if tok.Type == tokenEOL { + break + } + ret = append(ret, tok) + } + return ret, nil +} + +// level represents a part of mask encapsed in braces. +type level struct { + Starts []*Mask // Starts is a list of mask starting nodes of this level. + Ends []*Mask // Ends is a list of finished masks for this level. + Active []*Mask // Active is the current unfinished masks for this level. + // Prev is a reference to the previous level in the hierarchy. + Prev *level + // Pos is the position in the input where this level was created. + Pos int +} + +// newLevel initializes a new mask level with a root mask. +func newLevel() *level { + root := New() + return &level{ + Starts: []*Mask{root}, + Ends: []*Mask{}, + Active: []*Mask{root}, + } +} + +// AddKey adds a new field key to the unfinished masks in the current level. +func (l *level) AddKey(k FieldKey) { + var mask *Mask + newActive := []*Mask{} + for _, a := range l.Active { + if m, ok := a.FieldParts[k]; ok { + newActive = append(newActive, m) + } else { + if mask == nil { + mask = New() + newActive = append(newActive, mask) + } + a.FieldParts[k] = mask + } + } + l.Active = newActive +} + +// AddAny adds a new wildcard to the unfinished masks in the current level. +func (l *level) AddAny() { + var newMask *Mask + newActive := make([]*Mask, 0, len(l.Active)) + for _, a := range l.Active { + if a.Any != nil { + newActive = append(newActive, a.Any) + } else { + if newMask == nil { + newMask = New() + newActive = append(newActive, newMask) + } + a.Any = newMask + } + } + l.Active = newActive +} + +// NewMask finalizes current mask and creates a new one in the current level. +func (l *level) NewMask() { + l.Ends = append(l.Ends, l.Active...) + l.Active = l.Starts +} + +// PushLevel creates a new level as a child to a current, and returns it. +// pos saves the position at which level was created. +func (l *level) PushLevel(pos int) *level { + nl := newLevel() + nl.Pos = pos + nl.Prev = l + nl.Starts = l.Active + nl.Active = l.Active + return nl +} + +// PopLevel finalizes the level, updates the parent level with the new +// unfinished masks and returns it. +func (l *level) PopLevel() *level { + p := l.Prev + p.Active = append(l.Ends, l.Active...) //nolint:gocritic // append result not assigned to the same slice + return p +} + +const ( + // stateKey represents the state of expecting a field key. + stateKey = iota + 1 + // stateSeparator represents the state of expecting a separator (dot or + // comma). + stateSeparator + // stateLevelStart represents the state of starting a new mask level. + stateLevelStart +) + +// Parse parses the input mask string into a [Mask] object. It tokenizes the +// input string, processes the tokens based on the [Mask Syntax], and constructs +// the corresponding [Mask] structure representing the parsed mask. +// +// Parameters: +// +// mask string - The input mask string to be parsed. +// +// Returns: +// +// - *Mask - The parsed [Mask] object representing the structure defined by +// the mask string. +// - error - An error if there was any issue during parsing or tokenization. +// +// [Mask Syntax]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func Parse(mask string) (*Mask, error) { //nolint:funlen,gocognit + if len(strings.TrimLeft(mask, spaceSet)) == 0 { + // Return an empty mask if the input string is empty. + return New(), nil + } + tokens, err := newLexer(mask).tokenize() // Tokenize the input mask string. + if err != nil { + return nil, fmt.Errorf("tokenizer failure: %w", err) + } + lvl := newLevel() // Create a new mask level. + root := lvl.Starts[0] // Get the root mask. + pos := 0 // Initialize position tracker. + state := stateKey // Initialize state to expecting a field key. + + for { + if pos >= len(tokens) { + break // End the loop if the end of tokens is reached. + } + tok := tokens[pos] // Get the current token. + switch state { + case stateLevelStart: + if tok.Type == tokenRBrace { + // If it's an empty level, treat the next token as a separator. + state = stateSeparator + } else { + state = stateKey // Expect a field key after opening brace. + } + continue // Don't move to the next token, just switch state. + case stateKey: + switch tok.Type { + case tokenPlainKey: + lvl.AddKey(FieldKey(tok.Value)) + state = stateSeparator + case tokenWildCard: + lvl.AddAny() + state = stateSeparator + case tokenLBrace: + lvl = lvl.PushLevel(tok.Pos) + state = stateLevelStart + default: + return nil, &UnmarshalError{ + Input: mask, + Position: tok.Pos, + Summary: fmt.Sprintf( + "unexpected token %s, expecting field or submask", tok, + ), + } + } + case stateSeparator: + switch tok.Type { + case tokenDot: + state = stateKey + case tokenComma: + lvl.NewMask() + state = stateKey + case tokenRBrace: + if lvl.Prev == nil { + return nil, &UnmarshalError{ + Input: mask, + Position: tok.Pos, + Summary: "unmatched right brace", + } + } + lvl = lvl.PopLevel() + state = stateSeparator + default: + return nil, &UnmarshalError{ + Input: mask, + Position: tok.Pos, + Summary: fmt.Sprintf( + "unexpected token %s, expecting separator or closing "+ + "brace", + tok, + ), + } + } + default: + return nil, errors.New("state machine corruption") + } + pos++ + } + if lvl.Prev != nil { + return nil, &UnmarshalError{ + Input: mask, + Position: lvl.Pos, + Summary: "unclosed left brace", + } + } + if state != stateSeparator { + return nil, errors.New("unexpected end of mask") + } + + return root.Copy() +} + +// ParseMust is a wrapper around [Parse] that panics if [Parse] fails. +func ParseMust(mask string) *Mask { + ret, err := Parse(mask) + if err != nil { + panic(err) + } + return ret +} diff --git a/fieldmask/mask/parse_test.go b/fieldmask/mask/parse_test.go new file mode 100644 index 0000000..f3595a1 --- /dev/null +++ b/fieldmask/mask/parse_test.go @@ -0,0 +1,235 @@ +package mask + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestParse(t *testing.T) { + t.Parallel() + cases := []struct { + Input string + Output string + Err string + }{ + { + Input: "*,", + Err: "unexpected end of mask", + }, + { + Input: "*.", + Err: "unexpected end of mask", + }, + { + Input: "*.(", + Err: "unclosed left brace at position 2 near \"*.\u20DE(\"", + }, + { + Input: " \t\r\n*.( \t\r\n", + Err: "unclosed left brace at position 6 near \" \\t\\r\\n*.\u20DE( \\t\\r\\n\"", + }, + { + Input: "abcdefghijklmonpqrst.(abcdefghijklmonpqrst", + Err: "unclosed left brace at position 21 near \"jklmonpqrst.\u20DE(abcdefghijklmo...\"", + }, + { + Input: "abcdefghijklmonpqrst)abcdefghijklmonpqrst", + Err: "unmatched right brace at position 20 near \"ijklmonpqrst\u20DE)abcdefghijklmo...\"", + }, + { + Input: "abcdefghijklmonpqrst..abcdefghijklmonpqrst", + Err: "unexpected token TokenDot(\".\" pos 21), expecting field or submask at position 21 near \"jklmonpqrst.\u20DE.abcdefghijklmo...\"", + }, + { + Input: "abcdefghijklmonpqrst abcdefghijklmonpqrst feafwafwawfadwadw", + Err: "unexpected token TokenPlainKey(\"abcdefghijklmonpqrst\" pos 21), expecting separator or closing brace at position 21 near \"jklmonpqrst \u20DEabcdefghijklmon...\"", + }, + { + Input: "#", + Err: "tokenizer failure: failed to tokenize: unexpected symbol at position 0 near \"\u20DE#\"", + }, + { + Input: "#1234567890abcdefghijklmnopqrst", + Err: "tokenizer failure: failed to tokenize: unexpected symbol at position 0 near \"\u20DE#1234567890abcdefghijklmnop...\"", + }, + { + Input: "\"1234567890abcdefghijklmnopqrst", + Err: "tokenizer failure: failed to tokenize: unterminated quoted string at position 0 near \"\u20DE\\\"1234567890abcdefghijklmnop...\"", + }, + { + Input: "", + Output: "", + }, + { + Input: "()", + Output: "", + }, + { + Input: " \t\r\n( \t\r\n) \t\r\n", + Output: "", + }, + { + Input: " \t\r\n", + Output: "", + }, + { + Input: "*", + Output: "*", + }, + { + Input: " \t\r\n* \t\r\n", + Output: "*", + }, + { + Input: " \t\r\na \t\r\n", + Output: "a", + }, + { + Input: " \t\r\n( \t\r\na \t\r\n) \t\r\n", + Output: "a", + }, + { + Input: "*,*,*,*", + Output: "*", + }, + { + Input: "test", + Output: "test", + }, + { + Input: `"test"`, + Output: `test`, + }, + { + Input: `"test "`, + Output: `"test "`, + }, + { + Input: "a,a", + Output: "a", + }, + { + Input: "a.b", + Output: "a.b", + }, + { + Input: "a \t\r\n. \t\r\nb", + Output: "a.b", + }, + { + Input: "a \t\r\n, \t\r\na", + Output: "a", + }, + { + Input: "*,test", + Output: "*,test", + }, + { + Input: "* \t\r\n, \t\r\ntest", + Output: "*,test", + }, + { + Input: "test,*", + Output: "*,test", + }, + { + Input: "a.b,a.b", + Output: "a.b", + }, + { + Input: "a.*,a.*", + Output: "a.*", + }, + { + Input: "*.b,*.b", + Output: "*.b", + }, + { + Input: "a.b,a.c", + Output: "a.(b,c)", + }, + { + Input: "a.(b)", + Output: "a.b", + }, + { + Input: "a.(b,())", + Output: "a.b", + }, + { + Input: "a.((),b)", + Output: "a.b", + }, + { + Input: "a.((()))", + Output: "a", + }, + { + Input: "a.(b,c)", + Output: "a.(b,c)", + }, + { + Input: "*.(b,c)", + Output: "*.(b,c)", + }, + { + Input: "a.(b,c).(d,e)", + Output: "a.(b.(d,e),c.(d,e))", + }, + { + Input: "a.(*,c).(d,e)", + Output: "a.(*.(d,e),c.(d,e))", + }, + { + Input: "a.(((((((*,c))))))).(d,e)", + Output: "a.(*.(d,e),c.(d,e))", + }, + { + Input: "(((((((a))))))).(((((*)))),(((c)))).(((((((d,(((e))))))))))", + Output: "a.(*.(d,e),c.(d,e))", + }, + { + Input: "a.(b,c.(d,e))", + Output: "a.(b,c.(d,e))", + }, + { + Input: "a.(*,b,c)", + Output: "a.(*,b,c)", + }, + { + Input: "a.(*,b,c.(d,e))", + Output: "a.(*,b,c.(d,e))", + }, + { + Input: "*.*.(a,b,c.*,d.(e,f),g.(*.(h,i),j,k)),1,A,B,l,m,n.*,o.(p,q,w,x),r.(*.(s,t),u.*,v),z.(*.y,u.*,v)", + Output: "*.*.(a,b,c.*,d.(e,f),g.(*.(h,i),j,k)),1,A,B,l,m,n.*,o.(p,q,w,x),r.(*.(s,t),u.*,v),z.(*.y,u.*,v)", + }, + { + Input: "a.\"\\\",.() \\t\\r\\n\".b", + Output: "a.\"\\\",.() \\t\\r\\n\".b", + }, + } + for i, c := range cases { + name := fmt.Sprintf("case %d ", i) + if c.Err != "" { + name += "fail" + } else { + name += "ok" + } + t.Run(name, func(t *testing.T) { + t.Parallel() + mask, err := Parse(c.Input) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.NotNil(t, mask) + normalized, err := mask.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Output, normalized) + } + }) + } +} diff --git a/fieldmask/protobuf/filter.go b/fieldmask/protobuf/filter.go new file mode 100644 index 0000000..b2cc1a3 --- /dev/null +++ b/fieldmask/protobuf/filter.go @@ -0,0 +1,364 @@ +package protobuf + +import ( + "fmt" + "strconv" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +func recursiveFilterListWithSelectMask( //nolint:gocognit + list protoreflect.List, + listDesc protoreflect.FieldDescriptor, + fieldMask *mask.Mask, + reduceLists bool, + recursion int, +) error { + if fieldMask.IsEmpty() { // empty = full for X-FilterMap + return nil + } + listName := listDesc.Name() + var ret []protoreflect.Value + if reduceLists { + ret = make([]protoreflect.Value, 0, list.Len()) + } + for j := range list.Len() { + val := list.Get(j) + innerMask, err := fieldMask.GetSubMask( + mask.FieldKey(strconv.Itoa(j)), + ) + if err != nil { + return fmt.Errorf( + "%s[%d]: couldn't get full field mask: %w", + listName, j, err, + ) + } + if innerMask == nil { + if !reduceLists { + list.Set(j, list.NewElement()) + } + continue + } + if listDesc.Message() != nil { + if err := recursiveFilterWithSelectMask( + val.Message(), innerMask, reduceLists, recursion, + ); err != nil { + return fmt.Errorf("%s[%d]: %w", listName, j, err) + } + } + if reduceLists { + ret = append(ret, val) + } else { + list.Set(j, val) + } + } + if reduceLists { + list.Truncate(len(ret)) + for i, v := range ret { + list.Set(i, v) + } + } + + return nil +} + +func recursiveFilterMapWithSelectMask( + fMap protoreflect.Map, + fMapDesc protoreflect.FieldDescriptor, + fieldMask *mask.Mask, + reduceLists bool, + recursion int, +) error { + if fieldMask.IsEmpty() { // empty = full for X-FilterMap + return nil + } + mapName := fMapDesc.Name() + + isMsg := fMapDesc.MapValue().Message() != nil + + var innerErr error + fMap.Range(func(mk protoreflect.MapKey, v protoreflect.Value) bool { + fk, err := mapKeyToFieldKey(mk) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: failed to convert map key to field key: %w", + mapName, mk, err, + ) + return false + } + innerMask, err := fieldMask.GetSubMask(fk) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: couldn't get full field mask: %w", + mapName, mk, err, + ) + return false + } + if innerMask == nil { + fMap.Clear(mk) + } else if isMsg { + if err := recursiveFilterWithSelectMask( + v.Message(), innerMask, reduceLists, recursion, + ); err != nil { + innerErr = fmt.Errorf("%s[%s]: %w", mapName, mk, err) + return false + } + fMap.Set(mk, v) + } + return true + }) + return innerErr +} + +func recursiveFilterWithSelectMask( //nolint:gocognit + message protoreflect.Message, + fieldMask *mask.Mask, + reduceLists bool, + recursion int, +) error { + if recursion >= recursionTooDeep { + return mask.ErrRecursionTooDeep + } + recursion++ + msgDesc := message.Descriptor() + + if fieldMask == nil || fieldMask.IsEmpty() { // empty = full for X-FilterMap + return nil + } + for i := range msgDesc.Fields().Len() { + fieldDesc := msgDesc.Fields().Get(i) + name := fieldDesc.Name() + + if !message.Has(fieldDesc) { + continue + } + + innerMask, err := fieldMask.GetSubMask(mask.FieldKey(name)) + if err != nil { + return fmt.Errorf("%s: couldn't get full field mask: %w", name, err) + } + if innerMask == nil && fieldDesc.ContainingOneof() != nil { + oname := fieldDesc.ContainingOneof().Name() + oom, err := fieldMask.GetSubMask(mask.FieldKey(oname)) + if err != nil { + return fmt.Errorf( + "%s: couldn't get full field mask: %w", oname, err, + ) + } + if oom != nil { + // grouping mask is always treated as empty + innerMask = mask.New() + } + } + if innerMask == nil { + message.Clear(fieldDesc) + continue + } + if fieldDesc.IsList() { + list := message.Mutable(fieldDesc).List() + if err := recursiveFilterListWithSelectMask( + list, fieldDesc, innerMask, reduceLists, recursion, + ); err != nil { + return err + } + continue + } + if fieldDesc.IsMap() { + vMap := message.Mutable(fieldDesc).Map() + if err := recursiveFilterMapWithSelectMask( + vMap, fieldDesc, innerMask, reduceLists, recursion, + ); err != nil { + return err + } + continue + } + if fieldDesc.Message() != nil { + vMessage := message.Get(fieldDesc).Message() + if err := recursiveFilterWithSelectMask( + vMessage, innerMask, reduceLists, recursion, + ); err != nil { + return fmt.Errorf("%s: %w", name, err) + } + message.Set(fieldDesc, protoreflect.ValueOf(vMessage)) + continue + } + } + + return nil +} + +// FilterWithSelectMask recursively filters a target message based on the +// provided [mask.Mask], clearing all fields not present in the [mask.Mask] +// according to `X-SelectMask` behavior by [Design]. +// +// If a field in the [mask.Mask] is empty (or equivalent to a wildcard mask), it +// signifies that the entire field and its children should be retained. If a +// [mask.Mask] specifies specific children for a field, only those specified +// children will be retained, and all other children will be removed. +// +// For repeated fields (lists) that have not-wildcard selector, this function +// will return default values for unselected fields. For proper filtering use +// [FilterWithSelectMaskAndReduceLists]. The filtering is disabled by default as +// this will preserve element indexes as well as be compatible to services that +// lack `X-SelectMask` support. +// +// Example: +// +// msg := &MyMessage{...} // Initialize your proto message +// fm := mask.ParseMust("a.b,c,d.*.e") +// +// // Filter the message using the fieldMask +// err := FilterWithSelectMask(msg, fm) +// if err != nil { +// log.Fatalf("Error filtering message: %v", err) +// } +// +// In the above example: +// - Fields 'a', 'c' and 'd' will be retained. +// - For field 'a', only its child 'b' will be retained, and all other +// children of 'a' will be removed. +// - Field 'c' will be retained as is, without any modifications. +// - For field 'd', only the field 'e' of its children (if any) will be +// retained, and all other fields of children of 'd' will be removed. +// +// Example with list: +// +// msg := &SomeMessage{ +// Field: []*OtherMessage{ +// {SomeInnerFields: "for_field #0"}, // Index 0 +// {SomeInnerFields: "for_field #1"}, // Index 1 +// {SomeInnerFields: "for_field #2"}, // Index 2 +// {SomeInnerFields: "for_field #3"}, // Index 3 +// }, +// } +// fm := mask.ParseMust("field.(1,3)") +// +// FilterWithSelectMask(msg, fm) +// msg == &SomeMessage{ +// Field: []*OtherMessage{ +// {}, // Index 0 +// {SomeInnerFields: "for_field #1"}, // Index 1 +// {}, // Index 2 +// {SomeInnerFields: "for_field #3"}, // Index 3 +// }, +// } +// +// Parameters: +// - message [proto.Message]: The target message to be filtered. +// - fieldMask *[mask.Mask]: The Mask specifying which fields to update or +// reset. +// +// Returns: +// - error: An error, if any, encountered during the filtering process. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func FilterWithSelectMask( + message proto.Message, + fieldMask *mask.Mask, +) error { + return recursiveFilterWithSelectMask( + message.ProtoReflect(), fieldMask, false, 0, + ) +} + +// FilterWithSelectMaskAndReduceLists recursively filters a target message based +// on the provided [mask.Mask], clearing all fields not present in the +// [mask.Mask] according to `X-SelectMask` behavior by [Design]. +// +// If a field in the [mask.Mask] is empty (or equivalent to a wildcard mask), it +// signifies that the entire field and its children should be retained. If a +// [mask.Mask] specifies specific children for a field, only those specified +// children will be retained, and all other children will be removed. +// +// For repeated fields (lists): +// +// - When reduceLists is false: +// The behavior is to retain the structure of the list while clearing +// non-matching elements. Empty placeholders will be inserted for indices +// that are explicitly excluded from the +// [mask.Mask]. +// +// - When reduceLists is true: +// The behavior is to compact the list by removing non-matching elements +// entirely. +// +// Example: +// +// msg := &MyMessage{...} // Initialize your proto message +// fm := mask.ParseMust("a.b,c,d.*.e") +// +// // Filter the message using the fieldMask +// err := FilterWithSelectMaskAndReduceLists(msg, fm, true) +// if err != nil { +// log.Fatalf("Error filtering message: %v", err) +// } +// +// In the above example: +// - Fields 'a', 'c' and 'd' will be retained. +// - For field 'a', only its child 'b' will be retained, and all other +// children of 'a' will be removed. +// - Field 'c' will be retained as is, without any modifications. +// - For field 'd', only the field 'e' of its children (if any) will be +// retained, and all other fields of children of 'd' will be removed. +// +// Example with list: +// +// msg := &SomeMessage{ +// Field: []*OtherMessage{ +// {SomeInnerFields: "for_field #0"}, // Index 0 +// {SomeInnerFields: "for_field #1"}, // Index 1 +// {SomeInnerFields: "for_field #2"}, // Index 2 +// {SomeInnerFields: "for_field #3"}, // Index 3 +// {SomeInnerFields: "for_field #4"}, // Index 4 +// {SomeInnerFields: "for_field #5"}, // Index 5 +// {SomeInnerFields: "for_field #6"}, // Index 6 +// {SomeInnerFields: "for_field #7"}, // Index 7 +// }, +// } +// fm := mask.ParseMust("field.(1,5)") +// // Without reduceLists +// FilterWithSelectMaskAndReduceLists(msg, fm, false) +// msg == &SomeMessage{ +// Field: []*OtherMessage{ +// {}, // Index 0 +// {SomeInnerFields: "for_field #1"}, // Index 1 +// {}, // Index 2 +// {}, // Index 3 +// {}, // Index 4 +// {SomeInnerFields: "for_field #5"}, // Index 5 +// {}, // Index 6 +// {}, // Index 7 +// }, +// } +// // With reduceLists +// FilterWithSelectMaskAndReduceLists(msg, fm, true) +// msg == &SomeMessage{ +// Field: []*OtherMessage{ +// {SomeInnerFields: "for_field #1"}, +// {SomeInnerFields: "for_field #5"}, +// }, +// } +// +// Parameters: +// - message [proto.Message]: The target message to be filtered. +// - fieldMask *[mask.Mask]: The Mask specifying which fields to update or +// reset. +// - reduceLists (bool): Whether to remove elements from lists or just set to +// zeros. +// +// Returns: +// - error: An error, if any, encountered during the filtering process. +// +// [Design]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func FilterWithSelectMaskAndReduceLists( + message proto.Message, + fieldMask *mask.Mask, + reduceLists bool, +) error { + return recursiveFilterWithSelectMask( + message.ProtoReflect(), fieldMask, reduceLists, 0, + ) +} diff --git a/fieldmask/protobuf/filter_test.go b/fieldmask/protobuf/filter_test.go new file mode 100644 index 0000000..232a22e --- /dev/null +++ b/fieldmask/protobuf/filter_test.go @@ -0,0 +1,874 @@ +package protobuf + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestFilterWithSelectMask(t *testing.T) { + t.Parallel() + veryRecursive := &testdata.RecursiveStruct{} + veryMask := &mask.Mask{} + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + veryMask = &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "recursive": veryMask, + }, + } + } + cases := []struct { + Message proto.Message + Mask *mask.Mask + Reduce bool + Err string + Result proto.Message + }{ + { + Message: &testdata.TestSimple{}, + Result: &testdata.TestSimple{}, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Mask: mask.ParseMust(""), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Mask: mask.ParseMust("*"), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Mask: mask.ParseMust("test_int32"), + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Mask: mask.ParseMust("test_int32,test_uint32"), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 0x_D06_F00D, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 80085, + TestUint32: 0x_D06_F00D, + }, + Mask: mask.ParseMust("test_int32,test_uint32,test_uint64"), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 0x_D06_F00D, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32"), + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.*,test_int64"), + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.*,test_int64"), + Reduce: true, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4, 0}, + }, + Mask: mask.ParseMust("test_int32.*,test_int64"), + Reduce: true, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4, 0}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.1"), + Result: &testdata.TestRepeated{ + TestInt32: []int32{0, 2, 0, 0}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.(1,3)"), + Result: &testdata.TestRepeated{ + TestInt32: []int32{0, 2, 0, 4}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.1"), + Reduce: true, + Result: &testdata.TestRepeated{ + TestInt32: []int32{2}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Mask: mask.ParseMust("test_int32.(1,3)"), + Reduce: true, + Result: &testdata.TestRepeated{ + TestInt32: []int32{2, 4}, + }, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4, 0}, + }, + Mask: mask.ParseMust("test_int32.(1,4)"), + Reduce: true, + Result: &testdata.TestRepeated{ + TestInt32: []int32{2, 0}, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + }, + Mask: mask.ParseMust("*.(meat,1)"), + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + {}, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + }, + Mask: mask.ParseMust("test_stringmap"), + Result: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + "empty": {}, + }, + }, + Mask: mask.ParseMust("*.(meat,1)"), + Reduce: true, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + "empty": {}, + }, + }, + Mask: mask.ParseMust("*.(meat,1,empty,3)"), + Reduce: true, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "empty": {}, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + "empty": {}, + }, + }, + Mask: mask.ParseMust("*.(meat,1,empty,3,nonexistent,42)"), + Reduce: true, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "empty": {}, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + "empty": {}, + }, + }, + Mask: mask.ParseMust("*.(meat,1).test_string"), + Reduce: true, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "meat", + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "meat": { + TestString: "meat", + }, + }, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + TestUint32: 42, + }, + { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + { + TestString: "test", + TestUint32: 0x_7E57, + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + TestUint32: 42, + }, + "meat": { + TestString: "meat", + TestUint32: 0x_D06_F00D, + }, + "test": { + TestString: "test", + TestUint32: 0x_7E57, + }, + "empty": {}, + }, + }, + Mask: mask.ParseMust("*.*.test_string"), + Reduce: true, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestString: "answer", + }, + { + TestString: "meat", + }, + { + TestString: "test", + }, + {}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "answer": { + TestString: "answer", + }, + "meat": { + TestString: "meat", + }, + "test": { + TestString: "test", + }, + "empty": {}, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("test_struct"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("test_oneof"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("test_oneof.test_string"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("test_struct.test_string"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("*.test_string"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("*"), + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestString: "answer", + TestInt32: 42, + }, + }, + }, + Mask: mask.ParseMust("test_uint32"), + Result: &testdata.TestOneOf{}, + }, + { + Message: proto.Clone(veryRecursive), + Mask: veryMask, + Err: strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: veryMask, + }, + }, + Err: "field[0]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: veryMask, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "0": veryMask, + }, + }, + }, + Err: "field[0]: couldn't get full field mask: failed to copy key mask: " + + strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: veryMask, + }, + }, + Err: "field[foo]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: veryMask, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "foo": veryMask, + }, + }, + }, + Err: "field[foo]: couldn't get full field mask: failed to copy key mask: " + + strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{TestString: "foo"}, + }, + Mask: &mask.Mask{ + Any: veryMask, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_string": veryMask, + }, + }, + Err: "test_string: couldn't get full field mask: failed to copy key mask: " + + strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d FilterWithSelectMaskAndReduceLists", i), func(t *testing.T) { + t.Parallel() + msg := proto.Clone(c.Message) + err := FilterWithSelectMaskAndReduceLists( + msg, c.Mask, c.Reduce, + ) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.EqualExportedValues(t, c.Result, msg) + } + }) + if !c.Reduce { + t.Run(fmt.Sprintf("case %d FilterWithSelectMask", i), func(t *testing.T) { + t.Parallel() + msg := proto.Clone(c.Message) + err := FilterWithSelectMask( + msg, c.Mask, + ) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.EqualExportedValues(t, c.Result, msg) + } + }) + } + } +} diff --git a/fieldmask/protobuf/from_descriptor.go b/fieldmask/protobuf/from_descriptor.go new file mode 100644 index 0000000..d56cf83 --- /dev/null +++ b/fieldmask/protobuf/from_descriptor.go @@ -0,0 +1,107 @@ +package protobuf + +import ( + "fmt" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +const recursionTooDeep = 1000 + +func knownFieldsFromDescRecursive( + desc protoreflect.MessageDescriptor, + recursion int, +) (*mask.Mask, error) { + if recursion >= recursionTooDeep { + return nil, mask.ErrRecursionTooDeep + } + recursion++ + if desc == nil { + return nil, nil + } + ret := mask.New() + for i := range desc.Fields().Len() { + fieldDesc := desc.Fields().Get(i) + fieldMask := mask.New() + // OneOfs are not covered separately as they can be unset by unsetting + // their inner fields + switch { + case fieldDesc.IsList() && fieldDesc.Message() != nil: + innerKnown, err := knownFieldsFromDescRecursive( + fieldDesc.Message(), recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", desc.Name(), err) + } + fieldMask.Any = innerKnown + case fieldDesc.IsMap() && fieldDesc.MapValue().Message() != nil: + innerKnown, err := knownFieldsFromDescRecursive( + fieldDesc.MapValue().Message(), recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", desc.Name(), err) + } + fieldMask.Any = innerKnown + case fieldDesc.Message() != nil: + innerKnown, err := knownFieldsFromDescRecursive( + fieldDesc.Message(), recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", desc.Name(), err) + } + fieldMask = innerKnown + } + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = fieldMask + } + return ret, nil +} + +// KnownFieldsFromDescriptor builds a set of known fields represented by +// a [mask.Mask] based on the given [protoreflect.MessageDescriptor]. +// +// The returned [mask.Mask] represents the full set of known fields defined by +// the message descriptor. Each field in the [mask.Mask] corresponds to a field +// that is known and defined within the descriptor. +// +// Parameters: +// - desc: The [protoreflect.MessageDescriptor] to extract known fields from. +// +// Returns: +// - *[mask.Mask]: A [mask.Mask] representing the full set of known fields +// defined by the message descriptor. +// - error: An error if there was any issue collecting the known fields. +func KnownFieldsFromDescriptor( + desc protoreflect.MessageDescriptor, +) (*mask.Mask, error) { + ret, err := knownFieldsFromDescRecursive(desc, 0) + if err != nil { + return nil, fmt.Errorf("failed to collect modification mask: %w", err) + } + + return ret, nil +} + +// KnownFieldsFromMessage builds a set of known fields represented by a +// [mask.Mask] based on the provided [proto.Message]. +// +// The returned [mask.Mask] represents the full set of known fields defined by +// the message. Each field in the [mask.Mask] corresponds to a field that is +// known and defined within the message descriptor. +// +// This function is just a wrap around [KnownFieldsFromDescriptor]: +// +// KnownFieldsFromDescriptor(msg.ProtoReflect().Descriptor()) +// +// Parameters: +// - msg: The [proto.Message] to extract known fields from. +// +// Returns: +// - *[mask.Mask]: A [mask.Mask] representing the full set of known fields +// defined by the message. +// - error: An error if there was any issue collecting the known fields. +func KnownFieldsFromMessage(msg proto.Message) (*mask.Mask, error) { + return KnownFieldsFromDescriptor(msg.ProtoReflect().Descriptor()) +} diff --git a/fieldmask/protobuf/from_descriptor_test.go b/fieldmask/protobuf/from_descriptor_test.go new file mode 100644 index 0000000..27e946f --- /dev/null +++ b/fieldmask/protobuf/from_descriptor_test.go @@ -0,0 +1,108 @@ +package protobuf + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestKnownFieldsFromMessage(t *testing.T) { + t.Parallel() + cases := []struct { + Input proto.Message + Err string + Mask string + }{ + { + Input: (&testdata.TestSimple{}), + Mask: "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32," + + "test_sint64,test_string,test_uint32,test_uint64", + }, + { + Input: (&testdata.TestStructs{}), + Mask: "test_intmap.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + "),test_repeated.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + "),test_stringmap.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + "),test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + ")", + }, + { + Input: (&testdata.TestOptional{}), + Mask: "test_single,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64)", + }, + { + Input: (&testdata.TestOneOf{}), + Mask: "test_string,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64),test_uint32", + }, + { + Input: (&testdata.TestWellKnown{}), + Mask: "test_any.(type_url,value),test_repeated_any.*.(type_url,value),test_repeated_ts.*.(nanos,seconds)," + + "test_ts.(nanos,seconds)", + }, + { // for now next three tests have errors, while I hope at some point they will change to noerror + Input: (&testdata.TestRecursiveSingle{}), + Err: "failed to collect modification mask: TestRecursiveSingle: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Input: (&testdata.TestRecursiveRepeated{}), + Err: "failed to collect modification mask: TestRecursiveRepeated: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Input: (&testdata.TestRecursiveMap{}), + Err: "failed to collect modification mask: TestRecursiveMap: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d from message", i), func(t *testing.T) { + t.Parallel() + ret, err := KnownFieldsFromMessage(c.Input) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + str, err := ret.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Mask, str) + } + }) + t.Run(fmt.Sprintf("case %d from descriptor", i), func(t *testing.T) { + t.Parallel() + ret, err := KnownFieldsFromDescriptor(c.Input.ProtoReflect().Descriptor()) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + str, err := ret.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Mask, str) + } + }) + } +} diff --git a/fieldmask/protobuf/from_message.go b/fieldmask/protobuf/from_message.go new file mode 100644 index 0000000..2d5c1d6 --- /dev/null +++ b/fieldmask/protobuf/from_message.go @@ -0,0 +1,149 @@ +package protobuf + +import ( + "fmt" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +func rmFromMessageRecursive( //nolint:gocognit // TODO: simplify + resetMask *mask.Mask, + updMsg protoreflect.Message, + recursion int, +) error { + if recursion >= recursionTooDeep { + return mask.ErrRecursionTooDeep + } + recursion++ + if updMsg == nil { + return nil + } + desc := updMsg.Descriptor() + for i := range desc.Fields().Len() { + fieldDesc := desc.Fields().Get(i) + fieldMask := resetMask.FieldParts[mask.FieldKey(fieldDesc.Name())] + if fieldMask == nil { + fieldMask = mask.New() + } + if !updMsg.Has(fieldDesc) { + resetMask.FieldParts[mask.FieldKey(fieldDesc.Name())] = fieldMask + continue + } + field := updMsg.Get(fieldDesc) + + // OneOfs are not covered separately as they can be unset by unsetting + // their inner fields + if fieldDesc.IsList() { + list := field.List() + if list.Len() == 0 { + resetMask.FieldParts[mask.FieldKey( + fieldDesc.Name(), + )] = fieldMask + } else if fieldDesc.Message() != nil { + innerMask := fieldMask.Any + if innerMask == nil { + innerMask = mask.New() + fieldMask.Any = innerMask + } + resetMask.FieldParts[mask.FieldKey( + fieldDesc.Name(), + )] = fieldMask + for i := range list.Len() { + err := rmFromMessageRecursive( + innerMask, list.Get(i).Message(), recursion, + ) + if err != nil { + return fmt.Errorf("%s[%d]: %w", desc.Name(), i, err) + } + } + } + continue + } + if fieldDesc.IsMap() { + fMap := field.Map() + if fMap.Len() == 0 { + resetMask.FieldParts[mask.FieldKey( + fieldDesc.Name(), + )] = fieldMask + } else if fieldDesc.MapValue().Message() != nil { + innerMask := fieldMask.Any + if innerMask == nil { + innerMask = mask.New() + fieldMask.Any = innerMask + } + resetMask.FieldParts[mask.FieldKey( + fieldDesc.Name(), + )] = fieldMask + var innerErr error + fMap.Range( + func(mk protoreflect.MapKey, v protoreflect.Value) bool { + err := rmFromMessageRecursive( + innerMask, v.Message(), recursion, + ) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: %w", desc.Name(), mk, err, + ) + return false + } + return true + }, + ) + if innerErr != nil { + return innerErr + } + } + continue + } + if fieldDesc.Message() != nil { + err := rmFromMessageRecursive(fieldMask, field.Message(), recursion) + if err != nil { + return fmt.Errorf("%s: %w", desc.Name(), err) + } + resetMask.FieldParts[mask.FieldKey(fieldDesc.Name())] = fieldMask + continue + } + if field.Equal(fieldDesc.Default()) { + resetMask.FieldParts[mask.FieldKey(fieldDesc.Name())] = fieldMask + } + } + return nil +} + +// ResetMaskFromMessage creates a reset [mask.Mask] of fields that are default +// or unset in the given [proto.Message], representing the fields +// that would be reset when applying the message. +// +// The reset mask identifies fields that are default or unset in the message, +// indicating the fields that would be reset to their default values or removed +// when the message is applied. +// +// Parameters: +// - update: The [proto.Message] to analyze and create the reset +// mask from. +// +// Returns: +// - *[mask.Mask]: A [mask.Mask] representing fields that are default or unset +// in the message, indicating the fields that would be reset or removed when +// applying the message. +// - error: An error if there was any issue collecting the reset mask. +func ResetMaskFromMessage( + update proto.Message, +) (*mask.Mask, error) { + if update == nil { + return nil, nil + } + updMsg := update.ProtoReflect() + ret := mask.New() + + // Collect modification mask by comparing initial and modified messages + err := rmFromMessageRecursive(ret, updMsg, 0) + if err != nil { + return nil, fmt.Errorf("failed to collect modification mask: %w", err) + } + + return ret, nil +} diff --git a/fieldmask/protobuf/from_message_test.go b/fieldmask/protobuf/from_message_test.go new file mode 100644 index 0000000..a9fa316 --- /dev/null +++ b/fieldmask/protobuf/from_message_test.go @@ -0,0 +1,455 @@ +package protobuf + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestResetMaskFromMessage(t *testing.T) { + t.Parallel() + someuint32full := uint32(42) + someuint32null := uint32(0) + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + } + cases := []struct { + Input proto.Message + Mask string + Err string + }{ + { + Input: &testdata.TestOneOf{}, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: nil, + }, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{}, + }, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 0, + }, + }, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 42, + }, + }, + Mask: "test_string,test_struct", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Mask: "test_string,test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Mask: "test_struct,test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{}, + }, + Mask: "test_string,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: nil, + }, + }, + Mask: "test_string,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Mask: "test_string,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_uint32", + }, + { + Input: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Mask: "test_string,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_uint32", + }, + { + Input: &testdata.TestSimple{}, + Mask: "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32," + + "test_sint64,test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestSimple{ + TestInt32: 42, + }, + Mask: "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int64,test_sfixed32,test_sfixed64,test_sint32," + + "test_sint64,test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestSimple{ + TestDouble: 8008.5, + TestInt32: 42, + TestFloat: 4.2, + TestInt64: 80085, + TestUint32: 0xF00D, + TestUint64: 0x7457E_F00D, + TestSint32: 0xD06_F00D, + TestSint64: 0xE47_F00D, + TestSfixed32: 7357, + TestFixed64: 69, + TestFixed32: 0xDEADBEEF, + TestSfixed64: -0xDEADBEEF, + TestBool: true, + TestString: "foo", + TestBytes: []byte("bar"), + TestEnum: testdata.ABC_ABC_B, + TestAliasedEnum: testdata.AliasedABC_AABC_B2, + }, + Mask: "", + }, + { + Input: &testdata.TestStructs{}, + Mask: "test_intmap,test_repeated,test_stringmap,test_struct", + }, + { + Input: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{}, + }, + Mask: "test_intmap,test_repeated,test_stringmap,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + ")", + }, + { + Input: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + Mask: "test_intmap,test_repeated,test_stringmap,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + ")", + }, + { + Input: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{}, + TestStringmap: map[string]*testdata.TestSimple{}, + }, + Mask: "test_intmap,test_repeated,test_stringmap,test_struct", + }, + { + Input: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestDouble: 4.2, + }, + {}, + }, + }, + Mask: "test_intmap,test_repeated.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_stringmap,test_struct", + }, + { + Input: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestDouble: 4.2, + }, + { + TestDouble: 4.2, + }, + }, + }, + Mask: "test_intmap,test_repeated.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_enum,test_fixed32," + + "test_fixed64,test_float,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_stringmap,test_struct", + }, + { + Input: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": { + TestDouble: 4.2, + }, + "b": {}, + }, + }, + Mask: "test_intmap,test_repeated,test_stringmap.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum," + + "test_fixed32,test_fixed64,test_float,test_int32,test_int64,test_sfixed32," + + "test_sfixed64,test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_struct", + }, + { + Input: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": { + TestDouble: 4.2, + }, + "b": { + TestDouble: 4.2, + }, + }, + }, + Mask: "test_intmap,test_repeated,test_stringmap.*.(" + + "test_aliased_enum,test_bool,test_bytes,test_enum," + + "test_fixed32,test_fixed64,test_float,test_int32,test_int64,test_sfixed32," + + "test_sfixed64,test_sint32,test_sint64,test_string,test_uint32,test_uint64" + + "),test_struct", + }, + { + Input: &testdata.TestRepeated{}, + Mask: "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestRepeated{ + TestDouble: []float64{}, + }, + Mask: "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestRepeated{ + TestDouble: []float64{ + 4.2, + }, + }, + Mask: "test_aliased_enum,test_bool,test_bytes,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestTypeMap{}, + Mask: "test_bool,test_fixed32,test_fixed64,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestTypeMap{ + TestUint32: map[uint32]string{}, + }, + Mask: "test_bool,test_fixed32,test_fixed64,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint32,test_uint64", + }, + { + Input: &testdata.TestTypeMap{ + TestUint32: map[uint32]string{ + 42: "this is the answer", + }, + }, + Mask: "test_bool,test_fixed32,test_fixed64,test_int32,test_int64,test_sfixed32,test_sfixed64," + + "test_sint32,test_sint64,test_string,test_uint64", + }, + { + Input: &testdata.TestOptional{}, + Mask: "test_single,test_struct", + }, + { + Input: &testdata.TestOptional{ + TestSingle: &someuint32null, + }, + Mask: "test_single,test_struct", + }, + { + Input: &testdata.TestOptional{ + TestSingle: &someuint32full, + }, + Mask: "test_struct", + }, + { + Input: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{}, + }, + Mask: "test_single,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_double,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + ")", + }, + { + Input: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + Mask: "test_single,test_struct.(" + + "test_aliased_enum,test_bool,test_bytes,test_enum,test_fixed32,test_fixed64," + + "test_float,test_int32,test_int64,test_sfixed32,test_sfixed64,test_sint32,test_sint64," + + "test_string,test_uint32,test_uint64" + + ")", + }, + { + Input: &testdata.TestRecursiveSingle{}, + Mask: "field", + }, + { + Input: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{}, + }, + Mask: "field.(recursive,some_string)", + }, + { + Input: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{ + SomeString: "foo", + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "bar", + Recursive: &testdata.RecursiveStruct{}, + }, + }, + }, + }, + Mask: "field.recursive.(recursive.recursive.(recursive,some_string),some_string)", + }, + { + Input: &testdata.TestRecursiveSingle{ + Field: proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + Err: "failed to collect modification mask: TestRecursiveSingle: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Input: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Err: "failed to collect modification mask: TestRecursiveRepeated[0]: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Input: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Err: "failed to collect modification mask: TestRecursiveMap[foo]: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Input: &testdata.TestX{ + Y: []*testdata.TestY{ + { + Z: []*testdata.TestZ{ + { + A: "a", + B: "", + }, + }, + }, + { + Z: nil, + }, + }, + }, + Mask: "y.*.z.*.b", + }, + { + Input: &testdata.TestA{ + B: map[string]*testdata.TestB{ + "1": { + C: map[string]*testdata.TestC{ + "1": { + X: "x", + Y: "", + }, + }, + }, + "2": { + C: nil, + }, + }, + }, + Mask: "b.*.c.*.y", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + ret, err := ResetMaskFromMessage(c.Input) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + str, err := ret.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Mask, str) + } + }) + } + t.Run("nil", func(t *testing.T) { + t.Parallel() + ret, err := ResetMaskFromMessage(nil) + assert.NoError(t, err) + assert.Nil(t, ret) + }) +} diff --git a/fieldmask/protobuf/from_modified.go b/fieldmask/protobuf/from_modified.go new file mode 100644 index 0000000..a1ec328 --- /dev/null +++ b/fieldmask/protobuf/from_modified.go @@ -0,0 +1,236 @@ +package protobuf + +import ( + "errors" + "fmt" + "strconv" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +func rmFrom2ListsRecursive( + initList, modList protoreflect.List, + desc protoreflect.FieldDescriptor, + recursion int, +) (*mask.Mask, error) { + if initList == nil || initList.Len() == 0 { + return nil, nil + } + ret := mask.New() + if initList.Len() > 0 && modList.Len() == 0 { + return ret, nil + } + if desc.Message() == nil { + return nil, nil + } + l := initList.Len() + if l > modList.Len() { + l = modList.Len() + } + for i := range l { + initEl := initList.Get(i) + modEl := modList.Get(i) + resetMask, err := rmFrom2MessagesRecursive( + initEl.Message(), modEl.Message(), recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s[%d]: %w", desc.Name(), i, err) + } + if resetMask != nil && !resetMask.IsEmpty() { + ret.FieldParts[mask.FieldKey(strconv.Itoa(i))] = resetMask + } + } + if ret.IsEmpty() { + return nil, nil + } + return ret, nil +} + +func mapKeyToFieldKey(from protoreflect.MapKey) (mask.FieldKey, error) { + val := from.Interface() + switch typedVal := val.(type) { + case bool: + return mask.FieldKey(strconv.FormatBool(typedVal)), nil + case int32: + return mask.FieldKey(strconv.FormatInt(int64(typedVal), 10)), nil + case int64: + return mask.FieldKey(strconv.FormatInt(typedVal, 10)), nil + case uint32: + return mask.FieldKey(strconv.FormatUint(uint64(typedVal), 10)), nil + case uint64: + return mask.FieldKey(strconv.FormatUint(typedVal, 10)), nil + case string: + return mask.FieldKey(typedVal), nil + default: + return "", fmt.Errorf("unsupported map key type %T", typedVal) + } +} + +func rmFrom2MapsRecursive( + initMap, modMap protoreflect.Map, + desc protoreflect.FieldDescriptor, + recursion int, +) (*mask.Mask, error) { + if initMap == nil || initMap.Len() == 0 { + return nil, nil + } + ret := mask.New() + if initMap.Len() > 0 && modMap.Len() == 0 { + return ret, nil + } + if desc.MapValue().Message() == nil { + return nil, nil + } + var innerErr error + initMap.Range( + func(mk protoreflect.MapKey, initVal protoreflect.Value) bool { + if modVal := modMap.Get(mk); modVal.IsValid() { + innerMask, err := rmFrom2MessagesRecursive( + initVal.Message(), modVal.Message(), recursion, + ) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: %w", desc.Name(), mk.String(), err, + ) + return false + } + if innerMask != nil && !innerMask.IsEmpty() { + key, err := mapKeyToFieldKey(mk) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: %w", desc.Name(), mk.String(), err, + ) + return false + } + ret.FieldParts[key] = innerMask + } + } + return true + }, + ) + if innerErr != nil { + return nil, innerErr + } + if ret.IsEmpty() { + return nil, nil + } + return ret, nil +} + +func rmFrom2MessagesRecursive( //nolint:gocognit // TODO: simplify? + initMsg, modMsg protoreflect.Message, + recursion int, +) (*mask.Mask, error) { + if recursion >= recursionTooDeep { + return nil, mask.ErrRecursionTooDeep + } + recursion++ + if initMsg == nil { + return nil, nil + } + if modMsg == nil { + return mask.New(), nil + } + initDesc := initMsg.Descriptor() + ret := mask.New() + for i := range initDesc.Fields().Len() { + fieldDesc := initDesc.Fields().Get(i) + if !initMsg.Has(fieldDesc) { + continue + } + if !modMsg.Has(fieldDesc) { + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = mask.New() + continue + } + initField := initMsg.Get(fieldDesc) + modField := modMsg.Get(fieldDesc) + // OneOfs are not covered separately as they can be unset by unsetting + // their inner fields + if fieldDesc.IsList() { + innerMask, err := rmFrom2ListsRecursive( + initField.List(), modField.List(), fieldDesc, recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", initDesc.Name(), err) + } + if innerMask != nil { + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = innerMask + } + continue + } + if fieldDesc.IsMap() { + innerMask, err := rmFrom2MapsRecursive( + initField.Map(), modField.Map(), fieldDesc, recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", initDesc.Name(), err) + } + if innerMask != nil { + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = innerMask + } + continue + } + if fieldDesc.Message() != nil { + innerMask, err := rmFrom2MessagesRecursive( + initField.Message(), modField.Message(), recursion, + ) + if err != nil { + return nil, fmt.Errorf("%s: %w", initDesc.Name(), err) + } + if innerMask != nil && !innerMask.IsEmpty() { + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = innerMask + } + continue + } + if modField.Equal(fieldDesc.Default()) && !initField.Equal(modField) { + ret.FieldParts[mask.FieldKey(fieldDesc.Name())] = mask.New() + } + } + return ret, nil +} + +// ResetMaskFromModified creates a reset [mask.Mask] of fields that have been +// removed from the object according to the [ResetMask specification] between +// two Protobuf messages: initial and modified. It traverses the Protobuf +// messages using protoreflect to compare their fields, identifying and +// capturing fields that have been removed in the modified message. +// +// Parameters: +// - initial: The original [proto.Message] before modification. +// - modified: The modified [proto.Message] after applying changes. +// +// Returns: +// - *[mask.Mask]: A [mask.Mask] representing fields that have been removed +// from the initial message based on the modification specified by the +// [ResetMask specification] between initial and modified. +// - error: An error if there was any issue collecting the modification mask. +// +// [ResetMask specification]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func ResetMaskFromModified( + initial, modified proto.Message, +) (*mask.Mask, error) { + if initial == nil || modified == nil { + return nil, errors.New("received nil") + } + initMsg := initial.ProtoReflect() + modMsg := modified.ProtoReflect() + + // Check if the messages are of the same type + if initMsg.Descriptor().FullName() != modMsg.Descriptor().FullName() { + return nil, fmt.Errorf( + "recieved messages of different types: initial %s, modified %s", + initMsg.Descriptor().FullName(), modMsg.Descriptor().FullName(), + ) + } + + // Collect modification mask by comparing initial and modified messages + ret, err := rmFrom2MessagesRecursive(initMsg, modMsg, 0) + if err != nil { + return nil, fmt.Errorf("failed to collect modification mask: %w", err) + } + + return ret, nil +} diff --git a/fieldmask/protobuf/from_modified_test.go b/fieldmask/protobuf/from_modified_test.go new file mode 100644 index 0000000..9265b38 --- /dev/null +++ b/fieldmask/protobuf/from_modified_test.go @@ -0,0 +1,885 @@ +package protobuf + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestResetMaskFromModified(t *testing.T) { + t.Parallel() + zero1 := uint32(0) + zero2 := uint32(0) + life1 := uint32(42) + life2 := uint32(42) + other1 := uint32(69) + + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + } + + cases := []struct { + Initial proto.Message + Modified proto.Message + Mask string + Err string + }{ + { + Initial: nil, + Modified: &testdata.TestSimple{}, + Err: "received nil", + }, + { + Initial: nil, + Modified: nil, + Err: "received nil", + }, + { + Initial: &testdata.TestSimple{}, + Modified: nil, + Err: "received nil", + }, + { + Initial: &testdata.TestSimple{ + TestDouble: 4.2, + }, + Modified: &testdata.TestSimple{}, + Mask: "test_double", + }, + { + Initial: &testdata.TestSimple{}, + Modified: &testdata.TestSimple{ + TestDouble: 4.2, + }, + Mask: "", + }, + { + Initial: &testdata.TestSimple{ + TestDouble: 5.3, + }, + Modified: &testdata.TestSimple{ + TestDouble: 4.2, + }, + Mask: "", + }, + { + Initial: &testdata.TestStructs{}, + Modified: &testdata.TestSimple{}, + Err: "recieved messages of different types: initial nebius.testdata.TestStructs, modified nebius.testdata.TestSimple", + }, + { + Initial: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{}, + }, + Modified: &testdata.TestOptional{}, + Mask: "test_struct", + }, + { + Initial: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{}, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_struct", + }, + { + Initial: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{}, + }, + Modified: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{}, + }, + Mask: "", + }, + { + Initial: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + Modified: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{}, + }, + Mask: "test_struct.test_double", + }, + { + Initial: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_struct", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{}, + }, + Modified: &testdata.TestStructs{}, + Mask: "", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{}, + }, + Modified: &testdata.TestStructs{}, + Mask: "", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_repeated", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_stringmap", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 4.2, + }, + &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_repeated", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{ + TestDouble: 4.2, + }, + "b": &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{}, + Mask: "test_stringmap", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 4.2, + }, + &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{}, + }, + Mask: "test_repeated", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{ + TestDouble: 4.2, + }, + "b": &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{}, + }, + Mask: "test_stringmap", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 4.2, + }, + &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{}, + }, + }, + Mask: "test_repeated.0.test_double", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{}, + &testdata.TestSimple{}, + }, + }, + Mask: "test_repeated.0.test_double", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{}, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{}, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 4.2, + }, + &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + &testdata.TestSimple{ + TestDouble: 5.3, + }, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{}, + "b": &testdata.TestSimple{ + TestDouble: 4.2, + }, + "c": &testdata.TestSimple{ + TestDouble: 4.2, + }, + "d": &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + }, + Modified: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{}, + "b": &testdata.TestSimple{}, + "c": &testdata.TestSimple{ + TestDouble: 4.3, + }, + "e": &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + }, + Mask: "test_stringmap.b.test_double", + }, + { + Initial: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{}, + "c": &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + }, + Modified: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "a": &testdata.TestSimple{}, + "b": &testdata.TestSimple{}, + "c": &testdata.TestSimple{ + TestDouble: 4.3, + }, + "e": &testdata.TestSimple{ + TestDouble: 4.2, + }, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: nil, + }, + Modified: &testdata.TestOptional{ + TestSingle: nil, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &zero1, + }, + Modified: &testdata.TestOptional{ + TestSingle: nil, + }, + Mask: "test_single", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &zero1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &zero2, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &life1, + }, + Modified: &testdata.TestOptional{ + TestSingle: nil, + }, + Mask: "test_single", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &life1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &life2, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &life1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &life1, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &life1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &other1, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &zero1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &life1, + }, + Mask: "", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: &life1, + }, + Modified: &testdata.TestOptional{ + TestSingle: &zero1, + }, + Mask: "test_single", + }, + { + Initial: &testdata.TestOptional{ + TestSingle: nil, + }, + Modified: &testdata.TestOptional{ + TestSingle: &life1, + }, + Mask: "", + }, + { + Initial: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{ + SomeString: "foo", + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "bar", + Recursive: &testdata.RecursiveStruct{ + SomeString: "baz", + }, + }, + }, + }, + }, + Modified: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "bax", + Recursive: &testdata.RecursiveStruct{ + SomeString: "bae", + Recursive: &testdata.RecursiveStruct{}, + }, + }, + }, + }, + Mask: "field.(recursive.recursive.recursive.some_string,some_string)", + }, + { + Initial: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{ + SomeString: "foo", + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "bar", + Recursive: &testdata.RecursiveStruct{ + SomeString: "baz", + }, + }, + }, + }, + }, + Modified: &testdata.TestRecursiveSingle{ + Field: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "bax", + Recursive: &testdata.RecursiveStruct{ + SomeString: "bae", + }, + }, + }, + }, + Mask: "field.(recursive.recursive.recursive,some_string)", + }, + { + Initial: &testdata.TestRecursiveSingle{ + Field: proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + Modified: &testdata.TestRecursiveSingle{ + Field: proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + Err: "failed to collect modification mask: TestRecursiveSingle: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Initial: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Modified: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Err: "failed to collect modification mask: TestRecursiveRepeated: field[0]: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Initial: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Modified: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Err: "failed to collect modification mask: TestRecursiveMap: field[foo]: " + + strings.Repeat("RecursiveStruct: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Initial: &testdata.TestRepeated{ + TestDouble: []float64{}, + }, + Modified: &testdata.TestRepeated{}, + Mask: "", + }, + { + Initial: &testdata.TestRepeated{ + TestDouble: []float64{}, + }, + Modified: &testdata.TestRepeated{ + TestDouble: []float64{}, + }, + Mask: "", + }, + { + Initial: &testdata.TestRepeated{ + TestDouble: []float64{1, 2}, + }, + Modified: &testdata.TestRepeated{}, + Mask: "test_double", + }, + { + Initial: &testdata.TestRepeated{ + TestDouble: []float64{1, 2}, + }, + Modified: &testdata.TestRepeated{ + TestDouble: []float64{}, + }, + Mask: "test_double", + }, + { + Initial: &testdata.TestRepeated{ + TestDouble: []float64{1, 2}, + }, + Modified: &testdata.TestRepeated{ + TestDouble: []float64{4}, + }, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{}, + }, + Modified: &testdata.TestStringMap{}, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{}, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{}, + }, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{}, + }, + Mask: "test_double", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Modified: &testdata.TestStringMap{}, + Mask: "test_double", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 5.2, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + }, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "b": 4.2, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "a": 4.2, + "b": 4.3, + }, + }, + Modified: &testdata.TestStringMap{ + TestDouble: map[string]float64{ + "b": 4.2, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{}, + Modified: &testdata.TestOneOf{}, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Modified: &testdata.TestOneOf{}, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Modified: &testdata.TestOneOf{}, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Modified: &testdata.TestOneOf{}, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Modified: &testdata.TestOneOf{}, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Modified: &testdata.TestOneOf{}, + Mask: "test_string", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: nil, + }, + }, + Mask: "", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 42, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: nil, + }, + }, + Mask: "test_struct.test_uint32", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 42, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Mask: "test_struct.test_uint32", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 23, + TestInt64: 35, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 69, + TestUint32: 42, + }, + }, + }, + Mask: "test_struct.test_int64", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 23, + TestInt64: 35, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Mask: "test_struct", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 23, + TestInt64: 35, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Mask: "test_struct", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestUint32: 23, + TestInt64: 35, + }, + }, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Mask: "test_struct", + }, + { + Initial: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{}, + }, + Modified: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Mask: "test_struct", + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + ret, err := ResetMaskFromModified(c.Initial, c.Modified) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + if ret != nil { + str, err := ret.Marshal() + assert.NoError(t, err) + assert.Equal(t, c.Mask, str) + } + } + }) + } +} diff --git a/fieldmask/protobuf/manipulate.go b/fieldmask/protobuf/manipulate.go new file mode 100644 index 0000000..40e1887 --- /dev/null +++ b/fieldmask/protobuf/manipulate.go @@ -0,0 +1,666 @@ +package protobuf + +import ( + "errors" + "fmt" + "reflect" + "strconv" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" +) + +var ErrBasicTypeInTheMiddle = errors.New("found basic type in the middle of the path, can't descend deeper") +var ErrNotFound = errors.New("field name not found") +var ErrOutOfBounds = errors.New("out of list bounds") + +func removeListElement(l protoreflect.List, pos int) { + rest := []protoreflect.Value{} + for i := pos + 1; i < l.Len(); i++ { + rest = append(rest, l.Get(i)) + } + if l.Len() > pos { + l.Truncate(pos) + } + for _, el := range rest { + l.Append(el) + } +} + +func recursiveReplaceAtFieldPath( //nolint:funlen,gocognit,gocyclo,cyclop // TODO: split + data protoreflect.Message, + path mask.FieldPath, + newVal protoreflect.Value, + recursion int, +) error { + if recursion >= recursionTooDeep { + return mask.ErrRecursionTooDeep + } + recursion++ + + if len(path) == 0 { + if newVal.Interface() == nil { + desc := data.Descriptor() + fieldDescs := desc.Fields() + for i := range fieldDescs.Len() { + fd := fieldDescs.Get(i) + data.Clear(fd) + } + return nil + } + if msg, ok := newVal.Interface().(protoreflect.Message); ok { + if msg.Descriptor().FullName() != data.Descriptor().FullName() { + return fmt.Errorf( + "can't replace message %s with message %s", + data.Descriptor().FullName(), msg.Descriptor().FullName(), + ) + } + desc := data.Descriptor() + fieldDescs := desc.Fields() + for i := range fieldDescs.Len() { + fd := fieldDescs.Get(i) + if !msg.Has(fd) { + if data.Has(fd) { + data.Clear(fd) + } + } else { + data.Set(fd, msg.Get(fd)) + } + } + return nil + } + return fmt.Errorf( + "can't replace message %s with value of type %T", + data.Descriptor().FullName(), newVal.Interface(), + ) + } + fieldKey, rest := path[0], path[1:] + + desc := data.Descriptor() + fieldDesc := desc.Fields().ByName(protoreflect.Name(fieldKey)) + if fieldDesc == nil { + return fmt.Errorf("%s: %w", fieldKey, ErrNotFound) + } + if len(rest) == 0 { + // all nil types + if newVal.Interface() == nil { + data.Clear(fieldDesc) + return nil + } + switch o := newVal.Interface().(type) { + case protoreflect.Map: + if !fieldDesc.IsMap() { + return fmt.Errorf( + "%s: can't replace %s with map", fieldKey, fieldDesc.Kind(), + ) + } + fMapVal := data.NewField(fieldDesc) + fMap := fMapVal.Map() + var innerErr error + o.Range(func(mk protoreflect.MapKey, v protoreflect.Value) bool { + defer func() { + if r := recover(); r != nil { + innerErr = fmt.Errorf( + "%s[%s]: failed to set map value: panic: %s", + fieldKey, mk, r, + ) + } + }() + if v.IsValid() { + fMap.Set(mk, v) + } + return true + }) + if innerErr != nil { + return innerErr + } + data.Set(fieldDesc, fMapVal) + return nil + case protoreflect.List: + if !fieldDesc.IsList() { + return fmt.Errorf( + "%s: can't replace %s with list", + fieldKey, fieldDesc.Kind(), + ) + } + fListVal := data.NewField(fieldDesc) + fList := fListVal.List() + for i := range o.Len() { + err := func() (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic: %s", r) + } + }() + el := o.Get(i) + if el.IsValid() { + fList.Append(o.Get(i)) + } + return nil + }() + if err != nil { + return fmt.Errorf( + "%s: failed to set list value: %w", fieldKey, err, + ) + } + } + data.Set(fieldDesc, fListVal) + return nil + } + err := func() (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic: %s", r) + } + }() + data.Set(fieldDesc, newVal) + return nil + }() + if err != nil { + return fmt.Errorf("%s: failed to set value: %w", fieldKey, err) + } + return nil + } + if fieldDesc.IsList() { + list := data.Mutable(fieldDesc).List() + listNum, restList := rest[0], rest[1:] + i, err := strconv.Atoi(string(listNum)) + if err != nil { + return fmt.Errorf( + "%s.%s: failed to convert to list index", fieldKey, listNum, + ) + } + if i < 0 || i > list.Len() { + return fmt.Errorf("%s[%d]: %w", fieldKey, i, ErrOutOfBounds) + } + if len(restList) == 0 { + if newVal.Interface() == nil { + removeListElement(list, i) + return nil + } + err := func() (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic: %s", r) + } + }() + if list.Len() == i { + list.Append(newVal) + } else { + list.Set(i, newVal) + } + return nil + }() + if err != nil { + return fmt.Errorf( + "%s[%d]: failed to set value: %w", fieldKey, i, err, + ) + } + return nil + } + if fieldDesc.Kind() != protoreflect.MessageKind { + return fmt.Errorf("%s[%d]: %w", fieldKey, i, ErrBasicTypeInTheMiddle) + } + var listMsg protoreflect.Message + if i == list.Len() { + listMsg = list.NewElement().Message() + } else { + listMsg = list.Get(i).Message() + } + if err := recursiveReplaceAtFieldPath( + listMsg, restList, newVal, recursion, + ); err != nil { + return fmt.Errorf("%s[%d]: %w", fieldKey, i, err) + } + if i == list.Len() { + list.Append(protoreflect.ValueOf(listMsg)) + } else { + list.Set(i, protoreflect.ValueOf(listMsg)) + } + return nil + } + if fieldDesc.IsMap() { + fMap := data.Mutable(fieldDesc).Map() + mapKey, restMap := rest[0], rest[1:] + mk, err := mapKeyFromFieldKey(mapKey, fieldDesc.MapKey().Kind()) + if err != nil { + return fmt.Errorf( + "%s.%s: failed to convert to map key: %w", + fieldKey, mapKey, err, + ) + } + if len(restMap) == 0 { + if newVal.Interface() == nil { + fMap.Clear(mk) + return nil + } + err := func() (err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic: %s", r) + } + }() + fMap.Set(mk, newVal) + return nil + }() + if err != nil { + return fmt.Errorf( + "%s[%s]: failed to set value: %w", + fieldKey, mk, err, + ) + } + return nil + } + if fieldDesc.MapValue().Kind() != protoreflect.MessageKind { + return fmt.Errorf("%s[%s]: %w", fieldKey, mk, ErrBasicTypeInTheMiddle) + } + var valMsg protoreflect.Message + if fMap.Has(mk) { + valMsg = fMap.Get(mk).Message() + } else { + valMsg = fMap.NewValue().Message() + } + if err := recursiveReplaceAtFieldPath( + valMsg, restMap, newVal, recursion, + ); err != nil { + return fmt.Errorf("%s[%s]: %w", fieldKey, mk, err) + } + fMap.Set(mk, protoreflect.ValueOf(valMsg)) + return nil + } + if fieldDesc.Kind() != protoreflect.MessageKind { + return fmt.Errorf("%s: %w", fieldKey, ErrBasicTypeInTheMiddle) + } + valMsg := data.Mutable(fieldDesc).Message() + if err := recursiveReplaceAtFieldPath( + valMsg, rest, newVal, recursion, + ); err != nil { + return fmt.Errorf("%s: %w", fieldKey, err) + } + + return nil +} + +func mapKeyFromFieldKey( + from mask.FieldKey, + kind protoreflect.Kind, +) (protoreflect.MapKey, error) { + switch kind { //nolint:exhaustive // don't need to check all kinds + case protoreflect.BoolKind: + ret, err := strconv.ParseBool(string(from)) + if err != nil { + return protoreflect.MapKey{}, fmt.Errorf( + "failed to convert to bool map key: %w", err, + ) + } + return protoreflect.ValueOf(ret).MapKey(), nil + case protoreflect.Int32Kind, protoreflect.Sint32Kind, + protoreflect.Sfixed32Kind: + ret, err := strconv.ParseInt(string(from), 10, 32) + if err != nil { + return protoreflect.MapKey{}, fmt.Errorf( + "failed to convert to int32 map key: %w", err, + ) + } + return protoreflect.ValueOf(int32(ret)).MapKey(), nil + case protoreflect.Int64Kind, protoreflect.Sint64Kind, + protoreflect.Sfixed64Kind: + ret, err := strconv.ParseInt(string(from), 10, 64) + if err != nil { + return protoreflect.MapKey{}, fmt.Errorf( + "failed to convert to int64 map key: %w", err, + ) + } + return protoreflect.ValueOf(ret).MapKey(), nil + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + ret, err := strconv.ParseUint(string(from), 10, 32) + if err != nil { + return protoreflect.MapKey{}, fmt.Errorf( + "failed to convert to uint32 map key: %w", err, + ) + } + return protoreflect.ValueOf(uint32(ret)).MapKey(), nil + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + ret, err := strconv.ParseUint(string(from), 10, 64) + if err != nil { + return protoreflect.MapKey{}, fmt.Errorf( + "failed to convert to uint64 map key: %w", err, + ) + } + return protoreflect.ValueOf(ret).MapKey(), nil + case protoreflect.StringKind: + return protoreflect.ValueOf(string(from)).MapKey(), nil + default: + return protoreflect.MapKey{}, fmt.Errorf( + "unsupported map key kind %s", kind, + ) + } +} + +type cloneMap struct { + Source protoreflect.Map +} + +func newCloneMap(m protoreflect.Map) protoreflect.Map { + return cloneMap{ + Source: m, + } +} + +func (c cloneMap) Clear(mk protoreflect.MapKey) { + c.Source.Clear(mk) +} +func (c cloneMap) Get(mk protoreflect.MapKey) protoreflect.Value { + return cloneValue(c.Source.Get(mk)) +} +func (c cloneMap) Has(mk protoreflect.MapKey) bool { + return c.Source.Has(mk) +} +func (c cloneMap) IsValid() bool { + return c.Source.IsValid() +} +func (c cloneMap) Len() int { + return c.Source.Len() +} +func (c cloneMap) Mutable(mk protoreflect.MapKey) protoreflect.Value { + return cloneValue(c.Source.Get(mk)) +} +func (c cloneMap) NewValue() protoreflect.Value { + return c.Source.NewValue() +} +func (c cloneMap) Range( + f func(mk protoreflect.MapKey, v protoreflect.Value) bool, +) { + c.Source.Range(func(mk protoreflect.MapKey, v protoreflect.Value) bool { + vClone := cloneValue(v) + return f(mk, vClone) + }) +} +func (c cloneMap) Set(mk protoreflect.MapKey, v protoreflect.Value) { + c.Source.Set(mk, v) +} + +type cloneList struct { + Source protoreflect.List +} + +func newCloneList(l protoreflect.List) protoreflect.List { + return cloneList{ + Source: l, + } +} + +func (c cloneList) Append(v protoreflect.Value) { + c.Source.Append(v) +} +func (c cloneList) AppendMutable() protoreflect.Value { + return c.Source.AppendMutable() +} +func (c cloneList) Get(i int) protoreflect.Value { + return cloneValue(c.Source.Get(i)) +} +func (c cloneList) IsValid() bool { + return c.Source.IsValid() +} +func (c cloneList) Len() int { + return c.Source.Len() +} +func (c cloneList) NewElement() protoreflect.Value { + return c.Source.NewElement() +} +func (c cloneList) Set(i int, v protoreflect.Value) { + c.Source.Set(i, v) +} +func (c cloneList) Truncate(i int) { + c.Source.Truncate(i) +} + +func cloneValue(val protoreflect.Value) protoreflect.Value { + switch o := val.Interface().(type) { + case protoreflect.Message: + if o == nil || o.Interface() == nil { + return protoreflect.ValueOf(nil) + } + if reflect.ValueOf(o.Interface()).IsNil() { + return protoreflect.ValueOf(nil) + } + return protoreflect.ValueOfMessage( + proto.Clone(o.Interface()).ProtoReflect(), + ) + case protoreflect.Map: + return protoreflect.ValueOfMap(newCloneMap(o)) + case protoreflect.List: + return protoreflect.ValueOfList(newCloneList(o)) + } + return protoreflect.ValueOf(val.Interface()) +} + +func convertToValue(val interface{}) (_ protoreflect.Value, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("panic: %s", r) + } + }() + switch valOfType := val.(type) { + case protoreflect.Value: + return cloneValue(valOfType), nil + case proto.Message: + if valOfType == nil { + return protoreflect.ValueOf(nil), nil + } + return protoreflect.ValueOfMessage( + proto.Clone(valOfType).ProtoReflect(), + ), nil + default: + return protoreflect.ValueOf(val), nil + } +} + +// ReplaceAtFieldPath traverses a [proto.Message] based on the +// provided [mask.FieldPath] and replaces or clears the value at the end of the +// path. +// +// The ReplaceAtFieldPath function traverses the specified +// [proto.Message] based on the given [mask.FieldPath] to locate a +// specific field. It replaces the value of the field at the end of the path +// with the provided `newVal`, regardless of whether the field is a message, +// list, map, or a scalar. If `nil` is provided as `newVal`, it clears the field +// (sets it to its zero value) or removes the list/map value at the specified +// position. +// +// The value type has to be the same as the target field type, strictly. +// +// If the [mask.FieldPath] is empty, the function performs a shallow replace of +// each message field in the [proto.Message] with the ones from the +// newVal. +// +// Map keys and list indexes are treated as separate FieldKeys during traversal. +// List index will be replaced or added if it's i+1 index. Removal will shrink +// the list one element down, removal of i+1 element takes no effect, as well as +// removal of unset element of a map. +// +// If a basic field (scalar) is encountered along the path, the function fails +// with an error wrapped around [ErrBasicTypeInTheMiddle], possibly multiple times +// if the basic field is not at the beginning of the path. +// +// Parameters: +// - data [proto.Message]: The message to traverse and modify. +// - path [mask.FieldPath]: The path indicating the path to traverse within +// the `data`. +// - newVal: The new value to replace the existing value at the end of the +// [mask.FieldPath]. Pass `nil` to clear the field or remove a list/map +// value. +// +// Returns: +// - error: An error encountered during traversal or replacement. +func ReplaceAtFieldPath( + data proto.Message, + path mask.FieldPath, + newVal interface{}, +) error { + valValue, err := convertToValue(newVal) + if err != nil { + return fmt.Errorf("failed to convert to protoreflect.Value: %w", err) + } + return recursiveReplaceAtFieldPath(data.ProtoReflect(), path, valValue, 0) +} + +func recursiveGetAtFieldPath( //nolint:funlen,gocognit // TODO: split? + data protoreflect.Message, + path mask.FieldPath, + recursion int, +) (protoreflect.Value, protoreflect.FieldDescriptor, error) { + if recursion >= recursionTooDeep { + return protoreflect.Value{}, nil, mask.ErrRecursionTooDeep + } + recursion++ + + if len(path) == 0 { + return protoreflect.ValueOf(data), nil, nil + } + fieldKey, rest := path[0], path[1:] + wasOneOf := false + + desc := data.Descriptor() + fieldDesc := desc.Fields().ByName(protoreflect.Name(fieldKey)) + if fieldDesc == nil { + if oof := desc.Oneofs().ByName( + protoreflect.Name(fieldKey), + ); oof != nil { + wasOneOf = true + fieldDesc = data.WhichOneof(oof) + if fieldDesc == nil { + fieldDesc = oof.Fields().ByNumber(0) + return protoreflect.Value{}, fieldDesc, nil + } + } else { + return protoreflect.Value{}, nil, fmt.Errorf( + "%s: %w", fieldKey, ErrNotFound, + ) + } + } + if len(rest) == 0 { + if fieldDesc.HasPresence() && !data.Has(fieldDesc) && + fieldDesc.Kind() != protoreflect.MessageKind { + return protoreflect.ValueOf(nil), fieldDesc, nil + } + return data.Get(fieldDesc), fieldDesc, nil + } + if fieldDesc.IsList() { + list := data.Get(fieldDesc).List() + listNum, restList := rest[0], rest[1:] + i, err := strconv.Atoi(string(listNum)) + if err != nil { + return protoreflect.Value{}, nil, fmt.Errorf( + "%s.%s: failed to convert to list index", fieldKey, listNum, + ) + } + if i < 0 || i >= list.Len() { + return protoreflect.Value{}, nil, fmt.Errorf( + "%s[%d]: %w", fieldKey, i, ErrOutOfBounds, + ) + } + if len(restList) == 0 { + return list.Get(i), fieldDesc, nil + } + if fieldDesc.Kind() != protoreflect.MessageKind { + return list.Get(i), fieldDesc, fmt.Errorf( + "%s[%d]: %w", fieldKey, i, ErrBasicTypeInTheMiddle, + ) + } + listMsg := list.Get(i).Message() + rv, rd, err := recursiveGetAtFieldPath(listMsg, restList, recursion) + if err != nil { + return rv, rd, fmt.Errorf("%s[%d]: %w", fieldKey, i, err) + } + return rv, rd, nil + } + if fieldDesc.IsMap() { + fMap := data.Get(fieldDesc).Map() + mapKey, restMap := rest[0], rest[1:] + mk, err := mapKeyFromFieldKey(mapKey, fieldDesc.MapKey().Kind()) + if err != nil { + return protoreflect.Value{}, nil, fmt.Errorf( + "%s.%s: failed to convert to map key: %w", + fieldKey, mapKey, err, + ) + } + if len(restMap) == 0 { + ret := fMap.Get(mk) + if ret.IsValid() { + return ret, fieldDesc.MapValue(), nil + } + return ret, fieldDesc.MapValue(), fmt.Errorf( + "%s[%s]: %w", fieldKey, mapKey, ErrNotFound, + ) + } + if fieldDesc.MapValue().Kind() != protoreflect.MessageKind { + return fMap.Get(mk), fieldDesc.MapValue(), fmt.Errorf( + "%s[%s]: %w", fieldKey, mk, ErrBasicTypeInTheMiddle, + ) + } + valMsg := fMap.Get(mk).Message() + rv, rd, err := recursiveGetAtFieldPath(valMsg, restMap, recursion) + if err != nil { + return rv, rd, fmt.Errorf("%s[%s]: %w", fieldKey, mk, err) + } + return rv, rd, nil + } + if fieldDesc.Kind() != protoreflect.MessageKind || wasOneOf { + return data.Get(fieldDesc), fieldDesc, fmt.Errorf( + "%s: %w", fieldKey, ErrBasicTypeInTheMiddle, + ) + } + valMsg := data.Get(fieldDesc).Message() + rv, rd, err := recursiveGetAtFieldPath(valMsg, rest, recursion) + if err != nil { + return rv, rd, fmt.Errorf("%s: %w", fieldKey, err) + } + return rv, rd, nil +} + +// GetAtFieldPath traverses a [proto.Message] based on the +// provided [mask.FieldPath] to retrieve a value and its field descriptor. +// +// The GetAtFieldPath function traverses the specified [proto.Message] based on +// the given [mask.FieldPath] to locate a specific field. It returns the +// [protoreflect.Value] of the field and its associated +// [protoreflect.FieldDescriptor] if found. If the [mask.FieldPath] is empty, +// the function returns the passed [proto.Message] itself (wrapped into +// [protoreflect.Value]) and a `nil` instead of [protoreflect.FieldDescriptor], +// as it's not considered a field. +// +// It will return [protoreflect.ValueOf](nil) if the field can be tested for +// presence (eg optional or oneof), and is actually not present. +// +// Map keys and list indexes are treated as separate FieldKeys during traversal. +// +// If a basic field (scalar) is encountered along the path, the function fails +// with an error wrapped around [ErrBasicTypeInTheMiddle], possibly multiple times +// if the basic field is not at the beginning of the path. +// +// Other errors will be accompanied by the value that is not +// [protoreflect.Value.IsValid](). +// +// Note: [protoreflect.ValueOf](nil) for fields with explicit presence will also +// show negative [protoreflect.Value.IsValid](). +// +// Parameters: +// - data [proto.Message]: The message to traverse. +// - path [mask.FieldPath]: The path indicating the path to traverse within +// the [proto.Message]. +// +// Returns: +// - [protoreflect.Value]: The value of the field located at the end of the +// [mask.FieldPath]. +// - [protoreflect.FieldDescriptor]: The field descriptor corresponding to the +// located field. +// - error: An error encountered during traversal. +func GetAtFieldPath( + data proto.Message, + path mask.FieldPath, +) (protoreflect.Value, protoreflect.FieldDescriptor, error) { + return recursiveGetAtFieldPath(data.ProtoReflect(), path, 0) +} diff --git a/fieldmask/protobuf/manipulate_test.go b/fieldmask/protobuf/manipulate_test.go new file mode 100644 index 0000000..4f27d0e --- /dev/null +++ b/fieldmask/protobuf/manipulate_test.go @@ -0,0 +1,1378 @@ +package protobuf + +import ( + "errors" + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestGetAtFieldPath(t *testing.T) { + t.Parallel() + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + veryPath := mask.FieldPath{} + for _ = range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + veryPath = append(veryPath, "recursive") + } + cases := []struct { + Message proto.Message + Path mask.FieldPath + Val protoreflect.Value + NoDesc bool + Err string + IsNotFound bool + }{ + { + Message: &testdata.TestOneOf{}, + Path: mask.FieldPath{"test_oneof"}, + Val: protoreflect.ValueOf(nil), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{}, + }, + Path: mask.FieldPath{"test_oneof"}, + Val: protoreflect.ValueOfUint32(0), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 42, + }, + }, + Path: mask.FieldPath{"test_oneof"}, + Val: protoreflect.ValueOfUint32(42), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 42, + }, + }, + Path: mask.FieldPath{"test_oneof", "abc"}, + Val: protoreflect.ValueOfUint32(42), + Err: "test_oneof: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{}, + }, + Path: mask.FieldPath{"test_oneof"}, + Val: protoreflect.ValueOf((*testdata.TestSimple)(nil).ProtoReflect()), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{}, + }, + Path: mask.FieldPath{"test_oneof", "abc"}, + Val: protoreflect.ValueOf((*testdata.TestSimple)(nil).ProtoReflect()), + Err: "test_oneof: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_oneof"}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestInt32: 42, + }).ProtoReflect()), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_oneof", "test_struct"}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestInt32: 42, + }).ProtoReflect()), + Err: "test_oneof: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_struct"}, + Val: protoreflect.ValueOf((*testdata.TestSimple)(nil).ProtoReflect()), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_oneof", "test_int32"}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestInt32: 42, + }).ProtoReflect()), + Err: "test_oneof: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(uint32(0)), + }, + { + Message: &testdata.TestSimple{}, + Path: mask.FieldPath{"nonexistent"}, + Err: "nonexistent: field name not found", + IsNotFound: true, + }, + { + Message: &testdata.TestSimple{}, + Path: mask.FieldPath{"nonexistent", "foo"}, + Err: "nonexistent: field name not found", + IsNotFound: true, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32", "foo"}, + Val: protoreflect.ValueOf(int32(42)), + Err: "test_int32: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestInt32: 42, + }).ProtoReflect()), + NoDesc: true, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "0"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_uint32", "0"}, + Err: "test_uint32[0]: out of list bounds", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "1"}, + Err: "test_int32[1]: out of list bounds", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "abracadabra"}, + Err: "test_int32.abracadabra: failed to convert to list index", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "0", "foo"}, + Val: protoreflect.ValueOf(int32(42)), + Err: "test_int32[0]: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "42"}, + Val: protoreflect.ValueOf("answer"), + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "23"}, + Err: "test_int32[23]: field name not found", + IsNotFound: true, + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "abracadabra"}, + Err: "test_int32.abracadabra: failed to convert to map key: failed to convert to int32 map key: strconv.ParseInt: parsing \"abracadabra\": invalid syntax", + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "42", "foo"}, + Val: protoreflect.ValueOf("answer"), + Err: "test_int32[42]: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_struct", "test_int32"}, + Val: protoreflect.ValueOf(int32(0)), + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_repeated", "0", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_stringmap", "foo", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_stringmap", "foo"}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestInt32: 42, + }).ProtoReflect()), + }, + { + Message: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + Path: mask.FieldPath{"test_struct", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: proto.Clone(veryRecursive), + Path: veryPath, + Err: strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "0"}.Join(veryPath...), + Err: "field[0]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "foo"}.Join(veryPath...), + Err: "field[foo]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive", "recursive", "recursive", "recursive", "some_string"}, + Val: protoreflect.ValueOf(""), + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive", "recursive", "recursive", "recursive", "nonexistent"}, + Err: "field[foo]: recursive: recursive: recursive: recursive: nonexistent: field name not found", + IsNotFound: true, + }, + { + Message: &testdata.TestOneOf{}, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(nil), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(nil), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "", + }, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(nil), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(nil), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(uint32(0)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: protoreflect.ValueOf(uint32(42)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_struct", "test_int64"}, + Val: protoreflect.ValueOf(int64(0)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_struct", "test_int64"}, + Val: protoreflect.ValueOf(int64(0)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_struct", "test_int64"}, + Val: protoreflect.ValueOf(int64(0)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt64: 42, + }, + }, + }, + Path: mask.FieldPath{"test_struct", "test_int64"}, + Val: protoreflect.ValueOf(int64(42)), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt64: 42, + }, + }, + }, + Path: mask.FieldPath{"test_string"}, + Val: protoreflect.ValueOf(nil), + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + a, merr1 := protojson.Marshal(c.Message) + + val, desc, err := GetAtFieldPath(c.Message, c.Path) + + b, merr2 := protojson.Marshal(c.Message) + if merr1 != nil { + assert.Equal(t, merr1.Error(), merr2.Error()) + } else { + assert.JSONEq(t, string(a), string(b)) + } + + if c.Err != "" { + assert.EqualError(t, err, c.Err) + assert.Equal(t, c.IsNotFound, errors.Is(err, ErrNotFound)) + } else { + assert.NoError(t, err) + } + if c.Val.IsValid() { + assert.True(t, val.IsValid(), "expecting valid value", c.Val.Interface()) + assert.Equal(t, c.Val.Interface(), val.Interface()) + if !c.NoDesc { + assert.NotNil(t, desc) + } + } else { + assert.False(t, val.IsValid(), "unexpected received val", val.Interface()) + } + }) + } +} + +func TestReplaceAtFieldPath(t *testing.T) { + t.Parallel() + t.Run("just call", func(t *testing.T) { + t.Parallel() + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + veryRecursive2 := &testdata.RecursiveStruct{ + SomeString: "foo", + } + veryPath := mask.FieldPath{} + for i := range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + veryRecursive2 = &testdata.RecursiveStruct{ + Recursive: veryRecursive2, + } + if i == recursionTooDeep+42-3 { + veryRecursive2.SomeString = "surprise" + } + veryPath = append(veryPath, "recursive") + } + cases := []struct { + Message proto.Message + Result proto.Message + Path mask.FieldPath + Val interface{} + Err string + }{ + { + Message: &testdata.TestOptional{}, + Result: &testdata.TestOptional{}, + Path: nil, + Val: &testdata.TestOptional{}, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32"}, + Val: int32(42), + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + }, + Result: &testdata.TestSimple{}, + Path: mask.FieldPath{}, + Val: nil, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + }, + Path: mask.FieldPath{"test_int32"}, + Val: time.Hour, + Err: "failed to convert to protoreflect.Value: panic: invalid type: time.Duration", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + }, + Path: mask.FieldPath{"test_int32"}, + Val: "abracadabra", + Err: "test_int32: failed to set value: panic: type mismatch: cannot convert string to int", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 42, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: uint32(42), + }, + { + Message: &testdata.TestSimple{}, + Val: uint32(42), + Path: mask.FieldPath{"nonexistent"}, + Err: "nonexistent: field name not found", + }, + { + Message: &testdata.TestSimple{}, + Path: mask.FieldPath{"nonexistent", "foo"}, + Err: "nonexistent: field name not found", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32", "foo"}, + Val: int32(42), + Err: "test_int32: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + TestInt64: 0x7457E_F00D, + }, + Path: mask.FieldPath{}, + Val: protoreflect.ValueOf((&testdata.TestSimple{ + TestUint32: 80085, + TestInt32: 42, + }).ProtoReflect()), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 80085, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + TestInt64: 0x7457E_F00D, + }, + Path: mask.FieldPath{}, + Val: (&testdata.TestSimple{ + TestUint32: 80085, + TestInt32: 42, + }).ProtoReflect(), + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 80085, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + TestInt64: 0x7457E_F00D, + }, + Path: mask.FieldPath{}, + Val: &testdata.TestSimple{ + TestUint32: 80085, + TestInt32: 42, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 80085, + }, + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + TestInt64: 0x7457E_F00D, + }, + Path: mask.FieldPath{}, + Val: &testdata.TestOptional{}, + Err: "can't replace message nebius.testdata.TestSimple with message nebius.testdata.TestOptional", + }, + { + Message: &testdata.TestSimple{ + TestInt32: 23, + TestInt64: 0x7457E_F00D, + }, + Path: mask.FieldPath{}, + Val: "str", + Err: "can't replace message nebius.testdata.TestSimple with value of type string", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "0"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{32, 42}, + }, + Path: mask.FieldPath{"test_int32", "1"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{}, + }, + Path: mask.FieldPath{"test_int32", "0"}, + Val: nil, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{2, 3, 4}, + }, + Path: mask.FieldPath{"test_int32", "0"}, + Val: nil, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 3, 4}, + }, + Path: mask.FieldPath{"test_int32", "1"}, + Val: nil, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3, 4}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Path: mask.FieldPath{"test_int32", "3"}, + Val: nil, + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Path: mask.FieldPath{"test_int32", "2"}, + Val: protoreflect.ValueOf(int32(42)), + Err: "test_int32[2]: out of list bounds", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{32}, + TestUint32: []uint32{42}, + }, + Path: mask.FieldPath{"test_uint32", "0"}, + Val: protoreflect.ValueOf(uint32(42)), + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{32}, + }, + Err: "test_uint32[2]: out of list bounds", + Path: mask.FieldPath{"test_uint32", "2"}, + Val: protoreflect.ValueOf(uint32(42)), + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{22}, + }, + Path: mask.FieldPath{"test_int32", "abracadabra"}, + Val: protoreflect.ValueOf(uint32(42)), + Err: "test_int32.abracadabra: failed to convert to list index", + }, + { + Message: &testdata.TestRepeated{ + TestInt32: []int32{42}, + }, + Path: mask.FieldPath{"test_int32", "0", "foo"}, + Val: protoreflect.ValueOf(int32(42)), + Err: "test_int32[0]: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "question", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "42"}, + Val: protoreflect.ValueOf("answer"), + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "question", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{}, + }, + Path: mask.FieldPath{"test_int32", "42"}, + Val: nil, + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + 0x_F00D: "eat me", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "61453"}, + Val: nil, + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "61453"}, + Val: nil, + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 7357: "test", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 7357: "test", + 42: "answer", + }, + }, + Val: protoreflect.ValueOf("answer"), + Path: mask.FieldPath{"test_int32", "42"}, + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "abracadabra"}, + Val: protoreflect.ValueOf("foo"), + Err: "test_int32.abracadabra: failed to convert to map key: failed to convert to int32 map key: strconv.ParseInt: parsing \"abracadabra\": invalid syntax", + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 23: "foo", + }, + }, + Result: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 23: "foo", + }, + TestUint32: map[uint32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_uint32", "42"}, + Val: protoreflect.ValueOf("answer"), + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "42", "foo"}, + Val: protoreflect.ValueOf("answer"), + Err: "test_int32[42]: found basic type in the middle of the path, can't descend deeper", + }, + { + Message: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 42: "answer", + }, + }, + Path: mask.FieldPath{"test_int32", "42"}, + Val: int32(0x_BAD_F00D), + Err: "test_int32[42]: failed to set value: panic: interface conversion: interface {} is int32, not string", + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 32, + }, + }, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_repeated", "0", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 32, + }, + }, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_repeated", "0"}, + Val: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 32, + }, + }, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 32, + }, + { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_repeated", "1", "test_int32"}, + Val: int32(42), + }, + { + Message: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 32, + }, + }, + }, + Path: mask.FieldPath{"test_repeated", "1"}, + Val: &testdata.TestOptional{}, + Err: "test_repeated[1]: failed to set value: panic: invalid type: got *testdata.TestOptional, want *testdata.TestSimple", + }, + { + Message: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 32, + }, + }, + }, + Result: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_stringmap", "foo", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 32, + }, + }, + }, + Result: &testdata.TestStructs{ + TestStringmap: map[string]*testdata.TestSimple{ + "foo": { + TestInt32: 32, + }, + "bar": { + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_stringmap", "bar", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 32, + }, + }, + Result: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + Path: mask.FieldPath{"test_struct", "test_int32"}, + Val: protoreflect.ValueOf(int32(42)), + }, + { + Message: proto.Clone(veryRecursive), + Path: veryPath, + Val: protoreflect.ValueOf(int32(42)), + Err: strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "0"}.Join(veryPath...), + Val: protoreflect.ValueOf(int32(42)), + Err: "field[0]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "foo"}.Join(veryPath...), + Val: protoreflect.ValueOf(int32(42)), + Err: "field[foo]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Result: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": proto.Clone(veryRecursive2).(*testdata.RecursiveStruct), + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive", "recursive", "some_string"}, + Val: protoreflect.ValueOf("surprise"), + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{}, + }, + Result: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": { + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "yay", + }, + }, + }, + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive", "recursive", "some_string"}, + Val: "yay", + }, + { + Message: &testdata.TestRecursiveMap{}, + Result: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": { + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "yay", + }, + }, + }, + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive", "recursive", "some_string"}, + Val: "yay", + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": { + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "yay", + }, + }, + }, + }, + }, + Result: &testdata.TestRecursiveMap{}, + Path: mask.FieldPath{"field"}, + Val: nil, + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": { + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "yay", + }, + }, + }, + }, + }, + Result: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{}, + }, + Path: mask.FieldPath{"field", "foo"}, + Val: nil, + }, + { + Message: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": { + Recursive: &testdata.RecursiveStruct{ + Recursive: &testdata.RecursiveStruct{ + SomeString: "yay", + }, + }, + }, + }, + }, + Result: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "foo": {}, + }, + }, + Path: mask.FieldPath{"field", "foo", "recursive"}, + Val: nil, + }, + { + Message: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{}, + Path: mask.FieldPath{"test_oneof"}, + Err: "test_oneof: field name not found", + }, + { + Message: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: uint32(42), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{TestString: "abc"}, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: uint32(42), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 35, + }, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: uint32(42), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 35}, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Path: mask.FieldPath{"test_struct", "test_int32"}, + Val: int32(42), + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Path: mask.FieldPath{"test_struct"}, + Val: nil, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Result: &testdata.TestOneOf{}, + Path: mask.FieldPath{"test_uint32"}, + Val: nil, + }, + { + Message: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 42}, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{TestUint32: 0}, + }, + Path: mask.FieldPath{"test_uint32"}, + Val: uint32(0), + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + err := ReplaceAtFieldPath(c.Message, c.Path, c.Val) + if c.Err != "" { + assert.EqualError(t, err, c.Err) + } else { + assert.NoError(t, err) + assert.EqualExportedValues(t, c.Result, c.Message) + } + }) + } + }) + t.Run("with get", func(t *testing.T) { + t.Parallel() + cases := []struct { + Source proto.Message + Dest proto.Message + Result proto.Message + Path mask.FieldPath + DestPath mask.FieldPath + }{ + { + Source: &testdata.TestSimple{}, + Dest: &testdata.TestSimple{}, + Path: mask.FieldPath{"test_int32"}, + Result: &testdata.TestSimple{}, + }, + { + Source: &testdata.TestSimple{}, + Dest: &testdata.TestSimple{ + TestInt32: 42, + }, + Path: mask.FieldPath{"test_int32"}, + Result: &testdata.TestSimple{}, + }, + { + Source: &testdata.TestSimple{ + TestInt32: 42, + }, + Dest: &testdata.TestSimple{}, + Path: mask.FieldPath{"test_int32"}, + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + { + Source: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + Dest: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_struct"}, + Result: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + { + Source: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + Dest: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 35, + TestUint64: 0x_BAD_F00D, + }, + }, + Path: mask.FieldPath{"test_struct"}, + Result: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + { + Source: &testdata.TestStructs{}, + Dest: &testdata.TestStructs{ + TestStruct: &testdata.TestSimple{ + TestInt32: 35, + TestUint64: 0x_BAD_F00D, + }, + }, + Path: mask.FieldPath{"test_struct"}, + Result: &testdata.TestStructs{}, + }, + { + Source: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + Dest: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_repeated"}, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + }, + { + Source: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + nil, + }, + }, + Dest: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_repeated"}, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + }, + { + Source: &testdata.TestStructs{ + TestIntmap: map[int32]*testdata.TestSimple{ + 42: { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + 23: nil, + }, + }, + Dest: &testdata.TestStructs{}, + Path: mask.FieldPath{"test_intmap"}, + Result: &testdata.TestStructs{ + TestIntmap: map[int32]*testdata.TestSimple{ + 42: { + TestInt32: 42, + TestInt64: 0x_600D_F00D, + }, + }, + }, + }, + { + Source: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Dest: &testdata.TestRepeated{}, + Path: mask.FieldPath{"test_int32"}, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + }, + { + Source: &testdata.TestStringMap{ + TestInt32: map[string]int32{"1": 1, "z": 2, "": 3}, + }, + Dest: &testdata.TestStringMap{}, + Path: mask.FieldPath{"test_int32"}, + Result: &testdata.TestStringMap{ + TestInt32: map[string]int32{"1": 1, "z": 2, "": 3}, + }, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + if c.DestPath == nil { + c.DestPath = c.Path + } + val, _, err := GetAtFieldPath(c.Source, c.Path) + assert.NoError(t, err) + err = ReplaceAtFieldPath(c.Dest, c.DestPath, val) + assert.NoError(t, err) + assert.EqualExportedValues(t, c.Result, c.Dest) + }) + } + }) +} diff --git a/fieldmask/protobuf/patch.go b/fieldmask/protobuf/patch.go new file mode 100644 index 0000000..03711ad --- /dev/null +++ b/fieldmask/protobuf/patch.go @@ -0,0 +1,379 @@ +package protobuf + +import ( + "fmt" + "strconv" + + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/proto/nebius" +) + +func getAnnotation[T any](options proto.Message, xt protoreflect.ExtensionType) (_ T, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf( + "panic while getting extension %s from %s: %s", + xt.TypeDescriptor().FullName(), + options.ProtoReflect().Descriptor().FullName(), + r, + ) + } + }() + retInterface := proto.GetExtension(options, xt) + ret, ok := retInterface.(T) + if !ok { + return ret, fmt.Errorf("expected %T, got %T", ret, retInterface) + } + return ret, nil +} + +func getFieldBehaviors(field protoreflect.FieldDescriptor) (map[nebius.FieldBehavior]struct{}, error) { + behavior, err := getAnnotation[[]nebius.FieldBehavior](field.Options(), nebius.E_FieldBehavior) + if err != nil { + return nil, fmt.Errorf("get extension: %w", err) + } + ret := make(map[nebius.FieldBehavior]struct{}, len(behavior)) + for _, b := range behavior { + ret[b] = struct{}{} + } + return ret, nil +} + +func preserveField(field protoreflect.FieldDescriptor) (bool, error) { + bb, err := getFieldBehaviors(field) + if err != nil { + return false, fmt.Errorf("get field behaviors: %w", err) + } + _, immutable := bb[nebius.FieldBehavior_IMMUTABLE] + _, outputOnly := bb[nebius.FieldBehavior_OUTPUT_ONLY] + + return immutable || outputOnly, nil +} + +func recursivePatchWithResetMask( //nolint:funlen,gocognit,gocyclo,cyclop // TODO: split + data, patch protoreflect.Message, + resetMask *mask.Mask, + recursion int, +) error { + if recursion >= recursionTooDeep { + return mask.ErrRecursionTooDeep + } + recursion++ + + dataDesc := data.Descriptor() + patchDesc := patch.Descriptor() + + for i := range dataDesc.Fields().Len() { + dataFieldDesc := dataDesc.Fields().Get(i) + name := dataFieldDesc.Name() + + fieldMask, err := resetMask.GetSubMask(mask.FieldKey(name)) + if err != nil { + return fmt.Errorf( + "%s: couldn't get full field mask: %w", name, err, + ) + } + + if fieldMask == nil && dataFieldDesc.ContainingOneof() != nil { + ofm, errX := resetMask.GetSubMask( + mask.FieldKey(dataFieldDesc.ContainingOneof().Name()), + ) + if errX != nil { + return fmt.Errorf( + "%s: couldn't get full oneof mask: %w", + dataFieldDesc.ContainingOneof().Name(), errX, + ) + } + if ofm != nil { + // oneof group name can't denote inner fields + fieldMask = mask.New() + } + } + preserve, err := preserveField(dataFieldDesc) + if err != nil { + return fmt.Errorf( + "%s: couldn't get field preservation options: %w", name, err, + ) + } + + patchFieldDesc := patchDesc.Fields().ByName(name) + if patchFieldDesc == nil { + if fieldMask != nil && !preserve { + data.Clear(dataFieldDesc) + } + continue + } + if fieldMask == nil && + patchFieldDesc.ContainingOneof() != nil { + ofm, err := resetMask.GetSubMask( + mask.FieldKey(patchFieldDesc.ContainingOneof().Name()), + ) + if err != nil { + return fmt.Errorf( + "%s: couldn't get full oneof mask: %w", + patchFieldDesc.ContainingOneof().Name(), err, + ) + } + if ofm != nil { + // oneof group name can't denote inner fields + fieldMask = mask.New() + } + } + if dataFieldDesc.Kind() != patchFieldDesc.Kind() { + return fmt.Errorf( + "%s: type mismatch: data is %s, patch is %s", + name, dataFieldDesc.Kind(), patchFieldDesc.Kind(), + ) + } + if !patch.Has(patchFieldDesc) { + if fieldMask != nil && !preserve { + data.Clear(dataFieldDesc) + } + continue + } + if dataFieldDesc.IsList() { + if preserve { + continue + } + if !patchFieldDesc.IsList() { + return fmt.Errorf( + "%s: data field is repeated while patch field is not", name, + ) + } + + if !data.Has(dataFieldDesc) { + data.Set(dataFieldDesc, data.NewField(dataFieldDesc)) + } + dataList := data.Mutable(dataFieldDesc).List() + patchList := patch.Get(patchFieldDesc).List() + + if dataFieldDesc.Kind() == protoreflect.MessageKind { + // remove excess + if dataList.Len() > patchList.Len() { + dataList.Truncate(patchList.Len()) + } + // patch intersection + for j := range dataList.Len() { + dataMsg := dataList.Get(j).Message() + patchMsg := patchList.Get(j).Message() + + listElementMask, err := fieldMask.GetSubMask( + mask.FieldKey(strconv.Itoa(j)), + ) + if err != nil { + return fmt.Errorf( + "%s[%d]: couldn't get full field mask: %w", + name, j, err, + ) + } + + if err := recursivePatchWithResetMask( + dataMsg, patchMsg, listElementMask, recursion, + ); err != nil { + return fmt.Errorf("%s[%d]: %w", name, j, err) + } + } + // add new + for j := dataList.Len(); j < patchList.Len(); j++ { + dataMsg := dataList.NewElement().Message() + patchMsg := patchList.Get(j).Message() + if err := recursivePatchWithResetMask( + dataMsg, patchMsg, nil, recursion, + ); err != nil { + return fmt.Errorf("%s[%d]: %w", name, j, err) + } + dataList.Append(protoreflect.ValueOf(dataMsg)) + } + } else { + dataList.Truncate(0) + for j := range patchList.Len() { + dataList.Append(patchList.Get(j)) + } + } + continue + } + if dataFieldDesc.IsMap() { + if preserve { + continue + } + if !patchFieldDesc.IsMap() { + return fmt.Errorf( + "%s: data field is map while patch field is not", name, + ) + } + if dataFieldDesc.MapKey().Kind() != patchFieldDesc.MapKey().Kind() { + return fmt.Errorf( + "%s: map key type mismatch: data has %s, patch has %s", + name, + dataFieldDesc.MapKey().Kind(), + patchFieldDesc.MapKey().Kind(), + ) + } + if dataFieldDesc.MapValue().Kind() != + patchFieldDesc.MapValue().Kind() { + return fmt.Errorf( + "%s: map value type mismatch: data has %s, patch has %s", + name, + dataFieldDesc.MapValue().Kind(), + patchFieldDesc.MapValue().Kind(), + ) + } + if !data.Has(dataFieldDesc) { + data.Set(dataFieldDesc, data.NewField(dataFieldDesc)) + } + dataMap := data.Mutable(dataFieldDesc).Map() + patchMap := patch.Get(patchFieldDesc).Map() + if dataFieldDesc.MapValue().Kind() == protoreflect.MessageKind { + var innerErr error + // patch or remove already existing values + dataMap.Range( + func(mk protoreflect.MapKey, v protoreflect.Value) bool { + if patchMap.Has(mk) { + dataMsg := v.Message() + patchMsg := patchMap.Get(mk).Message() + fk, err := mapKeyToFieldKey(mk) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: failed convert map key to field "+ + "key: %w", + name, mk, err, + ) + return false + } + + elementMask, err := fieldMask.GetSubMask(fk) + if err != nil { + innerErr = fmt.Errorf( + "%s[%s]: couldn't get full field mask:"+ + " %w", + name, mk, err, + ) + return false + } + + if err := recursivePatchWithResetMask( + dataMsg, patchMsg, elementMask, recursion, + ); err != nil { + innerErr = fmt.Errorf( + "%s[%s]: %w", name, mk, err, + ) + return false + } + } else { + dataMap.Clear(mk) + } + return true + }, + ) + if innerErr != nil { + return innerErr + } + // add newly created ones + patchMap.Range( + func(mk protoreflect.MapKey, _ protoreflect.Value) bool { + if !dataMap.Has(mk) { + dataMsg := dataMap.NewValue().Message() + patchMsg := patchMap.Get(mk).Message() + + if err := recursivePatchWithResetMask( + dataMsg, patchMsg, nil, recursion, + ); err != nil { + innerErr = fmt.Errorf( + "%s[%s]: %w", name, mk, err, + ) + return false + } + dataMap.Set(mk, protoreflect.ValueOf(dataMsg)) + } + return true + }, + ) + } else { + // just replace with a fully new map + dataMap := data.NewField(dataFieldDesc).Map() + patchMap.Range( + func(mk protoreflect.MapKey, v protoreflect.Value) bool { + dataMap.Set(mk, v) + return true + }, + ) + data.Set(dataFieldDesc, protoreflect.ValueOf(dataMap)) + } + continue + } + if dataFieldDesc.Kind() == protoreflect.MessageKind { + if preserve { + continue + } + dataMsg := data.Mutable(dataFieldDesc).Message() + patchMsg := patch.Get(patchFieldDesc).Message() + if err := recursivePatchWithResetMask( + dataMsg, patchMsg, fieldMask, recursion, + ); err != nil { + return fmt.Errorf("%s: %w", name, err) + } + continue + } + patchVal := patch.Get(patchFieldDesc) + if (patchVal.Equal(patchFieldDesc.Default()) && + fieldMask == nil && + !patchFieldDesc.HasPresence()) || preserve { + continue + } + data.Set(dataFieldDesc, patchVal) + } + + return nil +} + +// PatchWithResetMask applies a patch to a target message using a [mask.Mask], +// allowing for selective updates and reset behavior as described in +// [Reset Mask Specification]. +// +// The PatchWithResetMask function applies the changes specified in the patch +// [proto.Message] to the target [proto.Message], based on the provided +// [mask.Mask]. This function supports patching messages of different types, +// facilitating version conversion. +// +// The existing (and set) fields in the patch message should be of the same +// basic types as the corresponding fields in the target message, including map +// keys. If a field exists in both the target message and the patch message, +// the [mask.Mask] is ignored for that field. +// +// Fields (which are not messages, lists, or maps) absent in the patch message +// are left unchanged unless specified in the [mask.Mask]. The mask also handles +// list indexes and map keys as separate FieldKeys if the list or map holds +// messages. +// +// If a list or map field is absent in the patch message or empty, it will be +// removed only if specified in the Mask. If a list field in the patch message +// has fewer elements than the corresponding field in the target message, it is +// truncated. If it has more elements, new elements are added. +// +// For map fields, elements not present in the patch message will be removed +// from the target message if the map is not empty. +// +// Elements (submessages) present in both the patch and target maps or lists +// will be patched recursively. +// +// Parameters: +// - data [proto.Message]: The target message to be patched. +// - patch [proto.Message]: The patch message containing the changes. +// - mask *[mask.Mask]: The reset mask specifying which fields to update or +// reset. +// +// Returns: +// - error: An error, if any, encountered during the patching process. +// +// [Reset Mask Specification]: https://nebius.atlassian.net/wiki/spaces/NEWBIUS/pages/131367768/ResetMask+tech+design +func PatchWithResetMask( + data, patch proto.Message, + mask *mask.Mask, +) error { + return recursivePatchWithResetMask( + data.ProtoReflect(), patch.ProtoReflect(), mask, 0, + ) +} diff --git a/fieldmask/protobuf/patch_test.go b/fieldmask/protobuf/patch_test.go new file mode 100644 index 0000000..5a4de57 --- /dev/null +++ b/fieldmask/protobuf/patch_test.go @@ -0,0 +1,1288 @@ +package protobuf + +import ( + "fmt" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + + "github.com/nebius/gosdk/fieldmask/mask" + "github.com/nebius/gosdk/fieldmask/protobuf/testdata" +) + +func TestPatchWithResetMask(t *testing.T) { + t.Parallel() + infMask := mask.New() + infMask.Any = infMask + veryRecursive := &testdata.RecursiveStruct{ + SomeString: "foo", + } + veryRecursive2 := &testdata.RecursiveStruct{ + SomeString: "bar", + } + for i := range recursionTooDeep + 42 { + veryRecursive = &testdata.RecursiveStruct{ + Recursive: veryRecursive, + } + veryRecursive2 = &testdata.RecursiveStruct{ + Recursive: veryRecursive2, + } + if i == recursionTooDeep+42-3 { + veryRecursive2.SomeString = "surprise" + } + } + cases := []struct { + Data proto.Message + Patch proto.Message + Mask *mask.Mask + Err string + Result proto.Message + }{ + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 35, + }, + Patch: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint64: 7357, + TestUint32: 80085, + }, + Mask: nil, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + }, + Patch: &testdata.TestSimple{ + TestInt32: 0, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + Mask: nil, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + }, + Patch: &testdata.TestSimple{ + TestInt32: 0, + }, + Result: &testdata.TestSimple{ + TestInt32: 0, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 35, + }, + Patch: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Result: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 35, + }, + Patch: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint64: 7357, + TestUint32: 80085, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 35, + }, + Patch: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + TestUint64: 7357, + TestUint32: 80085, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint64": mask.New(), + }, + }, + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestUint32: 35, + }, + Patch: &testdata.TestSimple{ + TestUint64: 7357, + TestUint32: 80085, + }, + Err: "test_uint32: couldn't get full field mask: failed to copy key mask: " + + strings.Repeat("*: ", recursionTooDeep) + "recursion too deep", + Mask: &mask.Mask{ + Any: infMask, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": infMask, + }, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestRepeated{}, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Mask: mask.New(), + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Mask: mask.New(), + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestRepeated{}, + Result: &testdata.TestRepeated{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{}, + }, + Result: &testdata.TestRepeated{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{1}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1}, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2}, + }, + Patch: &testdata.TestRepeated{ + TestInt32: []int32{1}, + }, + Result: &testdata.TestRepeated{ + TestInt32: []int32{1}, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 6, + "d": 4, + "e": 5, + }, + }, + Result: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 6, + "d": 4, + "e": 5, + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 6, + "d": 4, + "e": 5, + }, + }, + Result: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 6, + "d": 4, + "e": 5, + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{ + TestInt32: map[string]int32{}, + }, + Result: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{}, + Result: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{ + TestInt32: map[string]int32{}, + }, + Result: &testdata.TestStringMap{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.TestStringMap{}, + Result: &testdata.TestStringMap{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": mask.New(), + }, + }, + }, + { + Data: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 123, + TestInt64: 456, + TestUint32: 69, + TestUint64: 43, + TestSint32: 80085, + TestSint64: 0x_BAD_F00D, + TestFixed32: 987, + TestFixed64: 654, + }, + { + TestInt32: 124, + TestInt64: 457, + TestUint32: 690, + TestUint64: 42, + TestSint32: 80086, + TestSint64: 0x_BAD_F00D, + TestFixed32: 988, + TestFixed64: 655, + }, + { // should be removed + TestInt32: 0x_BAD_F00D, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "b": { + TestInt32: 125, + TestInt64: 458, + TestUint32: 691, + TestUint64: 44, + TestSint32: 80087, + TestSint64: 0x_BAD_F00D, + TestFixed32: 989, + TestFixed64: 656, + }, + "1": { + TestInt32: 126, + TestInt64: 459, + TestUint32: 692, + TestUint64: 45, + TestSint32: 80088, + TestSint64: 0x_BAD_F00D, + TestFixed32: 980, + TestFixed64: 657, + }, + "c": { // should be removed + TestInt32: 0x_BAD_F00D, + }, + }, + }, + Patch: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + // TestInt32: , // left as is + TestInt64: 789, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // left (tsm.*) + // TestFixed64 // removed in b + }, + { + // TestInt32: , // left as is + TestInt64: 780, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // left (tsm.*) + // TestFixed64 // removed in b + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "b": { + // TestInt32: , // left as is + TestInt64: 781, // changed + // TestUint32 // left (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // removed (tsm.*) + // TestFixed64 // removed in b + }, + "1": { + // TestInt32: , // left as is + TestInt64: 782, // changed + // TestUint32 // left (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // removed (tsm.*) + // TestFixed64 // removed in b + }, + "d": { // should be added + TestInt32: 0x_D06_F00D, + }, + }, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 123, // left as is + TestInt64: 789, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + TestSint32: 80085, // left in 0 removed in 1 + // TestSint64 // removed (*.*) + TestFixed32: 987, // left (tsm.*) + TestFixed64: 654, // removed in b + }, + { + TestInt32: 124, // left as is + TestInt64: 780, // changed + // TestUint32 // removed (test_repeated.*) + TestUint64: 42, // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + TestFixed32: 988, // left (tsm.*) + TestFixed64: 655, // removed in b + }, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "b": { + TestInt32: 125, // left as is + TestInt64: 781, // changed + TestUint32: 691, // left (test_repeated.*) + TestUint64: 44, // left in 1 removed in 0 + TestSint32: 80087, // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // removed (tsm.*) + // TestFixed64 // removed in b + }, + "1": { + TestInt32: 126, // left as is + TestInt64: 782, // changed + TestUint32: 692, // left (test_repeated.*) + TestUint64: 45, // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + // TestFixed32 // removed (tsm.*) + TestFixed64: 657, // removed in b + }, + "d": { // should be added + TestInt32: 0x_D06_F00D, + }, + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_sint64": mask.New(), + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "1": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_sint32": mask.New(), + }, + }, + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_repeated": { + Any: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": mask.New(), + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "0": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint64": mask.New(), + }, + }, + }, + }, + "test_stringmap": { + Any: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_fixed32": mask.New(), + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "b": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_fixed64": mask.New(), + }, + }, + }, + }, + }, + }, + }, + { + Data: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 69, + TestInt64: 456, + TestUint32: 123, + TestUint64: 43, + TestSint32: 80085, + TestSint64: 0x_BAD_F00D, + }, + { + TestInt32: 0x_D0660, + TestInt64: 457, + TestUint32: 690, + TestUint64: 42, + TestSint32: 80086, + TestSint64: 0x_BAD_F00D, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{}, + }, + Patch: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + // TestInt32: , // left as is + TestInt64: 7357, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + }, + { + // TestInt32: , // left as is + TestInt64: 0x7E57, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + }, + { + TestSint64: 0x_600D_F00D, + }, + }, + TestStringmap: map[string]*testdata.TestSimple{}, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + { + TestInt32: 69, // left as is + TestInt64: 7357, // changed + // TestUint32 // removed (test_repeated.*) + // TestUint64 // left in 1 removed in 0 + TestSint32: 80085, // left in 0 removed in 1 + // TestSint64 // removed (*.*) + }, + { + TestInt32: 0x_D0660, // left as is + TestInt64: 0x7E57, // changed + // TestUint32 // removed (test_repeated.*) + TestUint64: 42, // left in 1 removed in 0 + // TestSint32 // left in 0 removed in 1 + // TestSint64 // removed (*.*) + }, + { + TestSint64: 0x_600D_F00D, + }, + }, + }, + Mask: &mask.Mask{ + Any: &mask.Mask{ + Any: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_sint64": mask.New(), + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "1": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_sint32": mask.New(), + }, + }, + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_repeated": { + Any: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": mask.New(), + }, + }, + FieldParts: map[mask.FieldKey]*mask.Mask{ + "0": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint64": mask.New(), + }, + }, + }, + }, + }, + }, + }, + { + Data: proto.Clone(veryRecursive), + Patch: proto.Clone(veryRecursive2), + Err: strings.Repeat("recursive: ", recursionTooDeep) + "recursion too deep", + }, + { + Data: &testdata.TestSimple{ + TestInt32: 42, + TestInt64: 0x_BAD_F00D, + }, + Patch: &testdata.TestOptional{ + TestSingle: proto.Uint32(42), + }, + Result: &testdata.TestSimple{ + TestInt32: 42, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int64": mask.New(), + }, + }, + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Err: "test_double: type mismatch: data is double, patch is message", + }, + { + Data: &testdata.TestRepeated{ + TestInt32: []int32{1, 2, 3}, + }, + Patch: &testdata.TestSimple{ + TestInt32: 42, + }, + Err: "test_int32: data field is repeated while patch field is not", + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + "b": 2, + "c": 3, + }, + }, + Patch: &testdata.NotAStringMap{ + TestInt32: &testdata.TestOptional{}, + }, + Err: "test_int32: data field is map while patch field is not", + }, + { + Data: &testdata.TestStructs{}, + Patch: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + {TestInt32: 42}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "a": {TestInt64: 69}, + }, + TestStruct: &testdata.TestSimple{TestUint32: 0x_F00D}, + }, + Result: &testdata.TestStructs{ + TestRepeated: []*testdata.TestSimple{ + {TestInt32: 42}, + }, + TestStringmap: map[string]*testdata.TestSimple{ + "a": {TestInt64: 69}, + }, + TestStruct: &testdata.TestSimple{TestUint32: 0x_F00D}, + }, + }, + { + Data: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + Patch: &testdata.TestOptional{ + TestSingle: proto.Uint32(42), + }, + Result: &testdata.TestOptional{ + TestSingle: proto.Uint32(42), + }, + }, + { + Data: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + Patch: &testdata.TestOptional{ + TestSingle: proto.Uint32(0), + }, + Result: &testdata.TestOptional{ + TestSingle: proto.Uint32(0), + }, + }, + { + Data: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + Patch: &testdata.TestOptional{ + TestSingle: proto.Uint32(0), + }, + Result: &testdata.TestOptional{ + TestSingle: proto.Uint32(0), + }, + }, + { + Data: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + Patch: &testdata.TestOptional{ + TestSingle: nil, + }, + Result: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + }, + { + Data: &testdata.TestOptional{ + TestSingle: proto.Uint32(35), + }, + Patch: &testdata.TestOptional{ + TestSingle: nil, + }, + Result: &testdata.TestOptional{ + TestSingle: nil, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_single": mask.New(), + }, + }, + }, + { + Data: &testdata.TestOptional{ + TestStruct: nil, + }, + Patch: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + Result: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + { + Data: &testdata.TestOptional{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + Patch: &testdata.TestOptional{ + TestStruct: nil, + }, + Result: &testdata.TestOptional{ + TestStruct: nil, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_struct": mask.New(), + }, + }, + }, + { + Data: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Patch: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive2).(*testdata.RecursiveStruct), + }, + }, + Err: "field[0]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Data: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "a": proto.Clone(veryRecursive).(*testdata.RecursiveStruct), + }, + }, + Patch: &testdata.TestRecursiveMap{ + Field: map[string]*testdata.RecursiveStruct{ + "a": proto.Clone(veryRecursive2).(*testdata.RecursiveStruct), + }, + }, + Err: "field[a]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Data: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{}, + }, + Patch: &testdata.TestRecursiveRepeated{ + Field: []*testdata.RecursiveStruct{ + proto.Clone(veryRecursive2).(*testdata.RecursiveStruct), + }, + }, + Err: "field[0]: " + strings.Repeat("recursive: ", recursionTooDeep-1) + "recursion too deep", + }, + { + Data: &testdata.TestStringMap{ + TestInt32: map[string]int32{ + "a": 1, + }, + }, + Patch: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 1: "a", + }, + }, + Err: "test_int32: map key type mismatch: data has string, patch has int32", + }, + { + Data: &testdata.TestTypeMap{ + TestInt32: map[int32]string{ + 1: "a", + }, + }, + Patch: &testdata.WrongTypeMap{ + TestInt32: map[int32]int64{ + 1: 42, + }, + }, + Err: "test_int32: map value type mismatch: data has string, patch has int64", + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Patch: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 0, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 0, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_string": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_oneof": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestString{ + TestString: "abc", + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_uint32": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_oneof": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": {}, + }, + }, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{}, + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_struct": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": {}, + }, + }, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestOneOf{}, + Result: &testdata.TestOneOf{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_oneof": { + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_int32": {}, + }, + }, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestAnotherOneOf{}, + Result: &testdata.TestOneOf{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_oneof": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Patch: &testdata.TestAnotherOneOf{}, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestStruct{ + TestStruct: &testdata.TestSimple{ + TestInt32: 42, + }, + }, + }, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_another_oneof": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 42, + }, + }, + Patch: &testdata.TestAnotherOneOf{}, + Result: &testdata.TestOneOf{}, + Mask: &mask.Mask{ + FieldParts: map[mask.FieldKey]*mask.Mask{ + "test_another_oneof": {}, + }, + }, + }, + { + Data: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 38, + }, + }, + Patch: &testdata.TestAnotherOneOf{ + TestAnotherOneof: &testdata.TestAnotherOneOf_TestUint32{ + TestUint32: 42, + }, + }, + Result: &testdata.TestOneOf{ + TestOneof: &testdata.TestOneOf_TestUint32{ + TestUint32: 42, + }, + }, + }, + { + Data: &testdata.TestOutputOnly{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + Mask: mask.ParseMust("*.*.*"), + Patch: &testdata.TestOutputOnly{}, + Result: &testdata.TestOutputOnly{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + }, + { + Data: &testdata.TestImmutable{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + Mask: mask.ParseMust("*.*.*"), + Patch: &testdata.TestImmutable{}, + Result: &testdata.TestImmutable{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + }, + { + Data: &testdata.TestOutputOnly{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + Mask: mask.ParseMust("*.*.*"), + Patch: &testdata.TestOutputOnly{ + I: 37, + S: "nope", + M: map[string]int32{ + "baz": 0x_BAD, + }, + R: []int32{-1}, + Msg: &testdata.TestSimple{ + TestInt32: 0x_BAD_F00D, + }, + }, + Result: &testdata.TestOutputOnly{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + }, + { + Data: &testdata.TestImmutable{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + Mask: mask.ParseMust("*.*.*"), + Patch: &testdata.TestImmutable{ + I: 37, + S: "nope", + M: map[string]int32{ + "baz": 0x_BAD, + }, + R: []int32{-1}, + Msg: &testdata.TestSimple{ + TestInt32: 0x_BAD_F00D, + }, + }, + Result: &testdata.TestImmutable{ + I: 42, + S: "foo", + Msg: &testdata.TestSimple{ + TestInt64: 0x_F00D, + }, + M: map[string]int32{"bar": 7357}, + R: []int32{1, -2, 3}, + }, + }, + } + for i, c := range cases { + t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { + t.Parallel() + err := PatchWithResetMask(c.Data, c.Patch, c.Mask) + if c.Err != "" { + assert.EqualError(t, err, c.Err, protojson.Format(c.Data)) + } else { + assert.NoError(t, err) + assert.EqualExportedValues(t, c.Result, c.Data) + } + }) + } +} diff --git a/fieldmask/protobuf/testdata/data_for_test.pb.go b/fieldmask/protobuf/testdata/data_for_test.pb.go new file mode 100644 index 0000000..a69ffda --- /dev/null +++ b/fieldmask/protobuf/testdata/data_for_test.pb.go @@ -0,0 +1,2928 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: api/tools/public/gosdk/fieldmask/protobuf/testdata/data_for_test.proto + +package testdata + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Just a simple Enum +type ABC int32 + +const ( + ABC_ABC_UNDEFINED ABC = 0 + ABC_ABC_A ABC = 1 + ABC_ABC_B ABC = 2 + ABC_ABC_C ABC = 3 +) + +// Enum value maps for ABC. +var ( + ABC_name = map[int32]string{ + 0: "ABC_UNDEFINED", + 1: "ABC_A", + 2: "ABC_B", + 3: "ABC_C", + } + ABC_value = map[string]int32{ + "ABC_UNDEFINED": 0, + "ABC_A": 1, + "ABC_B": 2, + "ABC_C": 3, + } +) + +func (x ABC) Enum() *ABC { + p := new(ABC) + *p = x + return p +} + +func (x ABC) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ABC) Descriptor() protoreflect.EnumDescriptor { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes[0].Descriptor() +} + +func (ABC) Type() protoreflect.EnumType { + return &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes[0] +} + +func (x ABC) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ABC.Descriptor instead. +func (ABC) EnumDescriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{0} +} + +// Same Enum but with aliases +type AliasedABC int32 + +const ( + AliasedABC_AABC_UNDEFINED AliasedABC = 0 + AliasedABC_AABC_A AliasedABC = 1 + AliasedABC_AABC_B AliasedABC = 2 + AliasedABC_AABC_B2 AliasedABC = 2 + AliasedABC_AABC_C AliasedABC = 3 +) + +// Enum value maps for AliasedABC. +var ( + AliasedABC_name = map[int32]string{ + 0: "AABC_UNDEFINED", + 1: "AABC_A", + 2: "AABC_B", + // Duplicate value: 2: "AABC_B2", + 3: "AABC_C", + } + AliasedABC_value = map[string]int32{ + "AABC_UNDEFINED": 0, + "AABC_A": 1, + "AABC_B": 2, + "AABC_B2": 2, + "AABC_C": 3, + } +) + +func (x AliasedABC) Enum() *AliasedABC { + p := new(AliasedABC) + *p = x + return p +} + +func (x AliasedABC) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AliasedABC) Descriptor() protoreflect.EnumDescriptor { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes[1].Descriptor() +} + +func (AliasedABC) Type() protoreflect.EnumType { + return &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes[1] +} + +func (x AliasedABC) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AliasedABC.Descriptor instead. +func (AliasedABC) EnumDescriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{1} +} + +// This struct is recursive +// TF does not support recursive structs +// Possible solution: +// * use serialized representation +type RecursiveStruct struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SomeString string `protobuf:"bytes,1,opt,name=some_string,json=someString,proto3" json:"some_string,omitempty"` + Recursive *RecursiveStruct `protobuf:"bytes,2,opt,name=recursive,proto3" json:"recursive,omitempty"` +} + +func (x *RecursiveStruct) Reset() { + *x = RecursiveStruct{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecursiveStruct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecursiveStruct) ProtoMessage() {} + +func (x *RecursiveStruct) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecursiveStruct.ProtoReflect.Descriptor instead. +func (*RecursiveStruct) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{0} +} + +func (x *RecursiveStruct) GetSomeString() string { + if x != nil { + return x.SomeString + } + return "" +} + +func (x *RecursiveStruct) GetRecursive() *RecursiveStruct { + if x != nil { + return x.Recursive + } + return nil +} + +type TestSimple struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestDouble float64 `protobuf:"fixed64,1,opt,name=test_double,json=testDouble,proto3" json:"test_double,omitempty"` + TestFloat float32 `protobuf:"fixed32,2,opt,name=test_float,json=testFloat,proto3" json:"test_float,omitempty"` + TestInt32 int32 `protobuf:"varint,3,opt,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty"` + TestInt64 int64 `protobuf:"varint,4,opt,name=test_int64,json=testInt64,proto3" json:"test_int64,omitempty"` + TestUint32 uint32 `protobuf:"varint,5,opt,name=test_uint32,json=testUint32,proto3" json:"test_uint32,omitempty"` + TestUint64 uint64 `protobuf:"varint,6,opt,name=test_uint64,json=testUint64,proto3" json:"test_uint64,omitempty"` + TestSint32 int32 `protobuf:"zigzag32,7,opt,name=test_sint32,json=testSint32,proto3" json:"test_sint32,omitempty"` + TestSint64 int64 `protobuf:"zigzag64,8,opt,name=test_sint64,json=testSint64,proto3" json:"test_sint64,omitempty"` + TestFixed32 uint32 `protobuf:"fixed32,9,opt,name=test_fixed32,json=testFixed32,proto3" json:"test_fixed32,omitempty"` + TestFixed64 uint64 `protobuf:"fixed64,10,opt,name=test_fixed64,json=testFixed64,proto3" json:"test_fixed64,omitempty"` + TestSfixed32 int32 `protobuf:"fixed32,11,opt,name=test_sfixed32,json=testSfixed32,proto3" json:"test_sfixed32,omitempty"` + TestSfixed64 int64 `protobuf:"fixed64,12,opt,name=test_sfixed64,json=testSfixed64,proto3" json:"test_sfixed64,omitempty"` + TestBool bool `protobuf:"varint,13,opt,name=test_bool,json=testBool,proto3" json:"test_bool,omitempty"` + TestString string `protobuf:"bytes,14,opt,name=test_string,json=testString,proto3" json:"test_string,omitempty"` + TestBytes []byte `protobuf:"bytes,15,opt,name=test_bytes,json=testBytes,proto3" json:"test_bytes,omitempty"` + TestEnum ABC `protobuf:"varint,16,opt,name=test_enum,json=testEnum,proto3,enum=nebius.testdata.ABC" json:"test_enum,omitempty"` + TestAliasedEnum AliasedABC `protobuf:"varint,17,opt,name=test_aliased_enum,json=testAliasedEnum,proto3,enum=nebius.testdata.AliasedABC" json:"test_aliased_enum,omitempty"` +} + +func (x *TestSimple) Reset() { + *x = TestSimple{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestSimple) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestSimple) ProtoMessage() {} + +func (x *TestSimple) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestSimple.ProtoReflect.Descriptor instead. +func (*TestSimple) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{1} +} + +func (x *TestSimple) GetTestDouble() float64 { + if x != nil { + return x.TestDouble + } + return 0 +} + +func (x *TestSimple) GetTestFloat() float32 { + if x != nil { + return x.TestFloat + } + return 0 +} + +func (x *TestSimple) GetTestInt32() int32 { + if x != nil { + return x.TestInt32 + } + return 0 +} + +func (x *TestSimple) GetTestInt64() int64 { + if x != nil { + return x.TestInt64 + } + return 0 +} + +func (x *TestSimple) GetTestUint32() uint32 { + if x != nil { + return x.TestUint32 + } + return 0 +} + +func (x *TestSimple) GetTestUint64() uint64 { + if x != nil { + return x.TestUint64 + } + return 0 +} + +func (x *TestSimple) GetTestSint32() int32 { + if x != nil { + return x.TestSint32 + } + return 0 +} + +func (x *TestSimple) GetTestSint64() int64 { + if x != nil { + return x.TestSint64 + } + return 0 +} + +func (x *TestSimple) GetTestFixed32() uint32 { + if x != nil { + return x.TestFixed32 + } + return 0 +} + +func (x *TestSimple) GetTestFixed64() uint64 { + if x != nil { + return x.TestFixed64 + } + return 0 +} + +func (x *TestSimple) GetTestSfixed32() int32 { + if x != nil { + return x.TestSfixed32 + } + return 0 +} + +func (x *TestSimple) GetTestSfixed64() int64 { + if x != nil { + return x.TestSfixed64 + } + return 0 +} + +func (x *TestSimple) GetTestBool() bool { + if x != nil { + return x.TestBool + } + return false +} + +func (x *TestSimple) GetTestString() string { + if x != nil { + return x.TestString + } + return "" +} + +func (x *TestSimple) GetTestBytes() []byte { + if x != nil { + return x.TestBytes + } + return nil +} + +func (x *TestSimple) GetTestEnum() ABC { + if x != nil { + return x.TestEnum + } + return ABC_ABC_UNDEFINED +} + +func (x *TestSimple) GetTestAliasedEnum() AliasedABC { + if x != nil { + return x.TestAliasedEnum + } + return AliasedABC_AABC_UNDEFINED +} + +type TestRepeated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestDouble []float64 `protobuf:"fixed64,1,rep,packed,name=test_double,json=testDouble,proto3" json:"test_double,omitempty"` + TestFloat []float32 `protobuf:"fixed32,2,rep,packed,name=test_float,json=testFloat,proto3" json:"test_float,omitempty"` + TestInt32 []int32 `protobuf:"varint,3,rep,packed,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty"` + TestInt64 []int64 `protobuf:"varint,4,rep,packed,name=test_int64,json=testInt64,proto3" json:"test_int64,omitempty"` + TestUint32 []uint32 `protobuf:"varint,5,rep,packed,name=test_uint32,json=testUint32,proto3" json:"test_uint32,omitempty"` + TestUint64 []uint64 `protobuf:"varint,6,rep,packed,name=test_uint64,json=testUint64,proto3" json:"test_uint64,omitempty"` + TestSint32 []int32 `protobuf:"zigzag32,7,rep,packed,name=test_sint32,json=testSint32,proto3" json:"test_sint32,omitempty"` + TestSint64 []int64 `protobuf:"zigzag64,8,rep,packed,name=test_sint64,json=testSint64,proto3" json:"test_sint64,omitempty"` + TestFixed32 []uint32 `protobuf:"fixed32,9,rep,packed,name=test_fixed32,json=testFixed32,proto3" json:"test_fixed32,omitempty"` + TestFixed64 []uint64 `protobuf:"fixed64,10,rep,packed,name=test_fixed64,json=testFixed64,proto3" json:"test_fixed64,omitempty"` + TestSfixed32 []int32 `protobuf:"fixed32,11,rep,packed,name=test_sfixed32,json=testSfixed32,proto3" json:"test_sfixed32,omitempty"` + TestSfixed64 []int64 `protobuf:"fixed64,12,rep,packed,name=test_sfixed64,json=testSfixed64,proto3" json:"test_sfixed64,omitempty"` + TestBool []bool `protobuf:"varint,13,rep,packed,name=test_bool,json=testBool,proto3" json:"test_bool,omitempty"` + TestString []string `protobuf:"bytes,14,rep,name=test_string,json=testString,proto3" json:"test_string,omitempty"` + TestBytes [][]byte `protobuf:"bytes,15,rep,name=test_bytes,json=testBytes,proto3" json:"test_bytes,omitempty"` + TestEnum []ABC `protobuf:"varint,16,rep,packed,name=test_enum,json=testEnum,proto3,enum=nebius.testdata.ABC" json:"test_enum,omitempty"` + TestAliasedEnum []AliasedABC `protobuf:"varint,17,rep,packed,name=test_aliased_enum,json=testAliasedEnum,proto3,enum=nebius.testdata.AliasedABC" json:"test_aliased_enum,omitempty"` +} + +func (x *TestRepeated) Reset() { + *x = TestRepeated{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestRepeated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRepeated) ProtoMessage() {} + +func (x *TestRepeated) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestRepeated.ProtoReflect.Descriptor instead. +func (*TestRepeated) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{2} +} + +func (x *TestRepeated) GetTestDouble() []float64 { + if x != nil { + return x.TestDouble + } + return nil +} + +func (x *TestRepeated) GetTestFloat() []float32 { + if x != nil { + return x.TestFloat + } + return nil +} + +func (x *TestRepeated) GetTestInt32() []int32 { + if x != nil { + return x.TestInt32 + } + return nil +} + +func (x *TestRepeated) GetTestInt64() []int64 { + if x != nil { + return x.TestInt64 + } + return nil +} + +func (x *TestRepeated) GetTestUint32() []uint32 { + if x != nil { + return x.TestUint32 + } + return nil +} + +func (x *TestRepeated) GetTestUint64() []uint64 { + if x != nil { + return x.TestUint64 + } + return nil +} + +func (x *TestRepeated) GetTestSint32() []int32 { + if x != nil { + return x.TestSint32 + } + return nil +} + +func (x *TestRepeated) GetTestSint64() []int64 { + if x != nil { + return x.TestSint64 + } + return nil +} + +func (x *TestRepeated) GetTestFixed32() []uint32 { + if x != nil { + return x.TestFixed32 + } + return nil +} + +func (x *TestRepeated) GetTestFixed64() []uint64 { + if x != nil { + return x.TestFixed64 + } + return nil +} + +func (x *TestRepeated) GetTestSfixed32() []int32 { + if x != nil { + return x.TestSfixed32 + } + return nil +} + +func (x *TestRepeated) GetTestSfixed64() []int64 { + if x != nil { + return x.TestSfixed64 + } + return nil +} + +func (x *TestRepeated) GetTestBool() []bool { + if x != nil { + return x.TestBool + } + return nil +} + +func (x *TestRepeated) GetTestString() []string { + if x != nil { + return x.TestString + } + return nil +} + +func (x *TestRepeated) GetTestBytes() [][]byte { + if x != nil { + return x.TestBytes + } + return nil +} + +func (x *TestRepeated) GetTestEnum() []ABC { + if x != nil { + return x.TestEnum + } + return nil +} + +func (x *TestRepeated) GetTestAliasedEnum() []AliasedABC { + if x != nil { + return x.TestAliasedEnum + } + return nil +} + +type TestStringMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestDouble map[string]float64 `protobuf:"bytes,1,rep,name=test_double,json=testDouble,proto3" json:"test_double,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + TestFloat map[string]float32 `protobuf:"bytes,2,rep,name=test_float,json=testFloat,proto3" json:"test_float,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + TestInt32 map[string]int32 `protobuf:"bytes,3,rep,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestInt64 map[string]int64 `protobuf:"bytes,4,rep,name=test_int64,json=testInt64,proto3" json:"test_int64,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestUint32 map[string]uint32 `protobuf:"bytes,5,rep,name=test_uint32,json=testUint32,proto3" json:"test_uint32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestUint64 map[string]uint64 `protobuf:"bytes,6,rep,name=test_uint64,json=testUint64,proto3" json:"test_uint64,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestSint32 map[string]int32 `protobuf:"bytes,7,rep,name=test_sint32,json=testSint32,proto3" json:"test_sint32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + TestSint64 map[string]int64 `protobuf:"bytes,8,rep,name=test_sint64,json=testSint64,proto3" json:"test_sint64,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + TestFixed32 map[string]uint32 `protobuf:"bytes,9,rep,name=test_fixed32,json=testFixed32,proto3" json:"test_fixed32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + TestFixed64 map[string]uint64 `protobuf:"bytes,10,rep,name=test_fixed64,json=testFixed64,proto3" json:"test_fixed64,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + TestSfixed32 map[string]int32 `protobuf:"bytes,11,rep,name=test_sfixed32,json=testSfixed32,proto3" json:"test_sfixed32,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + TestSfixed64 map[string]int64 `protobuf:"bytes,12,rep,name=test_sfixed64,json=testSfixed64,proto3" json:"test_sfixed64,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + TestBool map[string]bool `protobuf:"bytes,13,rep,name=test_bool,json=testBool,proto3" json:"test_bool,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + TestString map[string]string `protobuf:"bytes,14,rep,name=test_string,json=testString,proto3" json:"test_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestBytes map[string][]byte `protobuf:"bytes,15,rep,name=test_bytes,json=testBytes,proto3" json:"test_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestEnum map[string]ABC `protobuf:"bytes,16,rep,name=test_enum,json=testEnum,proto3" json:"test_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=nebius.testdata.ABC"` + TestAliasedEnum map[string]AliasedABC `protobuf:"bytes,17,rep,name=test_aliased_enum,json=testAliasedEnum,proto3" json:"test_aliased_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=nebius.testdata.AliasedABC"` +} + +func (x *TestStringMap) Reset() { + *x = TestStringMap{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestStringMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestStringMap) ProtoMessage() {} + +func (x *TestStringMap) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestStringMap.ProtoReflect.Descriptor instead. +func (*TestStringMap) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{3} +} + +func (x *TestStringMap) GetTestDouble() map[string]float64 { + if x != nil { + return x.TestDouble + } + return nil +} + +func (x *TestStringMap) GetTestFloat() map[string]float32 { + if x != nil { + return x.TestFloat + } + return nil +} + +func (x *TestStringMap) GetTestInt32() map[string]int32 { + if x != nil { + return x.TestInt32 + } + return nil +} + +func (x *TestStringMap) GetTestInt64() map[string]int64 { + if x != nil { + return x.TestInt64 + } + return nil +} + +func (x *TestStringMap) GetTestUint32() map[string]uint32 { + if x != nil { + return x.TestUint32 + } + return nil +} + +func (x *TestStringMap) GetTestUint64() map[string]uint64 { + if x != nil { + return x.TestUint64 + } + return nil +} + +func (x *TestStringMap) GetTestSint32() map[string]int32 { + if x != nil { + return x.TestSint32 + } + return nil +} + +func (x *TestStringMap) GetTestSint64() map[string]int64 { + if x != nil { + return x.TestSint64 + } + return nil +} + +func (x *TestStringMap) GetTestFixed32() map[string]uint32 { + if x != nil { + return x.TestFixed32 + } + return nil +} + +func (x *TestStringMap) GetTestFixed64() map[string]uint64 { + if x != nil { + return x.TestFixed64 + } + return nil +} + +func (x *TestStringMap) GetTestSfixed32() map[string]int32 { + if x != nil { + return x.TestSfixed32 + } + return nil +} + +func (x *TestStringMap) GetTestSfixed64() map[string]int64 { + if x != nil { + return x.TestSfixed64 + } + return nil +} + +func (x *TestStringMap) GetTestBool() map[string]bool { + if x != nil { + return x.TestBool + } + return nil +} + +func (x *TestStringMap) GetTestString() map[string]string { + if x != nil { + return x.TestString + } + return nil +} + +func (x *TestStringMap) GetTestBytes() map[string][]byte { + if x != nil { + return x.TestBytes + } + return nil +} + +func (x *TestStringMap) GetTestEnum() map[string]ABC { + if x != nil { + return x.TestEnum + } + return nil +} + +func (x *TestStringMap) GetTestAliasedEnum() map[string]AliasedABC { + if x != nil { + return x.TestAliasedEnum + } + return nil +} + +type NotAStringMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestInt32 *TestOptional `protobuf:"bytes,1,opt,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty"` +} + +func (x *NotAStringMap) Reset() { + *x = NotAStringMap{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotAStringMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotAStringMap) ProtoMessage() {} + +func (x *NotAStringMap) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotAStringMap.ProtoReflect.Descriptor instead. +func (*NotAStringMap) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{4} +} + +func (x *NotAStringMap) GetTestInt32() *TestOptional { + if x != nil { + return x.TestInt32 + } + return nil +} + +type TestTypeMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestInt32 map[int32]string `protobuf:"bytes,3,rep,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestInt64 map[int64]string `protobuf:"bytes,4,rep,name=test_int64,json=testInt64,proto3" json:"test_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestUint32 map[uint32]string `protobuf:"bytes,5,rep,name=test_uint32,json=testUint32,proto3" json:"test_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestUint64 map[uint64]string `protobuf:"bytes,6,rep,name=test_uint64,json=testUint64,proto3" json:"test_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestSint32 map[int32]string `protobuf:"bytes,7,rep,name=test_sint32,json=testSint32,proto3" json:"test_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestSint64 map[int64]string `protobuf:"bytes,8,rep,name=test_sint64,json=testSint64,proto3" json:"test_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestFixed32 map[uint32]string `protobuf:"bytes,9,rep,name=test_fixed32,json=testFixed32,proto3" json:"test_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestFixed64 map[uint64]string `protobuf:"bytes,10,rep,name=test_fixed64,json=testFixed64,proto3" json:"test_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestSfixed32 map[int32]string `protobuf:"bytes,11,rep,name=test_sfixed32,json=testSfixed32,proto3" json:"test_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestSfixed64 map[int64]string `protobuf:"bytes,12,rep,name=test_sfixed64,json=testSfixed64,proto3" json:"test_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestBool map[bool]string `protobuf:"bytes,13,rep,name=test_bool,json=testBool,proto3" json:"test_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestString map[string]string `protobuf:"bytes,14,rep,name=test_string,json=testString,proto3" json:"test_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TestTypeMap) Reset() { + *x = TestTypeMap{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestTypeMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestTypeMap) ProtoMessage() {} + +func (x *TestTypeMap) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestTypeMap.ProtoReflect.Descriptor instead. +func (*TestTypeMap) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{5} +} + +func (x *TestTypeMap) GetTestInt32() map[int32]string { + if x != nil { + return x.TestInt32 + } + return nil +} + +func (x *TestTypeMap) GetTestInt64() map[int64]string { + if x != nil { + return x.TestInt64 + } + return nil +} + +func (x *TestTypeMap) GetTestUint32() map[uint32]string { + if x != nil { + return x.TestUint32 + } + return nil +} + +func (x *TestTypeMap) GetTestUint64() map[uint64]string { + if x != nil { + return x.TestUint64 + } + return nil +} + +func (x *TestTypeMap) GetTestSint32() map[int32]string { + if x != nil { + return x.TestSint32 + } + return nil +} + +func (x *TestTypeMap) GetTestSint64() map[int64]string { + if x != nil { + return x.TestSint64 + } + return nil +} + +func (x *TestTypeMap) GetTestFixed32() map[uint32]string { + if x != nil { + return x.TestFixed32 + } + return nil +} + +func (x *TestTypeMap) GetTestFixed64() map[uint64]string { + if x != nil { + return x.TestFixed64 + } + return nil +} + +func (x *TestTypeMap) GetTestSfixed32() map[int32]string { + if x != nil { + return x.TestSfixed32 + } + return nil +} + +func (x *TestTypeMap) GetTestSfixed64() map[int64]string { + if x != nil { + return x.TestSfixed64 + } + return nil +} + +func (x *TestTypeMap) GetTestBool() map[bool]string { + if x != nil { + return x.TestBool + } + return nil +} + +func (x *TestTypeMap) GetTestString() map[string]string { + if x != nil { + return x.TestString + } + return nil +} + +type WrongTypeMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestInt32 map[int32]int64 `protobuf:"bytes,1,rep,name=test_int32,json=testInt32,proto3" json:"test_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *WrongTypeMap) Reset() { + *x = WrongTypeMap{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WrongTypeMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WrongTypeMap) ProtoMessage() {} + +func (x *WrongTypeMap) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WrongTypeMap.ProtoReflect.Descriptor instead. +func (*WrongTypeMap) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{6} +} + +func (x *WrongTypeMap) GetTestInt32() map[int32]int64 { + if x != nil { + return x.TestInt32 + } + return nil +} + +type TestOptional struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestSingle *uint32 `protobuf:"varint,1,opt,name=test_single,json=testSingle,proto3,oneof" json:"test_single,omitempty"` + TestStruct *TestSimple `protobuf:"bytes,2,opt,name=test_struct,json=testStruct,proto3,oneof" json:"test_struct,omitempty"` +} + +func (x *TestOptional) Reset() { + *x = TestOptional{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestOptional) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestOptional) ProtoMessage() {} + +func (x *TestOptional) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestOptional.ProtoReflect.Descriptor instead. +func (*TestOptional) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{7} +} + +func (x *TestOptional) GetTestSingle() uint32 { + if x != nil && x.TestSingle != nil { + return *x.TestSingle + } + return 0 +} + +func (x *TestOptional) GetTestStruct() *TestSimple { + if x != nil { + return x.TestStruct + } + return nil +} + +type TestOneOf struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to TestOneof: + // + // *TestOneOf_TestUint32 + // *TestOneOf_TestString + // *TestOneOf_TestStruct + TestOneof isTestOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (x *TestOneOf) Reset() { + *x = TestOneOf{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestOneOf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestOneOf) ProtoMessage() {} + +func (x *TestOneOf) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestOneOf.ProtoReflect.Descriptor instead. +func (*TestOneOf) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{8} +} + +func (m *TestOneOf) GetTestOneof() isTestOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (x *TestOneOf) GetTestUint32() uint32 { + if x, ok := x.GetTestOneof().(*TestOneOf_TestUint32); ok { + return x.TestUint32 + } + return 0 +} + +func (x *TestOneOf) GetTestString() string { + if x, ok := x.GetTestOneof().(*TestOneOf_TestString); ok { + return x.TestString + } + return "" +} + +func (x *TestOneOf) GetTestStruct() *TestSimple { + if x, ok := x.GetTestOneof().(*TestOneOf_TestStruct); ok { + return x.TestStruct + } + return nil +} + +type isTestOneOf_TestOneof interface { + isTestOneOf_TestOneof() +} + +type TestOneOf_TestUint32 struct { + TestUint32 uint32 `protobuf:"varint,1,opt,name=test_uint32,json=testUint32,proto3,oneof"` +} + +type TestOneOf_TestString struct { + TestString string `protobuf:"bytes,2,opt,name=test_string,json=testString,proto3,oneof"` +} + +type TestOneOf_TestStruct struct { + TestStruct *TestSimple `protobuf:"bytes,3,opt,name=test_struct,json=testStruct,proto3,oneof"` +} + +func (*TestOneOf_TestUint32) isTestOneOf_TestOneof() {} + +func (*TestOneOf_TestString) isTestOneOf_TestOneof() {} + +func (*TestOneOf_TestStruct) isTestOneOf_TestOneof() {} + +type TestAnotherOneOf struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to TestAnotherOneof: + // + // *TestAnotherOneOf_TestUint32 + // *TestAnotherOneOf_TestUint64 + TestAnotherOneof isTestAnotherOneOf_TestAnotherOneof `protobuf_oneof:"test_another_oneof"` +} + +func (x *TestAnotherOneOf) Reset() { + *x = TestAnotherOneOf{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestAnotherOneOf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAnotherOneOf) ProtoMessage() {} + +func (x *TestAnotherOneOf) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestAnotherOneOf.ProtoReflect.Descriptor instead. +func (*TestAnotherOneOf) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{9} +} + +func (m *TestAnotherOneOf) GetTestAnotherOneof() isTestAnotherOneOf_TestAnotherOneof { + if m != nil { + return m.TestAnotherOneof + } + return nil +} + +func (x *TestAnotherOneOf) GetTestUint32() uint32 { + if x, ok := x.GetTestAnotherOneof().(*TestAnotherOneOf_TestUint32); ok { + return x.TestUint32 + } + return 0 +} + +func (x *TestAnotherOneOf) GetTestUint64() uint64 { + if x, ok := x.GetTestAnotherOneof().(*TestAnotherOneOf_TestUint64); ok { + return x.TestUint64 + } + return 0 +} + +type isTestAnotherOneOf_TestAnotherOneof interface { + isTestAnotherOneOf_TestAnotherOneof() +} + +type TestAnotherOneOf_TestUint32 struct { + TestUint32 uint32 `protobuf:"varint,1,opt,name=test_uint32,json=testUint32,proto3,oneof"` +} + +type TestAnotherOneOf_TestUint64 struct { + TestUint64 uint64 `protobuf:"varint,2,opt,name=test_uint64,json=testUint64,proto3,oneof"` +} + +func (*TestAnotherOneOf_TestUint32) isTestAnotherOneOf_TestAnotherOneof() {} + +func (*TestAnotherOneOf_TestUint64) isTestAnotherOneOf_TestAnotherOneof() {} + +type TestStructs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestStruct *TestSimple `protobuf:"bytes,1,opt,name=test_struct,json=testStruct,proto3" json:"test_struct,omitempty"` + TestRepeated []*TestSimple `protobuf:"bytes,2,rep,name=test_repeated,json=testRepeated,proto3" json:"test_repeated,omitempty"` + TestStringmap map[string]*TestSimple `protobuf:"bytes,3,rep,name=test_stringmap,json=testStringmap,proto3" json:"test_stringmap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TestIntmap map[int32]*TestSimple `protobuf:"bytes,4,rep,name=test_intmap,json=testIntmap,proto3" json:"test_intmap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TestStructs) Reset() { + *x = TestStructs{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestStructs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestStructs) ProtoMessage() {} + +func (x *TestStructs) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestStructs.ProtoReflect.Descriptor instead. +func (*TestStructs) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{10} +} + +func (x *TestStructs) GetTestStruct() *TestSimple { + if x != nil { + return x.TestStruct + } + return nil +} + +func (x *TestStructs) GetTestRepeated() []*TestSimple { + if x != nil { + return x.TestRepeated + } + return nil +} + +func (x *TestStructs) GetTestStringmap() map[string]*TestSimple { + if x != nil { + return x.TestStringmap + } + return nil +} + +func (x *TestStructs) GetTestIntmap() map[int32]*TestSimple { + if x != nil { + return x.TestIntmap + } + return nil +} + +type TestX struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Y []*TestY `protobuf:"bytes,1,rep,name=y,proto3" json:"y,omitempty"` +} + +func (x *TestX) Reset() { + *x = TestX{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestX) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestX) ProtoMessage() {} + +func (x *TestX) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestX.ProtoReflect.Descriptor instead. +func (*TestX) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{11} +} + +func (x *TestX) GetY() []*TestY { + if x != nil { + return x.Y + } + return nil +} + +type TestY struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Z []*TestZ `protobuf:"bytes,1,rep,name=z,proto3" json:"z,omitempty"` +} + +func (x *TestY) Reset() { + *x = TestY{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestY) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestY) ProtoMessage() {} + +func (x *TestY) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestY.ProtoReflect.Descriptor instead. +func (*TestY) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{12} +} + +func (x *TestY) GetZ() []*TestZ { + if x != nil { + return x.Z + } + return nil +} + +type TestZ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"` + B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` +} + +func (x *TestZ) Reset() { + *x = TestZ{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestZ) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestZ) ProtoMessage() {} + +func (x *TestZ) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestZ.ProtoReflect.Descriptor instead. +func (*TestZ) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{13} +} + +func (x *TestZ) GetA() string { + if x != nil { + return x.A + } + return "" +} + +func (x *TestZ) GetB() string { + if x != nil { + return x.B + } + return "" +} + +type TestA struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + B map[string]*TestB `protobuf:"bytes,1,rep,name=b,proto3" json:"b,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TestA) Reset() { + *x = TestA{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestA) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestA) ProtoMessage() {} + +func (x *TestA) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestA.ProtoReflect.Descriptor instead. +func (*TestA) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{14} +} + +func (x *TestA) GetB() map[string]*TestB { + if x != nil { + return x.B + } + return nil +} + +type TestB struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + C map[string]*TestC `protobuf:"bytes,1,rep,name=c,proto3" json:"c,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TestB) Reset() { + *x = TestB{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestB) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestB) ProtoMessage() {} + +func (x *TestB) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestB.ProtoReflect.Descriptor instead. +func (*TestB) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{15} +} + +func (x *TestB) GetC() map[string]*TestC { + if x != nil { + return x.C + } + return nil +} + +type TestC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + X string `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"` + Y string `protobuf:"bytes,2,opt,name=y,proto3" json:"y,omitempty"` +} + +func (x *TestC) Reset() { + *x = TestC{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestC) ProtoMessage() {} + +func (x *TestC) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestC.ProtoReflect.Descriptor instead. +func (*TestC) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{16} +} + +func (x *TestC) GetX() string { + if x != nil { + return x.X + } + return "" +} + +func (x *TestC) GetY() string { + if x != nil { + return x.Y + } + return "" +} + +type TestWellKnown struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TestAny *anypb.Any `protobuf:"bytes,1,opt,name=test_any,json=testAny,proto3" json:"test_any,omitempty"` + TestTs *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=test_ts,json=testTs,proto3" json:"test_ts,omitempty"` + TestRepeatedAny []*anypb.Any `protobuf:"bytes,3,rep,name=test_repeated_any,json=testRepeatedAny,proto3" json:"test_repeated_any,omitempty"` + TestRepeatedTs []*timestamppb.Timestamp `protobuf:"bytes,4,rep,name=test_repeated_ts,json=testRepeatedTs,proto3" json:"test_repeated_ts,omitempty"` +} + +func (x *TestWellKnown) Reset() { + *x = TestWellKnown{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestWellKnown) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestWellKnown) ProtoMessage() {} + +func (x *TestWellKnown) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestWellKnown.ProtoReflect.Descriptor instead. +func (*TestWellKnown) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{17} +} + +func (x *TestWellKnown) GetTestAny() *anypb.Any { + if x != nil { + return x.TestAny + } + return nil +} + +func (x *TestWellKnown) GetTestTs() *timestamppb.Timestamp { + if x != nil { + return x.TestTs + } + return nil +} + +func (x *TestWellKnown) GetTestRepeatedAny() []*anypb.Any { + if x != nil { + return x.TestRepeatedAny + } + return nil +} + +func (x *TestWellKnown) GetTestRepeatedTs() []*timestamppb.Timestamp { + if x != nil { + return x.TestRepeatedTs + } + return nil +} + +type TestRecursiveRepeated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field []*RecursiveStruct `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"` +} + +func (x *TestRecursiveRepeated) Reset() { + *x = TestRecursiveRepeated{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestRecursiveRepeated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRecursiveRepeated) ProtoMessage() {} + +func (x *TestRecursiveRepeated) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestRecursiveRepeated.ProtoReflect.Descriptor instead. +func (*TestRecursiveRepeated) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{18} +} + +func (x *TestRecursiveRepeated) GetField() []*RecursiveStruct { + if x != nil { + return x.Field + } + return nil +} + +type TestRecursiveMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field map[string]*RecursiveStruct `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TestRecursiveMap) Reset() { + *x = TestRecursiveMap{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestRecursiveMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRecursiveMap) ProtoMessage() {} + +func (x *TestRecursiveMap) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestRecursiveMap.ProtoReflect.Descriptor instead. +func (*TestRecursiveMap) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{19} +} + +func (x *TestRecursiveMap) GetField() map[string]*RecursiveStruct { + if x != nil { + return x.Field + } + return nil +} + +type TestRecursiveSingle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field *RecursiveStruct `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` +} + +func (x *TestRecursiveSingle) Reset() { + *x = TestRecursiveSingle{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestRecursiveSingle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRecursiveSingle) ProtoMessage() {} + +func (x *TestRecursiveSingle) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestRecursiveSingle.ProtoReflect.Descriptor instead. +func (*TestRecursiveSingle) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{20} +} + +func (x *TestRecursiveSingle) GetField() *RecursiveStruct { + if x != nil { + return x.Field + } + return nil +} + +type TestOutputOnly struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + I int32 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"` + S string `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` + Msg *TestSimple `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` + M map[string]int32 `protobuf:"bytes,4,rep,name=m,proto3" json:"m,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + R []int32 `protobuf:"varint,5,rep,packed,name=r,proto3" json:"r,omitempty"` +} + +func (x *TestOutputOnly) Reset() { + *x = TestOutputOnly{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestOutputOnly) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestOutputOnly) ProtoMessage() {} + +func (x *TestOutputOnly) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestOutputOnly.ProtoReflect.Descriptor instead. +func (*TestOutputOnly) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{21} +} + +func (x *TestOutputOnly) GetI() int32 { + if x != nil { + return x.I + } + return 0 +} + +func (x *TestOutputOnly) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *TestOutputOnly) GetMsg() *TestSimple { + if x != nil { + return x.Msg + } + return nil +} + +func (x *TestOutputOnly) GetM() map[string]int32 { + if x != nil { + return x.M + } + return nil +} + +func (x *TestOutputOnly) GetR() []int32 { + if x != nil { + return x.R + } + return nil +} + +type TestImmutable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + I int32 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"` + S string `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` + Msg *TestSimple `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` + M map[string]int32 `protobuf:"bytes,4,rep,name=m,proto3" json:"m,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + R []int32 `protobuf:"varint,5,rep,packed,name=r,proto3" json:"r,omitempty"` +} + +func (x *TestImmutable) Reset() { + *x = TestImmutable{} + if protoimpl.UnsafeEnabled { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TestImmutable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestImmutable) ProtoMessage() {} + +func (x *TestImmutable) ProtoReflect() protoreflect.Message { + mi := &file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestImmutable.ProtoReflect.Descriptor instead. +func (*TestImmutable) Descriptor() ([]byte, []int) { + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP(), []int{22} +} + +func (x *TestImmutable) GetI() int32 { + if x != nil { + return x.I + } + return 0 +} + +func (x *TestImmutable) GetS() string { + if x != nil { + return x.S + } + return "" +} + +func (x *TestImmutable) GetMsg() *TestSimple { + if x != nil { + return x.Msg + } + return nil +} + +func (x *TestImmutable) GetM() map[string]int32 { + if x != nil { + return x.M + } + return nil +} + +func (x *TestImmutable) GetR() []int32 { + if x != nil { + return x.R + } + return nil +} + +var File_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto protoreflect.FileDescriptor + +var file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, + 0x73, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x65, 0x73, 0x74, + 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x65, + 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x72, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, + 0x69, 0x76, 0x65, 0x22, 0xf7, 0x04, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x44, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, + 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, + 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0b, 0x74, + 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0f, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, + 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x6f, + 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, + 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x31, 0x0a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x42, 0x43, 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, + 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x47, 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x41, 0x42, 0x43, 0x52, 0x0f, 0x74, 0x65, + 0x73, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x22, 0xf9, 0x04, + 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x01, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x02, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x1d, 0x0a, + 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x04, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x1f, + 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x11, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x12, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x06, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x0c, 0x74, + 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x23, 0x0a, 0x0d, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, + 0x28, 0x10, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, + 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x41, 0x42, 0x43, 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x47, 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, + 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x64, 0x41, 0x42, 0x43, 0x52, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x22, 0xdf, 0x13, 0x0a, 0x0d, 0x54, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0b, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x4c, 0x0a, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x09, 0x74, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x0a, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x4c, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, + 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, + 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, + 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x65, 0x73, + 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x52, 0x0a, 0x0c, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x52, + 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x12, 0x55, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x73, + 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x55, 0x0a, 0x0d, 0x74, 0x65, 0x73, + 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x12, 0x49, 0x0a, 0x09, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x4f, 0x0a, 0x0b, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x4c, 0x0a, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x09, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x65, 0x73, + 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x5f, 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x3d, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3d, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, + 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, + 0x0f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x54, + 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x54, + 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, + 0x0d, 0x54, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x54, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, + 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x0d, 0x54, 0x65, 0x73, 0x74, 0x45, + 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x42, 0x43, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5f, 0x0a, 0x14, 0x54, 0x65, + 0x73, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x41, 0x42, 0x43, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x0d, 0x4e, + 0x6f, 0x74, 0x41, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x3c, 0x0a, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, + 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x22, 0xbd, 0x0d, 0x0a, 0x0b, 0x54, + 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x65, 0x73, + 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x4a, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x4d, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, + 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x50, + 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, + 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x12, 0x50, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x12, 0x53, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x53, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x53, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, + 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x74, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x47, 0x0a, 0x09, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x65, 0x73, + 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x3d, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3d, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, + 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, + 0x0f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, + 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, + 0x54, 0x65, 0x73, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, + 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, + 0x11, 0x54, 0x65, 0x73, 0x74, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, + 0x0a, 0x0d, 0x54, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, 0x0c, 0x57, + 0x72, 0x6f, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x4b, 0x0a, 0x0a, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, + 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, + 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x48, + 0x01, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x22, 0x9f, 0x01, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x21, + 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, + 0x6f, 0x66, 0x22, 0x6e, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, + 0x72, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x75, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, 0x74, + 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x65, 0x73, + 0x74, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x42, 0x14, 0x0a, 0x12, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, + 0x6f, 0x66, 0x22, 0xef, 0x03, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, + 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x12, 0x40, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, + 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x56, 0x0a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x65, 0x73, + 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x70, 0x12, 0x4d, 0x0a, 0x0b, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x49, 0x6e, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, + 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x6d, 0x61, 0x70, 0x1a, 0x5d, 0x0a, 0x12, 0x54, 0x65, 0x73, + 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, + 0x49, 0x6e, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2d, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x58, 0x12, 0x24, 0x0a, + 0x01, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x59, + 0x52, 0x01, 0x79, 0x22, 0x2d, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x59, 0x12, 0x24, 0x0a, 0x01, + 0x7a, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x5a, 0x52, + 0x01, 0x7a, 0x22, 0x23, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x5a, 0x12, 0x0c, 0x0a, 0x01, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x62, 0x22, 0x82, 0x01, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, + 0x41, 0x12, 0x2b, 0x0a, 0x01, 0x62, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, + 0x65, 0x73, 0x74, 0x41, 0x2e, 0x42, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x01, 0x62, 0x1a, 0x4c, + 0x0a, 0x06, 0x42, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x42, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x82, 0x01, 0x0a, + 0x05, 0x54, 0x65, 0x73, 0x74, 0x42, 0x12, 0x2b, 0x0a, 0x01, 0x63, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x42, 0x2e, 0x43, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x01, 0x63, 0x1a, 0x4c, 0x0a, 0x06, 0x43, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x23, 0x0a, 0x05, 0x54, 0x65, 0x73, 0x74, 0x43, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x22, 0xfd, 0x01, 0x0a, 0x0d, 0x54, 0x65, 0x73, 0x74, 0x57, + 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x07, 0x74, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x65, 0x73, + 0x74, 0x5f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x74, 0x65, 0x73, 0x74, 0x54, 0x73, 0x12, 0x40, + 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0f, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x79, + 0x12, 0x44, 0x0a, 0x10, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x54, 0x73, 0x22, 0x4f, 0x0a, 0x15, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x36, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x05, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x70, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x1a, 0x5a, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4d, 0x0a, 0x13, + 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xf3, 0x01, 0x0a, 0x0e, + 0x54, 0x65, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x12, + 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, + 0x01, 0x69, 0x12, 0x12, 0x0a, 0x01, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x05, 0x52, 0x01, 0x73, 0x12, 0x33, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x3a, 0x0a, 0x01, 0x6d, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x2e, 0x4d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x05, 0x52, 0x01, 0x6d, 0x12, 0x12, 0x0a, 0x01, 0x72, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x05, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x01, 0x72, 0x1a, 0x34, 0x0a, 0x06, 0x4d, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x0d, 0x54, 0x65, 0x73, 0x74, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x02, 0x52, 0x01, 0x69, 0x12, 0x12, 0x0a, 0x01, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x01, 0x73, 0x12, 0x33, 0x0a, 0x03, 0x6d, + 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x03, 0x6d, 0x73, 0x67, + 0x12, 0x39, 0x0a, 0x01, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x4d, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x01, 0x6d, 0x12, 0x12, 0x0a, 0x01, 0x72, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x01, 0x72, 0x1a, + 0x34, 0x0a, 0x06, 0x4d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x39, 0x0a, 0x03, 0x41, 0x42, 0x43, 0x12, 0x11, 0x0a, 0x0d, + 0x41, 0x42, 0x43, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x41, 0x42, 0x43, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, + 0x43, 0x5f, 0x42, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, 0x43, 0x5f, 0x43, 0x10, 0x03, + 0x2a, 0x55, 0x0a, 0x0a, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x41, 0x42, 0x43, 0x12, 0x12, + 0x0a, 0x0e, 0x41, 0x41, 0x42, 0x43, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x41, 0x42, 0x43, 0x5f, 0x41, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x41, 0x41, 0x42, 0x43, 0x5f, 0x42, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x41, + 0x42, 0x43, 0x5f, 0x42, 0x32, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x41, 0x42, 0x43, 0x5f, + 0x43, 0x10, 0x03, 0x1a, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescOnce sync.Once + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescData = file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDesc +) + +func file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescGZIP() []byte { + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescOnce.Do(func() { + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescData) + }) + return file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDescData +} + +var file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_goTypes = []any{ + (ABC)(0), // 0: nebius.testdata.ABC + (AliasedABC)(0), // 1: nebius.testdata.AliasedABC + (*RecursiveStruct)(nil), // 2: nebius.testdata.RecursiveStruct + (*TestSimple)(nil), // 3: nebius.testdata.TestSimple + (*TestRepeated)(nil), // 4: nebius.testdata.TestRepeated + (*TestStringMap)(nil), // 5: nebius.testdata.TestStringMap + (*NotAStringMap)(nil), // 6: nebius.testdata.NotAStringMap + (*TestTypeMap)(nil), // 7: nebius.testdata.TestTypeMap + (*WrongTypeMap)(nil), // 8: nebius.testdata.WrongTypeMap + (*TestOptional)(nil), // 9: nebius.testdata.TestOptional + (*TestOneOf)(nil), // 10: nebius.testdata.TestOneOf + (*TestAnotherOneOf)(nil), // 11: nebius.testdata.TestAnotherOneOf + (*TestStructs)(nil), // 12: nebius.testdata.TestStructs + (*TestX)(nil), // 13: nebius.testdata.TestX + (*TestY)(nil), // 14: nebius.testdata.TestY + (*TestZ)(nil), // 15: nebius.testdata.TestZ + (*TestA)(nil), // 16: nebius.testdata.TestA + (*TestB)(nil), // 17: nebius.testdata.TestB + (*TestC)(nil), // 18: nebius.testdata.TestC + (*TestWellKnown)(nil), // 19: nebius.testdata.TestWellKnown + (*TestRecursiveRepeated)(nil), // 20: nebius.testdata.TestRecursiveRepeated + (*TestRecursiveMap)(nil), // 21: nebius.testdata.TestRecursiveMap + (*TestRecursiveSingle)(nil), // 22: nebius.testdata.TestRecursiveSingle + (*TestOutputOnly)(nil), // 23: nebius.testdata.TestOutputOnly + (*TestImmutable)(nil), // 24: nebius.testdata.TestImmutable + nil, // 25: nebius.testdata.TestStringMap.TestDoubleEntry + nil, // 26: nebius.testdata.TestStringMap.TestFloatEntry + nil, // 27: nebius.testdata.TestStringMap.TestInt32Entry + nil, // 28: nebius.testdata.TestStringMap.TestInt64Entry + nil, // 29: nebius.testdata.TestStringMap.TestUint32Entry + nil, // 30: nebius.testdata.TestStringMap.TestUint64Entry + nil, // 31: nebius.testdata.TestStringMap.TestSint32Entry + nil, // 32: nebius.testdata.TestStringMap.TestSint64Entry + nil, // 33: nebius.testdata.TestStringMap.TestFixed32Entry + nil, // 34: nebius.testdata.TestStringMap.TestFixed64Entry + nil, // 35: nebius.testdata.TestStringMap.TestSfixed32Entry + nil, // 36: nebius.testdata.TestStringMap.TestSfixed64Entry + nil, // 37: nebius.testdata.TestStringMap.TestBoolEntry + nil, // 38: nebius.testdata.TestStringMap.TestStringEntry + nil, // 39: nebius.testdata.TestStringMap.TestBytesEntry + nil, // 40: nebius.testdata.TestStringMap.TestEnumEntry + nil, // 41: nebius.testdata.TestStringMap.TestAliasedEnumEntry + nil, // 42: nebius.testdata.TestTypeMap.TestInt32Entry + nil, // 43: nebius.testdata.TestTypeMap.TestInt64Entry + nil, // 44: nebius.testdata.TestTypeMap.TestUint32Entry + nil, // 45: nebius.testdata.TestTypeMap.TestUint64Entry + nil, // 46: nebius.testdata.TestTypeMap.TestSint32Entry + nil, // 47: nebius.testdata.TestTypeMap.TestSint64Entry + nil, // 48: nebius.testdata.TestTypeMap.TestFixed32Entry + nil, // 49: nebius.testdata.TestTypeMap.TestFixed64Entry + nil, // 50: nebius.testdata.TestTypeMap.TestSfixed32Entry + nil, // 51: nebius.testdata.TestTypeMap.TestSfixed64Entry + nil, // 52: nebius.testdata.TestTypeMap.TestBoolEntry + nil, // 53: nebius.testdata.TestTypeMap.TestStringEntry + nil, // 54: nebius.testdata.WrongTypeMap.TestInt32Entry + nil, // 55: nebius.testdata.TestStructs.TestStringmapEntry + nil, // 56: nebius.testdata.TestStructs.TestIntmapEntry + nil, // 57: nebius.testdata.TestA.BEntry + nil, // 58: nebius.testdata.TestB.CEntry + nil, // 59: nebius.testdata.TestRecursiveMap.FieldEntry + nil, // 60: nebius.testdata.TestOutputOnly.MEntry + nil, // 61: nebius.testdata.TestImmutable.MEntry + (*anypb.Any)(nil), // 62: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 63: google.protobuf.Timestamp +} +var file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_depIdxs = []int32{ + 2, // 0: nebius.testdata.RecursiveStruct.recursive:type_name -> nebius.testdata.RecursiveStruct + 0, // 1: nebius.testdata.TestSimple.test_enum:type_name -> nebius.testdata.ABC + 1, // 2: nebius.testdata.TestSimple.test_aliased_enum:type_name -> nebius.testdata.AliasedABC + 0, // 3: nebius.testdata.TestRepeated.test_enum:type_name -> nebius.testdata.ABC + 1, // 4: nebius.testdata.TestRepeated.test_aliased_enum:type_name -> nebius.testdata.AliasedABC + 25, // 5: nebius.testdata.TestStringMap.test_double:type_name -> nebius.testdata.TestStringMap.TestDoubleEntry + 26, // 6: nebius.testdata.TestStringMap.test_float:type_name -> nebius.testdata.TestStringMap.TestFloatEntry + 27, // 7: nebius.testdata.TestStringMap.test_int32:type_name -> nebius.testdata.TestStringMap.TestInt32Entry + 28, // 8: nebius.testdata.TestStringMap.test_int64:type_name -> nebius.testdata.TestStringMap.TestInt64Entry + 29, // 9: nebius.testdata.TestStringMap.test_uint32:type_name -> nebius.testdata.TestStringMap.TestUint32Entry + 30, // 10: nebius.testdata.TestStringMap.test_uint64:type_name -> nebius.testdata.TestStringMap.TestUint64Entry + 31, // 11: nebius.testdata.TestStringMap.test_sint32:type_name -> nebius.testdata.TestStringMap.TestSint32Entry + 32, // 12: nebius.testdata.TestStringMap.test_sint64:type_name -> nebius.testdata.TestStringMap.TestSint64Entry + 33, // 13: nebius.testdata.TestStringMap.test_fixed32:type_name -> nebius.testdata.TestStringMap.TestFixed32Entry + 34, // 14: nebius.testdata.TestStringMap.test_fixed64:type_name -> nebius.testdata.TestStringMap.TestFixed64Entry + 35, // 15: nebius.testdata.TestStringMap.test_sfixed32:type_name -> nebius.testdata.TestStringMap.TestSfixed32Entry + 36, // 16: nebius.testdata.TestStringMap.test_sfixed64:type_name -> nebius.testdata.TestStringMap.TestSfixed64Entry + 37, // 17: nebius.testdata.TestStringMap.test_bool:type_name -> nebius.testdata.TestStringMap.TestBoolEntry + 38, // 18: nebius.testdata.TestStringMap.test_string:type_name -> nebius.testdata.TestStringMap.TestStringEntry + 39, // 19: nebius.testdata.TestStringMap.test_bytes:type_name -> nebius.testdata.TestStringMap.TestBytesEntry + 40, // 20: nebius.testdata.TestStringMap.test_enum:type_name -> nebius.testdata.TestStringMap.TestEnumEntry + 41, // 21: nebius.testdata.TestStringMap.test_aliased_enum:type_name -> nebius.testdata.TestStringMap.TestAliasedEnumEntry + 9, // 22: nebius.testdata.NotAStringMap.test_int32:type_name -> nebius.testdata.TestOptional + 42, // 23: nebius.testdata.TestTypeMap.test_int32:type_name -> nebius.testdata.TestTypeMap.TestInt32Entry + 43, // 24: nebius.testdata.TestTypeMap.test_int64:type_name -> nebius.testdata.TestTypeMap.TestInt64Entry + 44, // 25: nebius.testdata.TestTypeMap.test_uint32:type_name -> nebius.testdata.TestTypeMap.TestUint32Entry + 45, // 26: nebius.testdata.TestTypeMap.test_uint64:type_name -> nebius.testdata.TestTypeMap.TestUint64Entry + 46, // 27: nebius.testdata.TestTypeMap.test_sint32:type_name -> nebius.testdata.TestTypeMap.TestSint32Entry + 47, // 28: nebius.testdata.TestTypeMap.test_sint64:type_name -> nebius.testdata.TestTypeMap.TestSint64Entry + 48, // 29: nebius.testdata.TestTypeMap.test_fixed32:type_name -> nebius.testdata.TestTypeMap.TestFixed32Entry + 49, // 30: nebius.testdata.TestTypeMap.test_fixed64:type_name -> nebius.testdata.TestTypeMap.TestFixed64Entry + 50, // 31: nebius.testdata.TestTypeMap.test_sfixed32:type_name -> nebius.testdata.TestTypeMap.TestSfixed32Entry + 51, // 32: nebius.testdata.TestTypeMap.test_sfixed64:type_name -> nebius.testdata.TestTypeMap.TestSfixed64Entry + 52, // 33: nebius.testdata.TestTypeMap.test_bool:type_name -> nebius.testdata.TestTypeMap.TestBoolEntry + 53, // 34: nebius.testdata.TestTypeMap.test_string:type_name -> nebius.testdata.TestTypeMap.TestStringEntry + 54, // 35: nebius.testdata.WrongTypeMap.test_int32:type_name -> nebius.testdata.WrongTypeMap.TestInt32Entry + 3, // 36: nebius.testdata.TestOptional.test_struct:type_name -> nebius.testdata.TestSimple + 3, // 37: nebius.testdata.TestOneOf.test_struct:type_name -> nebius.testdata.TestSimple + 3, // 38: nebius.testdata.TestStructs.test_struct:type_name -> nebius.testdata.TestSimple + 3, // 39: nebius.testdata.TestStructs.test_repeated:type_name -> nebius.testdata.TestSimple + 55, // 40: nebius.testdata.TestStructs.test_stringmap:type_name -> nebius.testdata.TestStructs.TestStringmapEntry + 56, // 41: nebius.testdata.TestStructs.test_intmap:type_name -> nebius.testdata.TestStructs.TestIntmapEntry + 14, // 42: nebius.testdata.TestX.y:type_name -> nebius.testdata.TestY + 15, // 43: nebius.testdata.TestY.z:type_name -> nebius.testdata.TestZ + 57, // 44: nebius.testdata.TestA.b:type_name -> nebius.testdata.TestA.BEntry + 58, // 45: nebius.testdata.TestB.c:type_name -> nebius.testdata.TestB.CEntry + 62, // 46: nebius.testdata.TestWellKnown.test_any:type_name -> google.protobuf.Any + 63, // 47: nebius.testdata.TestWellKnown.test_ts:type_name -> google.protobuf.Timestamp + 62, // 48: nebius.testdata.TestWellKnown.test_repeated_any:type_name -> google.protobuf.Any + 63, // 49: nebius.testdata.TestWellKnown.test_repeated_ts:type_name -> google.protobuf.Timestamp + 2, // 50: nebius.testdata.TestRecursiveRepeated.field:type_name -> nebius.testdata.RecursiveStruct + 59, // 51: nebius.testdata.TestRecursiveMap.field:type_name -> nebius.testdata.TestRecursiveMap.FieldEntry + 2, // 52: nebius.testdata.TestRecursiveSingle.field:type_name -> nebius.testdata.RecursiveStruct + 3, // 53: nebius.testdata.TestOutputOnly.msg:type_name -> nebius.testdata.TestSimple + 60, // 54: nebius.testdata.TestOutputOnly.m:type_name -> nebius.testdata.TestOutputOnly.MEntry + 3, // 55: nebius.testdata.TestImmutable.msg:type_name -> nebius.testdata.TestSimple + 61, // 56: nebius.testdata.TestImmutable.m:type_name -> nebius.testdata.TestImmutable.MEntry + 0, // 57: nebius.testdata.TestStringMap.TestEnumEntry.value:type_name -> nebius.testdata.ABC + 1, // 58: nebius.testdata.TestStringMap.TestAliasedEnumEntry.value:type_name -> nebius.testdata.AliasedABC + 3, // 59: nebius.testdata.TestStructs.TestStringmapEntry.value:type_name -> nebius.testdata.TestSimple + 3, // 60: nebius.testdata.TestStructs.TestIntmapEntry.value:type_name -> nebius.testdata.TestSimple + 17, // 61: nebius.testdata.TestA.BEntry.value:type_name -> nebius.testdata.TestB + 18, // 62: nebius.testdata.TestB.CEntry.value:type_name -> nebius.testdata.TestC + 2, // 63: nebius.testdata.TestRecursiveMap.FieldEntry.value:type_name -> nebius.testdata.RecursiveStruct + 64, // [64:64] is the sub-list for method output_type + 64, // [64:64] is the sub-list for method input_type + 64, // [64:64] is the sub-list for extension type_name + 64, // [64:64] is the sub-list for extension extendee + 0, // [0:64] is the sub-list for field type_name +} + +func init() { file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_init() } +func file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_init() { + if File_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RecursiveStruct); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*TestSimple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*TestRepeated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*TestStringMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*NotAStringMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*TestTypeMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*WrongTypeMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*TestOptional); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*TestOneOf); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*TestAnotherOneOf); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*TestStructs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*TestX); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*TestY); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*TestZ); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*TestA); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*TestB); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*TestC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*TestWellKnown); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*TestRecursiveRepeated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*TestRecursiveMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*TestRecursiveSingle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*TestOutputOnly); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*TestImmutable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[7].OneofWrappers = []any{} + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[8].OneofWrappers = []any{ + (*TestOneOf_TestUint32)(nil), + (*TestOneOf_TestString)(nil), + (*TestOneOf_TestStruct)(nil), + } + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes[9].OneofWrappers = []any{ + (*TestAnotherOneOf_TestUint32)(nil), + (*TestAnotherOneOf_TestUint64)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDesc, + NumEnums: 2, + NumMessages: 60, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_goTypes, + DependencyIndexes: file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_depIdxs, + EnumInfos: file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_enumTypes, + MessageInfos: file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_msgTypes, + }.Build() + File_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto = out.File + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_rawDesc = nil + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_goTypes = nil + file_api_tools_public_gosdk_fieldmask_protobuf_testdata_data_for_test_proto_depIdxs = nil +} diff --git a/fieldmask/protobuf/testdata/data_for_test.proto b/fieldmask/protobuf/testdata/data_for_test.proto new file mode 100644 index 0000000..a9e0e17 --- /dev/null +++ b/fieldmask/protobuf/testdata/data_for_test.proto @@ -0,0 +1,293 @@ +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "nebius/annotations.proto"; + +package nebius.testdata; + +// Just a simple Enum +enum ABC { + ABC_UNDEFINED = 0; + + ABC_A = 1; + + ABC_B = 2; + + ABC_C = 3; +} + +// Same Enum but with aliases +enum AliasedABC { + option allow_alias = true; + + AABC_UNDEFINED = 0; + + AABC_A = 1; + + AABC_B = 2; + + AABC_B2 = 2; + + AABC_C = 3; +} + +// This struct is recursive +// TF does not support recursive structs +// Possible solution: +// * use serialized representation +message RecursiveStruct { + string some_string = 1; + + RecursiveStruct recursive = 2; +} + +message TestSimple { + double test_double = 1; + + float test_float = 2; + + int32 test_int32 = 3; + + int64 test_int64 = 4; + + uint32 test_uint32 = 5; + + uint64 test_uint64 = 6; + + sint32 test_sint32 = 7; + + sint64 test_sint64 = 8; + + fixed32 test_fixed32 = 9; + + fixed64 test_fixed64 = 10; + + sfixed32 test_sfixed32 = 11; + + sfixed64 test_sfixed64 = 12; + + bool test_bool = 13; + + string test_string = 14; + + bytes test_bytes = 15; + + ABC test_enum = 16; + + AliasedABC test_aliased_enum = 17; +} + +message TestRepeated { + repeated double test_double = 1; + + repeated float test_float = 2; + + repeated int32 test_int32 = 3; + + repeated int64 test_int64 = 4; + + repeated uint32 test_uint32 = 5; + + repeated uint64 test_uint64 = 6; + + repeated sint32 test_sint32 = 7; + + repeated sint64 test_sint64 = 8; + + repeated fixed32 test_fixed32 = 9; + + repeated fixed64 test_fixed64 = 10; + + repeated sfixed32 test_sfixed32 = 11; + + repeated sfixed64 test_sfixed64 = 12; + + repeated bool test_bool = 13; + + repeated string test_string = 14; + + repeated bytes test_bytes = 15; + + repeated ABC test_enum = 16; + + repeated AliasedABC test_aliased_enum = 17; +} + +message TestStringMap { + map test_double = 1; + + map test_float = 2; + + map test_int32 = 3; + + map test_int64 = 4; + + map test_uint32 = 5; + + map test_uint64 = 6; + + map test_sint32 = 7; + + map test_sint64 = 8; + + map test_fixed32 = 9; + + map test_fixed64 = 10; + + map test_sfixed32 = 11; + + map test_sfixed64 = 12; + + map test_bool = 13; + + map test_string = 14; + + map test_bytes = 15; + + map test_enum = 16; + + map test_aliased_enum = 17; +} + +message NotAStringMap { + TestOptional test_int32 = 1; +} + +message TestTypeMap { + map test_int32 = 3; + + map test_int64 = 4; + + map test_uint32 = 5; + + map test_uint64 = 6; + + map test_sint32 = 7; + + map test_sint64 = 8; + + map test_fixed32 = 9; + + map test_fixed64 = 10; + + map test_sfixed32 = 11; + + map test_sfixed64 = 12; + + map test_bool = 13; + + map test_string = 14; +} + +message WrongTypeMap { + map test_int32 = 1; +} + +message TestOptional { + optional uint32 test_single = 1; + + optional TestSimple test_struct = 2; +} + +message TestOneOf { + oneof test_oneof { + uint32 test_uint32 = 1; + + string test_string = 2; + + TestSimple test_struct = 3; + } +} + +message TestAnotherOneOf { + oneof test_another_oneof { + uint32 test_uint32 = 1; + + uint64 test_uint64 = 2; + } +} + +message TestStructs { + TestSimple test_struct = 1; + + repeated TestSimple test_repeated = 2; + + map test_stringmap = 3; + + map test_intmap = 4; +} + +message TestX { + repeated TestY y = 1; +} + +message TestY { + repeated TestZ z = 1; +} + +message TestZ { + string a = 1; + + string b = 2; +} + +message TestA { + map b = 1; +} + +message TestB { + map c = 1; +} + +message TestC { + string x = 1; + + string y = 2; +} + +message TestWellKnown { + google.protobuf.Any test_any = 1; + + google.protobuf.Timestamp test_ts = 2; + + repeated google.protobuf.Any test_repeated_any = 3; + + repeated google.protobuf.Timestamp test_repeated_ts = 4; +} + +message TestRecursiveRepeated { + repeated RecursiveStruct field = 1; +} + +message TestRecursiveMap { + map field = 1; +} + +message TestRecursiveSingle { + RecursiveStruct field = 1; +} + +message TestOutputOnly { + int32 i = 1 [(field_behavior) = OUTPUT_ONLY]; + + string s = 2 [(field_behavior) = OUTPUT_ONLY]; + + TestSimple msg = 3 [(field_behavior) = OUTPUT_ONLY]; + + map m = 4 [(field_behavior) = OUTPUT_ONLY]; + + repeated int32 r = 5 [(field_behavior) = OUTPUT_ONLY]; +} + +message TestImmutable { + int32 i = 1 [(field_behavior) = IMMUTABLE]; + + string s = 2 [(field_behavior) = IMMUTABLE]; + + TestSimple msg = 3 [(field_behavior) = IMMUTABLE]; + + map m = 4 [(field_behavior) = IMMUTABLE]; + + repeated int32 r = 5 [(field_behavior) = IMMUTABLE]; +} diff --git a/internal/iface/sdk.go b/internal/iface/sdk.go new file mode 100644 index 0000000..9a1ec4b --- /dev/null +++ b/internal/iface/sdk.go @@ -0,0 +1,10 @@ +package iface + +import ( + "github.com/nebius/gosdk/conn" +) + +type SDK interface { + conn.Resolver + conn.Dialer +} diff --git a/iter/iter.go b/iter/iter.go new file mode 100644 index 0000000..5f26def --- /dev/null +++ b/iter/iter.go @@ -0,0 +1,7 @@ +// Package iter is created to simplify migration to iter package from stdlib when we support it. +package iter + +// Seq2 is an iterator over sequences of pairs of values, most commonly key-value pairs. +// When called as seq(yield), seq calls yield(k, v) for each pair (k, v) in the sequence, +// stopping early if yield returns false. +type Seq2[K, V any] func(yield func(K, V) bool) diff --git a/mocks/nebius/applications/v1alpha1/k8s_release_service.mock.go b/mocks/nebius/applications/v1alpha1/k8s_release_service.mock.go new file mode 100644 index 0000000..feef27e --- /dev/null +++ b/mocks/nebius/applications/v1alpha1/k8s_release_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/applications/v1alpha1/k8s_release_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/applications/v1alpha1/k8s_release_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/applications/v1alpha1" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockK8SReleaseService is a mock of K8SReleaseService interface. +type MockK8SReleaseService struct { + ctrl *gomock.Controller + recorder *MockK8SReleaseServiceMockRecorder +} + +// MockK8SReleaseServiceMockRecorder is the mock recorder for MockK8SReleaseService. +type MockK8SReleaseServiceMockRecorder struct { + mock *MockK8SReleaseService +} + +// NewMockK8SReleaseService creates a new mock instance. +func NewMockK8SReleaseService(ctrl *gomock.Controller) *MockK8SReleaseService { + mock := &MockK8SReleaseService{ctrl: ctrl} + mock.recorder = &MockK8SReleaseServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockK8SReleaseService) EXPECT() *MockK8SReleaseServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockK8SReleaseService) Create(arg0 context.Context, arg1 *v1alpha1.CreateK8SReleaseRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockK8SReleaseServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockK8SReleaseService)(nil).Create), varargs...) + return &MockK8SReleaseServiceCreateCall{Call: call} +} + +// MockK8SReleaseServiceCreateCall wrap *gomock.Call +type MockK8SReleaseServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockK8SReleaseServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceCreateCall) Do(f func(context.Context, *v1alpha1.CreateK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha1.CreateK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockK8SReleaseService) Delete(arg0 context.Context, arg1 *v1alpha1.DeleteK8SReleaseRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockK8SReleaseServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockK8SReleaseService)(nil).Delete), varargs...) + return &MockK8SReleaseServiceDeleteCall{Call: call} +} + +// MockK8SReleaseServiceDeleteCall wrap *gomock.Call +type MockK8SReleaseServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockK8SReleaseServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceDeleteCall) Do(f func(context.Context, *v1alpha1.DeleteK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha1.DeleteK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockK8SReleaseService) Filter(arg0 context.Context, arg1 *v1alpha1.ListK8SReleasesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.K8SRelease, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.K8SRelease, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockK8SReleaseServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockK8SReleaseService)(nil).Filter), varargs...) + return &MockK8SReleaseServiceFilterCall{Call: call} +} + +// MockK8SReleaseServiceFilterCall wrap *gomock.Call +type MockK8SReleaseServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.K8SRelease, error]) *MockK8SReleaseServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.K8SRelease, error]) *MockK8SReleaseServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.K8SRelease, error]) *MockK8SReleaseServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockK8SReleaseService) Get(arg0 context.Context, arg1 *v1alpha1.GetK8SReleaseRequest, arg2 ...grpc.CallOption) (*v1alpha1.K8SRelease, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.K8SRelease) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockK8SReleaseServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockK8SReleaseService)(nil).Get), varargs...) + return &MockK8SReleaseServiceGetCall{Call: call} +} + +// MockK8SReleaseServiceGetCall wrap *gomock.Call +type MockK8SReleaseServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceGetCall) Return(arg0 *v1alpha1.K8SRelease, arg1 error) *MockK8SReleaseServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceGetCall) Do(f func(context.Context, *v1alpha1.GetK8SReleaseRequest, ...grpc.CallOption) (*v1alpha1.K8SRelease, error)) *MockK8SReleaseServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetK8SReleaseRequest, ...grpc.CallOption) (*v1alpha1.K8SRelease, error)) *MockK8SReleaseServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockK8SReleaseService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockK8SReleaseServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockK8SReleaseService)(nil).GetOperation), varargs...) + return &MockK8SReleaseServiceGetOperationCall{Call: call} +} + +// MockK8SReleaseServiceGetOperationCall wrap *gomock.Call +type MockK8SReleaseServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockK8SReleaseServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockK8SReleaseServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockK8SReleaseService) List(arg0 context.Context, arg1 *v1alpha1.ListK8SReleasesRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListK8SReleasesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListK8SReleasesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockK8SReleaseServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockK8SReleaseService)(nil).List), varargs...) + return &MockK8SReleaseServiceListCall{Call: call} +} + +// MockK8SReleaseServiceListCall wrap *gomock.Call +type MockK8SReleaseServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceListCall) Return(arg0 *v1alpha1.ListK8SReleasesResponse, arg1 error) *MockK8SReleaseServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceListCall) Do(f func(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) (*v1alpha1.ListK8SReleasesResponse, error)) *MockK8SReleaseServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) (*v1alpha1.ListK8SReleasesResponse, error)) *MockK8SReleaseServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockK8SReleaseService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockK8SReleaseServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockK8SReleaseServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockK8SReleaseService)(nil).ListOperations), varargs...) + return &MockK8SReleaseServiceListOperationsCall{Call: call} +} + +// MockK8SReleaseServiceListOperationsCall wrap *gomock.Call +type MockK8SReleaseServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockK8SReleaseServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockK8SReleaseServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockK8SReleaseServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockK8SReleaseServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockK8SReleaseServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockK8SReleaseServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1/disk_service.mock.go b/mocks/nebius/compute/v1/disk_service.mock.go new file mode 100644 index 0000000..47538ca --- /dev/null +++ b/mocks/nebius/compute/v1/disk_service.mock.go @@ -0,0 +1,484 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1/disk_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1/disk_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/compute/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockDiskService is a mock of DiskService interface. +type MockDiskService struct { + ctrl *gomock.Controller + recorder *MockDiskServiceMockRecorder +} + +// MockDiskServiceMockRecorder is the mock recorder for MockDiskService. +type MockDiskServiceMockRecorder struct { + mock *MockDiskService +} + +// NewMockDiskService creates a new mock instance. +func NewMockDiskService(ctrl *gomock.Controller) *MockDiskService { + mock := &MockDiskService{ctrl: ctrl} + mock.recorder = &MockDiskServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDiskService) EXPECT() *MockDiskServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockDiskService) Create(arg0 context.Context, arg1 *v10.CreateDiskRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockDiskServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockDiskServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDiskService)(nil).Create), varargs...) + return &MockDiskServiceCreateCall{Call: call} +} + +// MockDiskServiceCreateCall wrap *gomock.Call +type MockDiskServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockDiskServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceCreateCall) Do(f func(context.Context, *v10.CreateDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockDiskService) Delete(arg0 context.Context, arg1 *v10.DeleteDiskRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockDiskServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockDiskServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDiskService)(nil).Delete), varargs...) + return &MockDiskServiceDeleteCall{Call: call} +} + +// MockDiskServiceDeleteCall wrap *gomock.Call +type MockDiskServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockDiskServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceDeleteCall) Do(f func(context.Context, *v10.DeleteDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockDiskService) Filter(arg0 context.Context, arg1 *v10.ListDisksRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Disk, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Disk, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockDiskServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockDiskServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockDiskService)(nil).Filter), varargs...) + return &MockDiskServiceFilterCall{Call: call} +} + +// MockDiskServiceFilterCall wrap *gomock.Call +type MockDiskServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceFilterCall) Return(arg0 iter.Seq2[*v10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceFilterCall) Do(f func(context.Context, *v10.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockDiskService) Get(arg0 context.Context, arg1 *v10.GetDiskRequest, arg2 ...grpc.CallOption) (*v10.Disk, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Disk) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockDiskServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDiskService)(nil).Get), varargs...) + return &MockDiskServiceGetCall{Call: call} +} + +// MockDiskServiceGetCall wrap *gomock.Call +type MockDiskServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetCall) Return(arg0 *v10.Disk, arg1 error) *MockDiskServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetCall) Do(f func(context.Context, *v10.GetDiskRequest, ...grpc.CallOption) (*v10.Disk, error)) *MockDiskServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetDiskRequest, ...grpc.CallOption) (*v10.Disk, error)) *MockDiskServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockDiskService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Disk, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Disk) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockDiskServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockDiskService)(nil).GetByName), varargs...) + return &MockDiskServiceGetByNameCall{Call: call} +} + +// MockDiskServiceGetByNameCall wrap *gomock.Call +type MockDiskServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetByNameCall) Return(arg0 *v10.Disk, arg1 error) *MockDiskServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Disk, error)) *MockDiskServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Disk, error)) *MockDiskServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockDiskService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockDiskServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockDiskService)(nil).GetOperation), varargs...) + return &MockDiskServiceGetOperationCall{Call: call} +} + +// MockDiskServiceGetOperationCall wrap *gomock.Call +type MockDiskServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockDiskServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockDiskService) List(arg0 context.Context, arg1 *v10.ListDisksRequest, arg2 ...grpc.CallOption) (*v10.ListDisksResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListDisksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockDiskServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockDiskServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDiskService)(nil).List), varargs...) + return &MockDiskServiceListCall{Call: call} +} + +// MockDiskServiceListCall wrap *gomock.Call +type MockDiskServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListCall) Return(arg0 *v10.ListDisksResponse, arg1 error) *MockDiskServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListCall) Do(f func(context.Context, *v10.ListDisksRequest, ...grpc.CallOption) (*v10.ListDisksResponse, error)) *MockDiskServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListCall) DoAndReturn(f func(context.Context, *v10.ListDisksRequest, ...grpc.CallOption) (*v10.ListDisksResponse, error)) *MockDiskServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockDiskService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockDiskServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockDiskServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockDiskService)(nil).ListOperations), varargs...) + return &MockDiskServiceListOperationsCall{Call: call} +} + +// MockDiskServiceListOperationsCall wrap *gomock.Call +type MockDiskServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockDiskServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockDiskServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockDiskServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockDiskService) ListOperationsByParent(arg0 context.Context, arg1 *v10.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockDiskServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockDiskServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockDiskService)(nil).ListOperationsByParent), varargs...) + return &MockDiskServiceListOperationsByParentCall{Call: call} +} + +// MockDiskServiceListOperationsByParentCall wrap *gomock.Call +type MockDiskServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListOperationsByParentCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListOperationsByParentCall) Do(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockDiskService) Update(arg0 context.Context, arg1 *v10.UpdateDiskRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockDiskServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockDiskServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDiskService)(nil).Update), varargs...) + return &MockDiskServiceUpdateCall{Call: call} +} + +// MockDiskServiceUpdateCall wrap *gomock.Call +type MockDiskServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockDiskServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceUpdateCall) Do(f func(context.Context, *v10.UpdateDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateDiskRequest, ...grpc.CallOption) (operations.Operation, error)) *MockDiskServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1/filesystem_service.mock.go b/mocks/nebius/compute/v1/filesystem_service.mock.go new file mode 100644 index 0000000..3f3c50b --- /dev/null +++ b/mocks/nebius/compute/v1/filesystem_service.mock.go @@ -0,0 +1,484 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1/filesystem_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1/filesystem_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/compute/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockFilesystemService is a mock of FilesystemService interface. +type MockFilesystemService struct { + ctrl *gomock.Controller + recorder *MockFilesystemServiceMockRecorder +} + +// MockFilesystemServiceMockRecorder is the mock recorder for MockFilesystemService. +type MockFilesystemServiceMockRecorder struct { + mock *MockFilesystemService +} + +// NewMockFilesystemService creates a new mock instance. +func NewMockFilesystemService(ctrl *gomock.Controller) *MockFilesystemService { + mock := &MockFilesystemService{ctrl: ctrl} + mock.recorder = &MockFilesystemServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFilesystemService) EXPECT() *MockFilesystemServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockFilesystemService) Create(arg0 context.Context, arg1 *v10.CreateFilesystemRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockFilesystemServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystemService)(nil).Create), varargs...) + return &MockFilesystemServiceCreateCall{Call: call} +} + +// MockFilesystemServiceCreateCall wrap *gomock.Call +type MockFilesystemServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockFilesystemServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceCreateCall) Do(f func(context.Context, *v10.CreateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockFilesystemService) Delete(arg0 context.Context, arg1 *v10.DeleteFilesystemRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockFilesystemServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFilesystemService)(nil).Delete), varargs...) + return &MockFilesystemServiceDeleteCall{Call: call} +} + +// MockFilesystemServiceDeleteCall wrap *gomock.Call +type MockFilesystemServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceDeleteCall) Do(f func(context.Context, *v10.DeleteFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockFilesystemService) Filter(arg0 context.Context, arg1 *v10.ListFilesystemsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Filesystem, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Filesystem, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockFilesystemServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilesystemService)(nil).Filter), varargs...) + return &MockFilesystemServiceFilterCall{Call: call} +} + +// MockFilesystemServiceFilterCall wrap *gomock.Call +type MockFilesystemServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceFilterCall) Return(arg0 iter.Seq2[*v10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceFilterCall) Do(f func(context.Context, *v10.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockFilesystemService) Get(arg0 context.Context, arg1 *v10.GetFilesystemRequest, arg2 ...grpc.CallOption) (*v10.Filesystem, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Filesystem) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockFilesystemServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFilesystemService)(nil).Get), varargs...) + return &MockFilesystemServiceGetCall{Call: call} +} + +// MockFilesystemServiceGetCall wrap *gomock.Call +type MockFilesystemServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetCall) Return(arg0 *v10.Filesystem, arg1 error) *MockFilesystemServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetCall) Do(f func(context.Context, *v10.GetFilesystemRequest, ...grpc.CallOption) (*v10.Filesystem, error)) *MockFilesystemServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetFilesystemRequest, ...grpc.CallOption) (*v10.Filesystem, error)) *MockFilesystemServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockFilesystemService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Filesystem, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Filesystem) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockFilesystemServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFilesystemService)(nil).GetByName), varargs...) + return &MockFilesystemServiceGetByNameCall{Call: call} +} + +// MockFilesystemServiceGetByNameCall wrap *gomock.Call +type MockFilesystemServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetByNameCall) Return(arg0 *v10.Filesystem, arg1 error) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Filesystem, error)) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Filesystem, error)) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockFilesystemService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockFilesystemServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockFilesystemService)(nil).GetOperation), varargs...) + return &MockFilesystemServiceGetOperationCall{Call: call} +} + +// MockFilesystemServiceGetOperationCall wrap *gomock.Call +type MockFilesystemServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockFilesystemService) List(arg0 context.Context, arg1 *v10.ListFilesystemsRequest, arg2 ...grpc.CallOption) (*v10.ListFilesystemsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListFilesystemsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockFilesystemServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFilesystemService)(nil).List), varargs...) + return &MockFilesystemServiceListCall{Call: call} +} + +// MockFilesystemServiceListCall wrap *gomock.Call +type MockFilesystemServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListCall) Return(arg0 *v10.ListFilesystemsResponse, arg1 error) *MockFilesystemServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListCall) Do(f func(context.Context, *v10.ListFilesystemsRequest, ...grpc.CallOption) (*v10.ListFilesystemsResponse, error)) *MockFilesystemServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListCall) DoAndReturn(f func(context.Context, *v10.ListFilesystemsRequest, ...grpc.CallOption) (*v10.ListFilesystemsResponse, error)) *MockFilesystemServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockFilesystemService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockFilesystemServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockFilesystemService)(nil).ListOperations), varargs...) + return &MockFilesystemServiceListOperationsCall{Call: call} +} + +// MockFilesystemServiceListOperationsCall wrap *gomock.Call +type MockFilesystemServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockFilesystemService) ListOperationsByParent(arg0 context.Context, arg1 *v10.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockFilesystemServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockFilesystemService)(nil).ListOperationsByParent), varargs...) + return &MockFilesystemServiceListOperationsByParentCall{Call: call} +} + +// MockFilesystemServiceListOperationsByParentCall wrap *gomock.Call +type MockFilesystemServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListOperationsByParentCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListOperationsByParentCall) Do(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockFilesystemService) Update(arg0 context.Context, arg1 *v10.UpdateFilesystemRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockFilesystemServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFilesystemService)(nil).Update), varargs...) + return &MockFilesystemServiceUpdateCall{Call: call} +} + +// MockFilesystemServiceUpdateCall wrap *gomock.Call +type MockFilesystemServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceUpdateCall) Do(f func(context.Context, *v10.UpdateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1/gpu_cluster_service.mock.go b/mocks/nebius/compute/v1/gpu_cluster_service.mock.go new file mode 100644 index 0000000..84b2c6d --- /dev/null +++ b/mocks/nebius/compute/v1/gpu_cluster_service.mock.go @@ -0,0 +1,484 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1/gpu_cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1/gpu_cluster_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/compute/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockGpuClusterService is a mock of GpuClusterService interface. +type MockGpuClusterService struct { + ctrl *gomock.Controller + recorder *MockGpuClusterServiceMockRecorder +} + +// MockGpuClusterServiceMockRecorder is the mock recorder for MockGpuClusterService. +type MockGpuClusterServiceMockRecorder struct { + mock *MockGpuClusterService +} + +// NewMockGpuClusterService creates a new mock instance. +func NewMockGpuClusterService(ctrl *gomock.Controller) *MockGpuClusterService { + mock := &MockGpuClusterService{ctrl: ctrl} + mock.recorder = &MockGpuClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGpuClusterService) EXPECT() *MockGpuClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockGpuClusterService) Create(arg0 context.Context, arg1 *v10.CreateGpuClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockGpuClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockGpuClusterService)(nil).Create), varargs...) + return &MockGpuClusterServiceCreateCall{Call: call} +} + +// MockGpuClusterServiceCreateCall wrap *gomock.Call +type MockGpuClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceCreateCall) Do(f func(context.Context, *v10.CreateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockGpuClusterService) Delete(arg0 context.Context, arg1 *v10.DeleteGpuClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockGpuClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockGpuClusterService)(nil).Delete), varargs...) + return &MockGpuClusterServiceDeleteCall{Call: call} +} + +// MockGpuClusterServiceDeleteCall wrap *gomock.Call +type MockGpuClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceDeleteCall) Do(f func(context.Context, *v10.DeleteGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockGpuClusterService) Filter(arg0 context.Context, arg1 *v10.ListGpuClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.GpuCluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.GpuCluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockGpuClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockGpuClusterService)(nil).Filter), varargs...) + return &MockGpuClusterServiceFilterCall{Call: call} +} + +// MockGpuClusterServiceFilterCall wrap *gomock.Call +type MockGpuClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceFilterCall) Return(arg0 iter.Seq2[*v10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceFilterCall) Do(f func(context.Context, *v10.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockGpuClusterService) Get(arg0 context.Context, arg1 *v10.GetGpuClusterRequest, arg2 ...grpc.CallOption) (*v10.GpuCluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.GpuCluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockGpuClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGpuClusterService)(nil).Get), varargs...) + return &MockGpuClusterServiceGetCall{Call: call} +} + +// MockGpuClusterServiceGetCall wrap *gomock.Call +type MockGpuClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetCall) Return(arg0 *v10.GpuCluster, arg1 error) *MockGpuClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetCall) Do(f func(context.Context, *v10.GetGpuClusterRequest, ...grpc.CallOption) (*v10.GpuCluster, error)) *MockGpuClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetGpuClusterRequest, ...grpc.CallOption) (*v10.GpuCluster, error)) *MockGpuClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockGpuClusterService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.GpuCluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.GpuCluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockGpuClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockGpuClusterService)(nil).GetByName), varargs...) + return &MockGpuClusterServiceGetByNameCall{Call: call} +} + +// MockGpuClusterServiceGetByNameCall wrap *gomock.Call +type MockGpuClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetByNameCall) Return(arg0 *v10.GpuCluster, arg1 error) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.GpuCluster, error)) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.GpuCluster, error)) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockGpuClusterService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockGpuClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockGpuClusterService)(nil).GetOperation), varargs...) + return &MockGpuClusterServiceGetOperationCall{Call: call} +} + +// MockGpuClusterServiceGetOperationCall wrap *gomock.Call +type MockGpuClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockGpuClusterService) List(arg0 context.Context, arg1 *v10.ListGpuClustersRequest, arg2 ...grpc.CallOption) (*v10.ListGpuClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListGpuClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockGpuClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockGpuClusterService)(nil).List), varargs...) + return &MockGpuClusterServiceListCall{Call: call} +} + +// MockGpuClusterServiceListCall wrap *gomock.Call +type MockGpuClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListCall) Return(arg0 *v10.ListGpuClustersResponse, arg1 error) *MockGpuClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListCall) Do(f func(context.Context, *v10.ListGpuClustersRequest, ...grpc.CallOption) (*v10.ListGpuClustersResponse, error)) *MockGpuClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListCall) DoAndReturn(f func(context.Context, *v10.ListGpuClustersRequest, ...grpc.CallOption) (*v10.ListGpuClustersResponse, error)) *MockGpuClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockGpuClusterService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockGpuClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockGpuClusterService)(nil).ListOperations), varargs...) + return &MockGpuClusterServiceListOperationsCall{Call: call} +} + +// MockGpuClusterServiceListOperationsCall wrap *gomock.Call +type MockGpuClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockGpuClusterService) ListOperationsByParent(arg0 context.Context, arg1 *v10.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockGpuClusterServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockGpuClusterService)(nil).ListOperationsByParent), varargs...) + return &MockGpuClusterServiceListOperationsByParentCall{Call: call} +} + +// MockGpuClusterServiceListOperationsByParentCall wrap *gomock.Call +type MockGpuClusterServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListOperationsByParentCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListOperationsByParentCall) Do(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockGpuClusterService) Update(arg0 context.Context, arg1 *v10.UpdateGpuClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockGpuClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockGpuClusterService)(nil).Update), varargs...) + return &MockGpuClusterServiceUpdateCall{Call: call} +} + +// MockGpuClusterServiceUpdateCall wrap *gomock.Call +type MockGpuClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceUpdateCall) Do(f func(context.Context, *v10.UpdateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1/image_service.mock.go b/mocks/nebius/compute/v1/image_service.mock.go new file mode 100644 index 0000000..4390939 --- /dev/null +++ b/mocks/nebius/compute/v1/image_service.mock.go @@ -0,0 +1,307 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1/image_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1/image_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/compute/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockImageService is a mock of ImageService interface. +type MockImageService struct { + ctrl *gomock.Controller + recorder *MockImageServiceMockRecorder +} + +// MockImageServiceMockRecorder is the mock recorder for MockImageService. +type MockImageServiceMockRecorder struct { + mock *MockImageService +} + +// NewMockImageService creates a new mock instance. +func NewMockImageService(ctrl *gomock.Controller) *MockImageService { + mock := &MockImageService{ctrl: ctrl} + mock.recorder = &MockImageServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockImageService) Filter(arg0 context.Context, arg1 *v10.ListImagesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Image, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Image, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockImageServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockImageServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockImageService)(nil).Filter), varargs...) + return &MockImageServiceFilterCall{Call: call} +} + +// MockImageServiceFilterCall wrap *gomock.Call +type MockImageServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceFilterCall) Return(arg0 iter.Seq2[*v10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceFilterCall) Do(f func(context.Context, *v10.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockImageService) Get(arg0 context.Context, arg1 *v10.GetImageRequest, arg2 ...grpc.CallOption) (*v10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockImageServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockImageServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockImageService)(nil).Get), varargs...) + return &MockImageServiceGetCall{Call: call} +} + +// MockImageServiceGetCall wrap *gomock.Call +type MockImageServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetCall) Return(arg0 *v10.Image, arg1 error) *MockImageServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetCall) Do(f func(context.Context, *v10.GetImageRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetImageRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockImageService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockImageServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockImageServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockImageService)(nil).GetByName), varargs...) + return &MockImageServiceGetByNameCall{Call: call} +} + +// MockImageServiceGetByNameCall wrap *gomock.Call +type MockImageServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetByNameCall) Return(arg0 *v10.Image, arg1 error) *MockImageServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetLatestByFamily mocks base method. +func (m *MockImageService) GetLatestByFamily(arg0 context.Context, arg1 *v10.GetImageLatestByFamilyRequest, arg2 ...grpc.CallOption) (*v10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetLatestByFamily", varargs...) + ret0, _ := ret[0].(*v10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetLatestByFamily indicates an expected call of GetLatestByFamily. +func (mr *MockImageServiceMockRecorder) GetLatestByFamily(arg0, arg1 any, arg2 ...any) *MockImageServiceGetLatestByFamilyCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestByFamily", reflect.TypeOf((*MockImageService)(nil).GetLatestByFamily), varargs...) + return &MockImageServiceGetLatestByFamilyCall{Call: call} +} + +// MockImageServiceGetLatestByFamilyCall wrap *gomock.Call +type MockImageServiceGetLatestByFamilyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetLatestByFamilyCall) Return(arg0 *v10.Image, arg1 error) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetLatestByFamilyCall) Do(f func(context.Context, *v10.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetLatestByFamilyCall) DoAndReturn(f func(context.Context, *v10.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v10.Image, error)) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockImageService) List(arg0 context.Context, arg1 *v10.ListImagesRequest, arg2 ...grpc.CallOption) (*v10.ListImagesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListImagesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockImageServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockImageServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockImageService)(nil).List), varargs...) + return &MockImageServiceListCall{Call: call} +} + +// MockImageServiceListCall wrap *gomock.Call +type MockImageServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceListCall) Return(arg0 *v10.ListImagesResponse, arg1 error) *MockImageServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceListCall) Do(f func(context.Context, *v10.ListImagesRequest, ...grpc.CallOption) (*v10.ListImagesResponse, error)) *MockImageServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceListCall) DoAndReturn(f func(context.Context, *v10.ListImagesRequest, ...grpc.CallOption) (*v10.ListImagesResponse, error)) *MockImageServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockImageService) ListOperationsByParent(arg0 context.Context, arg1 *v10.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockImageServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockImageServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockImageService)(nil).ListOperationsByParent), varargs...) + return &MockImageServiceListOperationsByParentCall{Call: call} +} + +// MockImageServiceListOperationsByParentCall wrap *gomock.Call +type MockImageServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceListOperationsByParentCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceListOperationsByParentCall) Do(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1/instance_service.mock.go b/mocks/nebius/compute/v1/instance_service.mock.go new file mode 100644 index 0000000..1e31ad7 --- /dev/null +++ b/mocks/nebius/compute/v1/instance_service.mock.go @@ -0,0 +1,572 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1/instance_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1/instance_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/compute/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockInstanceService is a mock of InstanceService interface. +type MockInstanceService struct { + ctrl *gomock.Controller + recorder *MockInstanceServiceMockRecorder +} + +// MockInstanceServiceMockRecorder is the mock recorder for MockInstanceService. +type MockInstanceServiceMockRecorder struct { + mock *MockInstanceService +} + +// NewMockInstanceService creates a new mock instance. +func NewMockInstanceService(ctrl *gomock.Controller) *MockInstanceService { + mock := &MockInstanceService{ctrl: ctrl} + mock.recorder = &MockInstanceServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInstanceService) EXPECT() *MockInstanceServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInstanceService) Create(arg0 context.Context, arg1 *v10.CreateInstanceRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInstanceServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockInstanceServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInstanceService)(nil).Create), varargs...) + return &MockInstanceServiceCreateCall{Call: call} +} + +// MockInstanceServiceCreateCall wrap *gomock.Call +type MockInstanceServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceCreateCall) Do(f func(context.Context, *v10.CreateInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockInstanceService) Delete(arg0 context.Context, arg1 *v10.DeleteInstanceRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInstanceServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockInstanceServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInstanceService)(nil).Delete), varargs...) + return &MockInstanceServiceDeleteCall{Call: call} +} + +// MockInstanceServiceDeleteCall wrap *gomock.Call +type MockInstanceServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceDeleteCall) Do(f func(context.Context, *v10.DeleteInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockInstanceService) Filter(arg0 context.Context, arg1 *v10.ListInstancesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Instance, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Instance, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockInstanceServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockInstanceServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockInstanceService)(nil).Filter), varargs...) + return &MockInstanceServiceFilterCall{Call: call} +} + +// MockInstanceServiceFilterCall wrap *gomock.Call +type MockInstanceServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceFilterCall) Return(arg0 iter.Seq2[*v10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceFilterCall) Do(f func(context.Context, *v10.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockInstanceService) Get(arg0 context.Context, arg1 *v10.GetInstanceRequest, arg2 ...grpc.CallOption) (*v10.Instance, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Instance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInstanceServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInstanceService)(nil).Get), varargs...) + return &MockInstanceServiceGetCall{Call: call} +} + +// MockInstanceServiceGetCall wrap *gomock.Call +type MockInstanceServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetCall) Return(arg0 *v10.Instance, arg1 error) *MockInstanceServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetCall) Do(f func(context.Context, *v10.GetInstanceRequest, ...grpc.CallOption) (*v10.Instance, error)) *MockInstanceServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetInstanceRequest, ...grpc.CallOption) (*v10.Instance, error)) *MockInstanceServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockInstanceService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Instance, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Instance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockInstanceServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockInstanceService)(nil).GetByName), varargs...) + return &MockInstanceServiceGetByNameCall{Call: call} +} + +// MockInstanceServiceGetByNameCall wrap *gomock.Call +type MockInstanceServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetByNameCall) Return(arg0 *v10.Instance, arg1 error) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Instance, error)) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Instance, error)) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockInstanceService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockInstanceServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockInstanceService)(nil).GetOperation), varargs...) + return &MockInstanceServiceGetOperationCall{Call: call} +} + +// MockInstanceServiceGetOperationCall wrap *gomock.Call +type MockInstanceServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockInstanceService) List(arg0 context.Context, arg1 *v10.ListInstancesRequest, arg2 ...grpc.CallOption) (*v10.ListInstancesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListInstancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInstanceServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInstanceService)(nil).List), varargs...) + return &MockInstanceServiceListCall{Call: call} +} + +// MockInstanceServiceListCall wrap *gomock.Call +type MockInstanceServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListCall) Return(arg0 *v10.ListInstancesResponse, arg1 error) *MockInstanceServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListCall) Do(f func(context.Context, *v10.ListInstancesRequest, ...grpc.CallOption) (*v10.ListInstancesResponse, error)) *MockInstanceServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListCall) DoAndReturn(f func(context.Context, *v10.ListInstancesRequest, ...grpc.CallOption) (*v10.ListInstancesResponse, error)) *MockInstanceServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockInstanceService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockInstanceServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockInstanceService)(nil).ListOperations), varargs...) + return &MockInstanceServiceListOperationsCall{Call: call} +} + +// MockInstanceServiceListOperationsCall wrap *gomock.Call +type MockInstanceServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockInstanceService) ListOperationsByParent(arg0 context.Context, arg1 *v10.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockInstanceServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockInstanceService)(nil).ListOperationsByParent), varargs...) + return &MockInstanceServiceListOperationsByParentCall{Call: call} +} + +// MockInstanceServiceListOperationsByParentCall wrap *gomock.Call +type MockInstanceServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListOperationsByParentCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListOperationsByParentCall) Do(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v10.ListOperationsByParentRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Start mocks base method. +func (m *MockInstanceService) Start(arg0 context.Context, arg1 *v10.StartInstanceRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Start", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Start indicates an expected call of Start. +func (mr *MockInstanceServiceMockRecorder) Start(arg0, arg1 any, arg2 ...any) *MockInstanceServiceStartCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockInstanceService)(nil).Start), varargs...) + return &MockInstanceServiceStartCall{Call: call} +} + +// MockInstanceServiceStartCall wrap *gomock.Call +type MockInstanceServiceStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceStartCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceStartCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceStartCall) Do(f func(context.Context, *v10.StartInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceStartCall) DoAndReturn(f func(context.Context, *v10.StartInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceStartCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Stop mocks base method. +func (m *MockInstanceService) Stop(arg0 context.Context, arg1 *v10.StopInstanceRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Stop", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Stop indicates an expected call of Stop. +func (mr *MockInstanceServiceMockRecorder) Stop(arg0, arg1 any, arg2 ...any) *MockInstanceServiceStopCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockInstanceService)(nil).Stop), varargs...) + return &MockInstanceServiceStopCall{Call: call} +} + +// MockInstanceServiceStopCall wrap *gomock.Call +type MockInstanceServiceStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceStopCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceStopCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceStopCall) Do(f func(context.Context, *v10.StopInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceStopCall) DoAndReturn(f func(context.Context, *v10.StopInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceStopCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockInstanceService) Update(arg0 context.Context, arg1 *v10.UpdateInstanceRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInstanceServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockInstanceServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInstanceService)(nil).Update), varargs...) + return &MockInstanceServiceUpdateCall{Call: call} +} + +// MockInstanceServiceUpdateCall wrap *gomock.Call +type MockInstanceServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockInstanceServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceUpdateCall) Do(f func(context.Context, *v10.UpdateInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateInstanceRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInstanceServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1alpha1/disk_service.mock.go b/mocks/nebius/compute/v1alpha1/disk_service.mock.go new file mode 100644 index 0000000..a8a6d54 --- /dev/null +++ b/mocks/nebius/compute/v1alpha1/disk_service.mock.go @@ -0,0 +1,485 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1alpha1/disk_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1alpha1/disk_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockDiskService is a mock of DiskService interface. +type MockDiskService struct { + ctrl *gomock.Controller + recorder *MockDiskServiceMockRecorder +} + +// MockDiskServiceMockRecorder is the mock recorder for MockDiskService. +type MockDiskServiceMockRecorder struct { + mock *MockDiskService +} + +// NewMockDiskService creates a new mock instance. +func NewMockDiskService(ctrl *gomock.Controller) *MockDiskService { + mock := &MockDiskService{ctrl: ctrl} + mock.recorder = &MockDiskServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockDiskService) EXPECT() *MockDiskServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockDiskService) Create(arg0 context.Context, arg1 *v1alpha10.CreateDiskRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockDiskServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockDiskServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDiskService)(nil).Create), varargs...) + return &MockDiskServiceCreateCall{Call: call} +} + +// MockDiskServiceCreateCall wrap *gomock.Call +type MockDiskServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockDiskServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockDiskService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteDiskRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockDiskServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockDiskServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDiskService)(nil).Delete), varargs...) + return &MockDiskServiceDeleteCall{Call: call} +} + +// MockDiskServiceDeleteCall wrap *gomock.Call +type MockDiskServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockDiskServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockDiskService) Filter(arg0 context.Context, arg1 *v1alpha10.ListDisksRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Disk, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Disk, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockDiskServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockDiskServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockDiskService)(nil).Filter), varargs...) + return &MockDiskServiceFilterCall{Call: call} +} + +// MockDiskServiceFilterCall wrap *gomock.Call +type MockDiskServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Disk, error]) *MockDiskServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockDiskService) Get(arg0 context.Context, arg1 *v1alpha10.GetDiskRequest, arg2 ...grpc.CallOption) (*v1alpha10.Disk, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Disk) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockDiskServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDiskService)(nil).Get), varargs...) + return &MockDiskServiceGetCall{Call: call} +} + +// MockDiskServiceGetCall wrap *gomock.Call +type MockDiskServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetCall) Return(arg0 *v1alpha10.Disk, arg1 error) *MockDiskServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetCall) Do(f func(context.Context, *v1alpha10.GetDiskRequest, ...grpc.CallOption) (*v1alpha10.Disk, error)) *MockDiskServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetDiskRequest, ...grpc.CallOption) (*v1alpha10.Disk, error)) *MockDiskServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockDiskService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Disk, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Disk) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockDiskServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockDiskService)(nil).GetByName), varargs...) + return &MockDiskServiceGetByNameCall{Call: call} +} + +// MockDiskServiceGetByNameCall wrap *gomock.Call +type MockDiskServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetByNameCall) Return(arg0 *v1alpha10.Disk, arg1 error) *MockDiskServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Disk, error)) *MockDiskServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Disk, error)) *MockDiskServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockDiskService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockDiskServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockDiskServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockDiskService)(nil).GetOperation), varargs...) + return &MockDiskServiceGetOperationCall{Call: call} +} + +// MockDiskServiceGetOperationCall wrap *gomock.Call +type MockDiskServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockDiskServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockDiskService) List(arg0 context.Context, arg1 *v1alpha10.ListDisksRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListDisksResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListDisksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockDiskServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockDiskServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDiskService)(nil).List), varargs...) + return &MockDiskServiceListCall{Call: call} +} + +// MockDiskServiceListCall wrap *gomock.Call +type MockDiskServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListCall) Return(arg0 *v1alpha10.ListDisksResponse, arg1 error) *MockDiskServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListCall) Do(f func(context.Context, *v1alpha10.ListDisksRequest, ...grpc.CallOption) (*v1alpha10.ListDisksResponse, error)) *MockDiskServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListDisksRequest, ...grpc.CallOption) (*v1alpha10.ListDisksResponse, error)) *MockDiskServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockDiskService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockDiskServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockDiskServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockDiskService)(nil).ListOperations), varargs...) + return &MockDiskServiceListOperationsCall{Call: call} +} + +// MockDiskServiceListOperationsCall wrap *gomock.Call +type MockDiskServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockDiskServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockDiskServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockDiskServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockDiskService) ListOperationsByParent(arg0 context.Context, arg1 *v1alpha1.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockDiskServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockDiskServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockDiskService)(nil).ListOperationsByParent), varargs...) + return &MockDiskServiceListOperationsByParentCall{Call: call} +} + +// MockDiskServiceListOperationsByParentCall wrap *gomock.Call +type MockDiskServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceListOperationsByParentCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceListOperationsByParentCall) Do(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockDiskServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockDiskService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateDiskRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockDiskServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockDiskServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDiskService)(nil).Update), varargs...) + return &MockDiskServiceUpdateCall{Call: call} +} + +// MockDiskServiceUpdateCall wrap *gomock.Call +type MockDiskServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockDiskServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockDiskServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockDiskServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockDiskServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockDiskServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1alpha1/filesystem_service.mock.go b/mocks/nebius/compute/v1alpha1/filesystem_service.mock.go new file mode 100644 index 0000000..b5c3aef --- /dev/null +++ b/mocks/nebius/compute/v1alpha1/filesystem_service.mock.go @@ -0,0 +1,485 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1alpha1/filesystem_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1alpha1/filesystem_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockFilesystemService is a mock of FilesystemService interface. +type MockFilesystemService struct { + ctrl *gomock.Controller + recorder *MockFilesystemServiceMockRecorder +} + +// MockFilesystemServiceMockRecorder is the mock recorder for MockFilesystemService. +type MockFilesystemServiceMockRecorder struct { + mock *MockFilesystemService +} + +// NewMockFilesystemService creates a new mock instance. +func NewMockFilesystemService(ctrl *gomock.Controller) *MockFilesystemService { + mock := &MockFilesystemService{ctrl: ctrl} + mock.recorder = &MockFilesystemServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFilesystemService) EXPECT() *MockFilesystemServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockFilesystemService) Create(arg0 context.Context, arg1 *v1alpha10.CreateFilesystemRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockFilesystemServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFilesystemService)(nil).Create), varargs...) + return &MockFilesystemServiceCreateCall{Call: call} +} + +// MockFilesystemServiceCreateCall wrap *gomock.Call +type MockFilesystemServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockFilesystemServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockFilesystemService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteFilesystemRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockFilesystemServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFilesystemService)(nil).Delete), varargs...) + return &MockFilesystemServiceDeleteCall{Call: call} +} + +// MockFilesystemServiceDeleteCall wrap *gomock.Call +type MockFilesystemServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockFilesystemService) Filter(arg0 context.Context, arg1 *v1alpha10.ListFilesystemsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Filesystem, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Filesystem, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockFilesystemServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFilesystemService)(nil).Filter), varargs...) + return &MockFilesystemServiceFilterCall{Call: call} +} + +// MockFilesystemServiceFilterCall wrap *gomock.Call +type MockFilesystemServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Filesystem, error]) *MockFilesystemServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockFilesystemService) Get(arg0 context.Context, arg1 *v1alpha10.GetFilesystemRequest, arg2 ...grpc.CallOption) (*v1alpha10.Filesystem, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Filesystem) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockFilesystemServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFilesystemService)(nil).Get), varargs...) + return &MockFilesystemServiceGetCall{Call: call} +} + +// MockFilesystemServiceGetCall wrap *gomock.Call +type MockFilesystemServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetCall) Return(arg0 *v1alpha10.Filesystem, arg1 error) *MockFilesystemServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetCall) Do(f func(context.Context, *v1alpha10.GetFilesystemRequest, ...grpc.CallOption) (*v1alpha10.Filesystem, error)) *MockFilesystemServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetFilesystemRequest, ...grpc.CallOption) (*v1alpha10.Filesystem, error)) *MockFilesystemServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockFilesystemService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Filesystem, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Filesystem) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockFilesystemServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFilesystemService)(nil).GetByName), varargs...) + return &MockFilesystemServiceGetByNameCall{Call: call} +} + +// MockFilesystemServiceGetByNameCall wrap *gomock.Call +type MockFilesystemServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetByNameCall) Return(arg0 *v1alpha10.Filesystem, arg1 error) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Filesystem, error)) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Filesystem, error)) *MockFilesystemServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockFilesystemService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockFilesystemServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockFilesystemService)(nil).GetOperation), varargs...) + return &MockFilesystemServiceGetOperationCall{Call: call} +} + +// MockFilesystemServiceGetOperationCall wrap *gomock.Call +type MockFilesystemServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockFilesystemService) List(arg0 context.Context, arg1 *v1alpha10.ListFilesystemsRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListFilesystemsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListFilesystemsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockFilesystemServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFilesystemService)(nil).List), varargs...) + return &MockFilesystemServiceListCall{Call: call} +} + +// MockFilesystemServiceListCall wrap *gomock.Call +type MockFilesystemServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListCall) Return(arg0 *v1alpha10.ListFilesystemsResponse, arg1 error) *MockFilesystemServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListCall) Do(f func(context.Context, *v1alpha10.ListFilesystemsRequest, ...grpc.CallOption) (*v1alpha10.ListFilesystemsResponse, error)) *MockFilesystemServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListFilesystemsRequest, ...grpc.CallOption) (*v1alpha10.ListFilesystemsResponse, error)) *MockFilesystemServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockFilesystemService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockFilesystemServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockFilesystemService)(nil).ListOperations), varargs...) + return &MockFilesystemServiceListOperationsCall{Call: call} +} + +// MockFilesystemServiceListOperationsCall wrap *gomock.Call +type MockFilesystemServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockFilesystemService) ListOperationsByParent(arg0 context.Context, arg1 *v1alpha1.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockFilesystemServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockFilesystemService)(nil).ListOperationsByParent), varargs...) + return &MockFilesystemServiceListOperationsByParentCall{Call: call} +} + +// MockFilesystemServiceListOperationsByParentCall wrap *gomock.Call +type MockFilesystemServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceListOperationsByParentCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceListOperationsByParentCall) Do(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockFilesystemServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockFilesystemService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateFilesystemRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockFilesystemServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockFilesystemServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFilesystemService)(nil).Update), varargs...) + return &MockFilesystemServiceUpdateCall{Call: call} +} + +// MockFilesystemServiceUpdateCall wrap *gomock.Call +type MockFilesystemServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFilesystemServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFilesystemServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFilesystemServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockFilesystemServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1alpha1/gpu_cluster_service.mock.go b/mocks/nebius/compute/v1alpha1/gpu_cluster_service.mock.go new file mode 100644 index 0000000..18dc2d1 --- /dev/null +++ b/mocks/nebius/compute/v1alpha1/gpu_cluster_service.mock.go @@ -0,0 +1,485 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1alpha1/gpu_cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1alpha1/gpu_cluster_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockGpuClusterService is a mock of GpuClusterService interface. +type MockGpuClusterService struct { + ctrl *gomock.Controller + recorder *MockGpuClusterServiceMockRecorder +} + +// MockGpuClusterServiceMockRecorder is the mock recorder for MockGpuClusterService. +type MockGpuClusterServiceMockRecorder struct { + mock *MockGpuClusterService +} + +// NewMockGpuClusterService creates a new mock instance. +func NewMockGpuClusterService(ctrl *gomock.Controller) *MockGpuClusterService { + mock := &MockGpuClusterService{ctrl: ctrl} + mock.recorder = &MockGpuClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGpuClusterService) EXPECT() *MockGpuClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockGpuClusterService) Create(arg0 context.Context, arg1 *v1alpha10.CreateGpuClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockGpuClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockGpuClusterService)(nil).Create), varargs...) + return &MockGpuClusterServiceCreateCall{Call: call} +} + +// MockGpuClusterServiceCreateCall wrap *gomock.Call +type MockGpuClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockGpuClusterService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteGpuClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockGpuClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockGpuClusterService)(nil).Delete), varargs...) + return &MockGpuClusterServiceDeleteCall{Call: call} +} + +// MockGpuClusterServiceDeleteCall wrap *gomock.Call +type MockGpuClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockGpuClusterService) Filter(arg0 context.Context, arg1 *v1alpha10.ListGpuClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.GpuCluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.GpuCluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockGpuClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockGpuClusterService)(nil).Filter), varargs...) + return &MockGpuClusterServiceFilterCall{Call: call} +} + +// MockGpuClusterServiceFilterCall wrap *gomock.Call +type MockGpuClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.GpuCluster, error]) *MockGpuClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockGpuClusterService) Get(arg0 context.Context, arg1 *v1alpha10.GetGpuClusterRequest, arg2 ...grpc.CallOption) (*v1alpha10.GpuCluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.GpuCluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockGpuClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGpuClusterService)(nil).Get), varargs...) + return &MockGpuClusterServiceGetCall{Call: call} +} + +// MockGpuClusterServiceGetCall wrap *gomock.Call +type MockGpuClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetCall) Return(arg0 *v1alpha10.GpuCluster, arg1 error) *MockGpuClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetCall) Do(f func(context.Context, *v1alpha10.GetGpuClusterRequest, ...grpc.CallOption) (*v1alpha10.GpuCluster, error)) *MockGpuClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetGpuClusterRequest, ...grpc.CallOption) (*v1alpha10.GpuCluster, error)) *MockGpuClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockGpuClusterService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.GpuCluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.GpuCluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockGpuClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockGpuClusterService)(nil).GetByName), varargs...) + return &MockGpuClusterServiceGetByNameCall{Call: call} +} + +// MockGpuClusterServiceGetByNameCall wrap *gomock.Call +type MockGpuClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetByNameCall) Return(arg0 *v1alpha10.GpuCluster, arg1 error) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.GpuCluster, error)) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.GpuCluster, error)) *MockGpuClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockGpuClusterService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockGpuClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockGpuClusterService)(nil).GetOperation), varargs...) + return &MockGpuClusterServiceGetOperationCall{Call: call} +} + +// MockGpuClusterServiceGetOperationCall wrap *gomock.Call +type MockGpuClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockGpuClusterService) List(arg0 context.Context, arg1 *v1alpha10.ListGpuClustersRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListGpuClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListGpuClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockGpuClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockGpuClusterService)(nil).List), varargs...) + return &MockGpuClusterServiceListCall{Call: call} +} + +// MockGpuClusterServiceListCall wrap *gomock.Call +type MockGpuClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListCall) Return(arg0 *v1alpha10.ListGpuClustersResponse, arg1 error) *MockGpuClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListCall) Do(f func(context.Context, *v1alpha10.ListGpuClustersRequest, ...grpc.CallOption) (*v1alpha10.ListGpuClustersResponse, error)) *MockGpuClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListGpuClustersRequest, ...grpc.CallOption) (*v1alpha10.ListGpuClustersResponse, error)) *MockGpuClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockGpuClusterService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockGpuClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockGpuClusterService)(nil).ListOperations), varargs...) + return &MockGpuClusterServiceListOperationsCall{Call: call} +} + +// MockGpuClusterServiceListOperationsCall wrap *gomock.Call +type MockGpuClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockGpuClusterService) ListOperationsByParent(arg0 context.Context, arg1 *v1alpha1.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockGpuClusterServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockGpuClusterService)(nil).ListOperationsByParent), varargs...) + return &MockGpuClusterServiceListOperationsByParentCall{Call: call} +} + +// MockGpuClusterServiceListOperationsByParentCall wrap *gomock.Call +type MockGpuClusterServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceListOperationsByParentCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceListOperationsByParentCall) Do(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockGpuClusterServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockGpuClusterService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateGpuClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockGpuClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockGpuClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockGpuClusterService)(nil).Update), varargs...) + return &MockGpuClusterServiceUpdateCall{Call: call} +} + +// MockGpuClusterServiceUpdateCall wrap *gomock.Call +type MockGpuClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGpuClusterServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGpuClusterServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGpuClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockGpuClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1alpha1/image_service.mock.go b/mocks/nebius/compute/v1alpha1/image_service.mock.go new file mode 100644 index 0000000..06685eb --- /dev/null +++ b/mocks/nebius/compute/v1alpha1/image_service.mock.go @@ -0,0 +1,308 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1alpha1/image_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1alpha1/image_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockImageService is a mock of ImageService interface. +type MockImageService struct { + ctrl *gomock.Controller + recorder *MockImageServiceMockRecorder +} + +// MockImageServiceMockRecorder is the mock recorder for MockImageService. +type MockImageServiceMockRecorder struct { + mock *MockImageService +} + +// NewMockImageService creates a new mock instance. +func NewMockImageService(ctrl *gomock.Controller) *MockImageService { + mock := &MockImageService{ctrl: ctrl} + mock.recorder = &MockImageServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockImageService) Filter(arg0 context.Context, arg1 *v1alpha10.ListImagesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Image, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Image, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockImageServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockImageServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockImageService)(nil).Filter), varargs...) + return &MockImageServiceFilterCall{Call: call} +} + +// MockImageServiceFilterCall wrap *gomock.Call +type MockImageServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Image, error]) *MockImageServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockImageService) Get(arg0 context.Context, arg1 *v1alpha10.GetImageRequest, arg2 ...grpc.CallOption) (*v1alpha10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockImageServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockImageServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockImageService)(nil).Get), varargs...) + return &MockImageServiceGetCall{Call: call} +} + +// MockImageServiceGetCall wrap *gomock.Call +type MockImageServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetCall) Return(arg0 *v1alpha10.Image, arg1 error) *MockImageServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetCall) Do(f func(context.Context, *v1alpha10.GetImageRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetImageRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockImageService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockImageServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockImageServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockImageService)(nil).GetByName), varargs...) + return &MockImageServiceGetByNameCall{Call: call} +} + +// MockImageServiceGetByNameCall wrap *gomock.Call +type MockImageServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetByNameCall) Return(arg0 *v1alpha10.Image, arg1 error) *MockImageServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetLatestByFamily mocks base method. +func (m *MockImageService) GetLatestByFamily(arg0 context.Context, arg1 *v1alpha10.GetImageLatestByFamilyRequest, arg2 ...grpc.CallOption) (*v1alpha10.Image, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetLatestByFamily", varargs...) + ret0, _ := ret[0].(*v1alpha10.Image) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetLatestByFamily indicates an expected call of GetLatestByFamily. +func (mr *MockImageServiceMockRecorder) GetLatestByFamily(arg0, arg1 any, arg2 ...any) *MockImageServiceGetLatestByFamilyCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestByFamily", reflect.TypeOf((*MockImageService)(nil).GetLatestByFamily), varargs...) + return &MockImageServiceGetLatestByFamilyCall{Call: call} +} + +// MockImageServiceGetLatestByFamilyCall wrap *gomock.Call +type MockImageServiceGetLatestByFamilyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceGetLatestByFamilyCall) Return(arg0 *v1alpha10.Image, arg1 error) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceGetLatestByFamilyCall) Do(f func(context.Context, *v1alpha10.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceGetLatestByFamilyCall) DoAndReturn(f func(context.Context, *v1alpha10.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v1alpha10.Image, error)) *MockImageServiceGetLatestByFamilyCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockImageService) List(arg0 context.Context, arg1 *v1alpha10.ListImagesRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListImagesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListImagesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockImageServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockImageServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockImageService)(nil).List), varargs...) + return &MockImageServiceListCall{Call: call} +} + +// MockImageServiceListCall wrap *gomock.Call +type MockImageServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceListCall) Return(arg0 *v1alpha10.ListImagesResponse, arg1 error) *MockImageServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceListCall) Do(f func(context.Context, *v1alpha10.ListImagesRequest, ...grpc.CallOption) (*v1alpha10.ListImagesResponse, error)) *MockImageServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListImagesRequest, ...grpc.CallOption) (*v1alpha10.ListImagesResponse, error)) *MockImageServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockImageService) ListOperationsByParent(arg0 context.Context, arg1 *v1alpha1.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockImageServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockImageServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockImageService)(nil).ListOperationsByParent), varargs...) + return &MockImageServiceListOperationsByParentCall{Call: call} +} + +// MockImageServiceListOperationsByParentCall wrap *gomock.Call +type MockImageServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockImageServiceListOperationsByParentCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockImageServiceListOperationsByParentCall) Do(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockImageServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockImageServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/compute/v1alpha1/instance_service.mock.go b/mocks/nebius/compute/v1alpha1/instance_service.mock.go new file mode 100644 index 0000000..167c620 --- /dev/null +++ b/mocks/nebius/compute/v1alpha1/instance_service.mock.go @@ -0,0 +1,573 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/compute/v1alpha1/instance_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/compute/v1alpha1/instance_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockInstanceService is a mock of InstanceService interface. +type MockInstanceService struct { + ctrl *gomock.Controller + recorder *MockInstanceServiceMockRecorder +} + +// MockInstanceServiceMockRecorder is the mock recorder for MockInstanceService. +type MockInstanceServiceMockRecorder struct { + mock *MockInstanceService +} + +// NewMockInstanceService creates a new mock instance. +func NewMockInstanceService(ctrl *gomock.Controller) *MockInstanceService { + mock := &MockInstanceService{ctrl: ctrl} + mock.recorder = &MockInstanceServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInstanceService) EXPECT() *MockInstanceServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInstanceService) Create(arg0 context.Context, arg1 *v1alpha10.CreateInstanceRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInstanceServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockInstanceServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInstanceService)(nil).Create), varargs...) + return &MockInstanceServiceCreateCall{Call: call} +} + +// MockInstanceServiceCreateCall wrap *gomock.Call +type MockInstanceServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockInstanceService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteInstanceRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInstanceServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockInstanceServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInstanceService)(nil).Delete), varargs...) + return &MockInstanceServiceDeleteCall{Call: call} +} + +// MockInstanceServiceDeleteCall wrap *gomock.Call +type MockInstanceServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockInstanceService) Filter(arg0 context.Context, arg1 *v1alpha10.ListInstancesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Instance, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Instance, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockInstanceServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockInstanceServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockInstanceService)(nil).Filter), varargs...) + return &MockInstanceServiceFilterCall{Call: call} +} + +// MockInstanceServiceFilterCall wrap *gomock.Call +type MockInstanceServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Instance, error]) *MockInstanceServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockInstanceService) Get(arg0 context.Context, arg1 *v1alpha10.GetInstanceRequest, arg2 ...grpc.CallOption) (*v1alpha10.Instance, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Instance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInstanceServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInstanceService)(nil).Get), varargs...) + return &MockInstanceServiceGetCall{Call: call} +} + +// MockInstanceServiceGetCall wrap *gomock.Call +type MockInstanceServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetCall) Return(arg0 *v1alpha10.Instance, arg1 error) *MockInstanceServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetCall) Do(f func(context.Context, *v1alpha10.GetInstanceRequest, ...grpc.CallOption) (*v1alpha10.Instance, error)) *MockInstanceServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetInstanceRequest, ...grpc.CallOption) (*v1alpha10.Instance, error)) *MockInstanceServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockInstanceService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Instance, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Instance) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockInstanceServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockInstanceService)(nil).GetByName), varargs...) + return &MockInstanceServiceGetByNameCall{Call: call} +} + +// MockInstanceServiceGetByNameCall wrap *gomock.Call +type MockInstanceServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetByNameCall) Return(arg0 *v1alpha10.Instance, arg1 error) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Instance, error)) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Instance, error)) *MockInstanceServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockInstanceService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockInstanceServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockInstanceServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockInstanceService)(nil).GetOperation), varargs...) + return &MockInstanceServiceGetOperationCall{Call: call} +} + +// MockInstanceServiceGetOperationCall wrap *gomock.Call +type MockInstanceServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockInstanceService) List(arg0 context.Context, arg1 *v1alpha10.ListInstancesRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListInstancesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListInstancesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInstanceServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInstanceService)(nil).List), varargs...) + return &MockInstanceServiceListCall{Call: call} +} + +// MockInstanceServiceListCall wrap *gomock.Call +type MockInstanceServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListCall) Return(arg0 *v1alpha10.ListInstancesResponse, arg1 error) *MockInstanceServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListCall) Do(f func(context.Context, *v1alpha10.ListInstancesRequest, ...grpc.CallOption) (*v1alpha10.ListInstancesResponse, error)) *MockInstanceServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListInstancesRequest, ...grpc.CallOption) (*v1alpha10.ListInstancesResponse, error)) *MockInstanceServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockInstanceService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockInstanceServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockInstanceService)(nil).ListOperations), varargs...) + return &MockInstanceServiceListOperationsCall{Call: call} +} + +// MockInstanceServiceListOperationsCall wrap *gomock.Call +type MockInstanceServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperationsByParent mocks base method. +func (m *MockInstanceService) ListOperationsByParent(arg0 context.Context, arg1 *v1alpha1.ListOperationsByParentRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperationsByParent", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperationsByParent indicates an expected call of ListOperationsByParent. +func (mr *MockInstanceServiceMockRecorder) ListOperationsByParent(arg0, arg1 any, arg2 ...any) *MockInstanceServiceListOperationsByParentCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperationsByParent", reflect.TypeOf((*MockInstanceService)(nil).ListOperationsByParent), varargs...) + return &MockInstanceServiceListOperationsByParentCall{Call: call} +} + +// MockInstanceServiceListOperationsByParentCall wrap *gomock.Call +type MockInstanceServiceListOperationsByParentCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceListOperationsByParentCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceListOperationsByParentCall) Do(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceListOperationsByParentCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockInstanceServiceListOperationsByParentCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Start mocks base method. +func (m *MockInstanceService) Start(arg0 context.Context, arg1 *v1alpha10.StartInstanceRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Start", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Start indicates an expected call of Start. +func (mr *MockInstanceServiceMockRecorder) Start(arg0, arg1 any, arg2 ...any) *MockInstanceServiceStartCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockInstanceService)(nil).Start), varargs...) + return &MockInstanceServiceStartCall{Call: call} +} + +// MockInstanceServiceStartCall wrap *gomock.Call +type MockInstanceServiceStartCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceStartCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceStartCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceStartCall) Do(f func(context.Context, *v1alpha10.StartInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceStartCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceStartCall) DoAndReturn(f func(context.Context, *v1alpha10.StartInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceStartCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Stop mocks base method. +func (m *MockInstanceService) Stop(arg0 context.Context, arg1 *v1alpha10.StopInstanceRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Stop", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Stop indicates an expected call of Stop. +func (mr *MockInstanceServiceMockRecorder) Stop(arg0, arg1 any, arg2 ...any) *MockInstanceServiceStopCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockInstanceService)(nil).Stop), varargs...) + return &MockInstanceServiceStopCall{Call: call} +} + +// MockInstanceServiceStopCall wrap *gomock.Call +type MockInstanceServiceStopCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceStopCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceStopCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceStopCall) Do(f func(context.Context, *v1alpha10.StopInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceStopCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceStopCall) DoAndReturn(f func(context.Context, *v1alpha10.StopInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceStopCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockInstanceService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateInstanceRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInstanceServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockInstanceServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInstanceService)(nil).Update), varargs...) + return &MockInstanceServiceUpdateCall{Call: call} +} + +// MockInstanceServiceUpdateCall wrap *gomock.Call +type MockInstanceServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInstanceServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockInstanceServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInstanceServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInstanceServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockInstanceServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/access_key_service.mock.go b/mocks/nebius/iam/v1/access_key_service.mock.go new file mode 100644 index 0000000..cabfd81 --- /dev/null +++ b/mocks/nebius/iam/v1/access_key_service.mock.go @@ -0,0 +1,616 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/access_key_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/access_key_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockAccessKeyService is a mock of AccessKeyService interface. +type MockAccessKeyService struct { + ctrl *gomock.Controller + recorder *MockAccessKeyServiceMockRecorder +} + +// MockAccessKeyServiceMockRecorder is the mock recorder for MockAccessKeyService. +type MockAccessKeyServiceMockRecorder struct { + mock *MockAccessKeyService +} + +// NewMockAccessKeyService creates a new mock instance. +func NewMockAccessKeyService(ctrl *gomock.Controller) *MockAccessKeyService { + mock := &MockAccessKeyService{ctrl: ctrl} + mock.recorder = &MockAccessKeyServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccessKeyService) EXPECT() *MockAccessKeyServiceMockRecorder { + return m.recorder +} + +// Activate mocks base method. +func (m *MockAccessKeyService) Activate(arg0 context.Context, arg1 *v10.ActivateAccessKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Activate", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Activate indicates an expected call of Activate. +func (mr *MockAccessKeyServiceMockRecorder) Activate(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceActivateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Activate", reflect.TypeOf((*MockAccessKeyService)(nil).Activate), varargs...) + return &MockAccessKeyServiceActivateCall{Call: call} +} + +// MockAccessKeyServiceActivateCall wrap *gomock.Call +type MockAccessKeyServiceActivateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceActivateCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceActivateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceActivateCall) Do(f func(context.Context, *v10.ActivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceActivateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceActivateCall) DoAndReturn(f func(context.Context, *v10.ActivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceActivateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Create mocks base method. +func (m *MockAccessKeyService) Create(arg0 context.Context, arg1 *v10.CreateAccessKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockAccessKeyServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAccessKeyService)(nil).Create), varargs...) + return &MockAccessKeyServiceCreateCall{Call: call} +} + +// MockAccessKeyServiceCreateCall wrap *gomock.Call +type MockAccessKeyServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceCreateCall) Do(f func(context.Context, *v10.CreateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Deactivate mocks base method. +func (m *MockAccessKeyService) Deactivate(arg0 context.Context, arg1 *v10.DeactivateAccessKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Deactivate", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Deactivate indicates an expected call of Deactivate. +func (mr *MockAccessKeyServiceMockRecorder) Deactivate(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceDeactivateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deactivate", reflect.TypeOf((*MockAccessKeyService)(nil).Deactivate), varargs...) + return &MockAccessKeyServiceDeactivateCall{Call: call} +} + +// MockAccessKeyServiceDeactivateCall wrap *gomock.Call +type MockAccessKeyServiceDeactivateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceDeactivateCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceDeactivateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceDeactivateCall) Do(f func(context.Context, *v10.DeactivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceDeactivateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceDeactivateCall) DoAndReturn(f func(context.Context, *v10.DeactivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceDeactivateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockAccessKeyService) Delete(arg0 context.Context, arg1 *v10.DeleteAccessKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockAccessKeyServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockAccessKeyService)(nil).Delete), varargs...) + return &MockAccessKeyServiceDeleteCall{Call: call} +} + +// MockAccessKeyServiceDeleteCall wrap *gomock.Call +type MockAccessKeyServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceDeleteCall) Do(f func(context.Context, *v10.DeleteAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockAccessKeyService) Filter(arg0 context.Context, arg1 *v10.ListAccessKeysRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.AccessKey, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.AccessKey, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockAccessKeyServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockAccessKeyService)(nil).Filter), varargs...) + return &MockAccessKeyServiceFilterCall{Call: call} +} + +// MockAccessKeyServiceFilterCall wrap *gomock.Call +type MockAccessKeyServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceFilterCall) Return(arg0 iter.Seq2[*v10.AccessKey, error]) *MockAccessKeyServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceFilterCall) Do(f func(context.Context, *v10.ListAccessKeysRequest, ...grpc.CallOption) iter.Seq2[*v10.AccessKey, error]) *MockAccessKeyServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListAccessKeysRequest, ...grpc.CallOption) iter.Seq2[*v10.AccessKey, error]) *MockAccessKeyServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByAwsId mocks base method. +func (m *MockAccessKeyService) GetByAwsId(arg0 context.Context, arg1 *v10.GetAccessKeyByAwsIdRequest, arg2 ...grpc.CallOption) (*v10.AccessKey, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByAwsId", varargs...) + ret0, _ := ret[0].(*v10.AccessKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByAwsId indicates an expected call of GetByAwsId. +func (mr *MockAccessKeyServiceMockRecorder) GetByAwsId(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceGetByAwsIdCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByAwsId", reflect.TypeOf((*MockAccessKeyService)(nil).GetByAwsId), varargs...) + return &MockAccessKeyServiceGetByAwsIdCall{Call: call} +} + +// MockAccessKeyServiceGetByAwsIdCall wrap *gomock.Call +type MockAccessKeyServiceGetByAwsIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceGetByAwsIdCall) Return(arg0 *v10.AccessKey, arg1 error) *MockAccessKeyServiceGetByAwsIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceGetByAwsIdCall) Do(f func(context.Context, *v10.GetAccessKeyByAwsIdRequest, ...grpc.CallOption) (*v10.AccessKey, error)) *MockAccessKeyServiceGetByAwsIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceGetByAwsIdCall) DoAndReturn(f func(context.Context, *v10.GetAccessKeyByAwsIdRequest, ...grpc.CallOption) (*v10.AccessKey, error)) *MockAccessKeyServiceGetByAwsIdCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetById mocks base method. +func (m *MockAccessKeyService) GetById(arg0 context.Context, arg1 *v10.GetAccessKeyByIdRequest, arg2 ...grpc.CallOption) (*v10.AccessKey, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetById", varargs...) + ret0, _ := ret[0].(*v10.AccessKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetById indicates an expected call of GetById. +func (mr *MockAccessKeyServiceMockRecorder) GetById(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceGetByIdCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetById", reflect.TypeOf((*MockAccessKeyService)(nil).GetById), varargs...) + return &MockAccessKeyServiceGetByIdCall{Call: call} +} + +// MockAccessKeyServiceGetByIdCall wrap *gomock.Call +type MockAccessKeyServiceGetByIdCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceGetByIdCall) Return(arg0 *v10.AccessKey, arg1 error) *MockAccessKeyServiceGetByIdCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceGetByIdCall) Do(f func(context.Context, *v10.GetAccessKeyByIdRequest, ...grpc.CallOption) (*v10.AccessKey, error)) *MockAccessKeyServiceGetByIdCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceGetByIdCall) DoAndReturn(f func(context.Context, *v10.GetAccessKeyByIdRequest, ...grpc.CallOption) (*v10.AccessKey, error)) *MockAccessKeyServiceGetByIdCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockAccessKeyService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockAccessKeyServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAccessKeyService)(nil).GetOperation), varargs...) + return &MockAccessKeyServiceGetOperationCall{Call: call} +} + +// MockAccessKeyServiceGetOperationCall wrap *gomock.Call +type MockAccessKeyServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetSecretOnce mocks base method. +func (m *MockAccessKeyService) GetSecretOnce(arg0 context.Context, arg1 *v10.GetAccessKeySecretOnceRequest, arg2 ...grpc.CallOption) (*v10.GetAccessKeySecretOnceResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetSecretOnce", varargs...) + ret0, _ := ret[0].(*v10.GetAccessKeySecretOnceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSecretOnce indicates an expected call of GetSecretOnce. +func (mr *MockAccessKeyServiceMockRecorder) GetSecretOnce(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceGetSecretOnceCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretOnce", reflect.TypeOf((*MockAccessKeyService)(nil).GetSecretOnce), varargs...) + return &MockAccessKeyServiceGetSecretOnceCall{Call: call} +} + +// MockAccessKeyServiceGetSecretOnceCall wrap *gomock.Call +type MockAccessKeyServiceGetSecretOnceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceGetSecretOnceCall) Return(arg0 *v10.GetAccessKeySecretOnceResponse, arg1 error) *MockAccessKeyServiceGetSecretOnceCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceGetSecretOnceCall) Do(f func(context.Context, *v10.GetAccessKeySecretOnceRequest, ...grpc.CallOption) (*v10.GetAccessKeySecretOnceResponse, error)) *MockAccessKeyServiceGetSecretOnceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceGetSecretOnceCall) DoAndReturn(f func(context.Context, *v10.GetAccessKeySecretOnceRequest, ...grpc.CallOption) (*v10.GetAccessKeySecretOnceResponse, error)) *MockAccessKeyServiceGetSecretOnceCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockAccessKeyService) List(arg0 context.Context, arg1 *v10.ListAccessKeysRequest, arg2 ...grpc.CallOption) (*v10.ListAccessKeysResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListAccessKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockAccessKeyServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAccessKeyService)(nil).List), varargs...) + return &MockAccessKeyServiceListCall{Call: call} +} + +// MockAccessKeyServiceListCall wrap *gomock.Call +type MockAccessKeyServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceListCall) Return(arg0 *v10.ListAccessKeysResponse, arg1 error) *MockAccessKeyServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceListCall) Do(f func(context.Context, *v10.ListAccessKeysRequest, ...grpc.CallOption) (*v10.ListAccessKeysResponse, error)) *MockAccessKeyServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceListCall) DoAndReturn(f func(context.Context, *v10.ListAccessKeysRequest, ...grpc.CallOption) (*v10.ListAccessKeysResponse, error)) *MockAccessKeyServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListByAccount mocks base method. +func (m *MockAccessKeyService) ListByAccount(arg0 context.Context, arg1 *v10.ListAccessKeysByAccountRequest, arg2 ...grpc.CallOption) (*v10.ListAccessKeysResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByAccount", varargs...) + ret0, _ := ret[0].(*v10.ListAccessKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByAccount indicates an expected call of ListByAccount. +func (mr *MockAccessKeyServiceMockRecorder) ListByAccount(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceListByAccountCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByAccount", reflect.TypeOf((*MockAccessKeyService)(nil).ListByAccount), varargs...) + return &MockAccessKeyServiceListByAccountCall{Call: call} +} + +// MockAccessKeyServiceListByAccountCall wrap *gomock.Call +type MockAccessKeyServiceListByAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceListByAccountCall) Return(arg0 *v10.ListAccessKeysResponse, arg1 error) *MockAccessKeyServiceListByAccountCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceListByAccountCall) Do(f func(context.Context, *v10.ListAccessKeysByAccountRequest, ...grpc.CallOption) (*v10.ListAccessKeysResponse, error)) *MockAccessKeyServiceListByAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceListByAccountCall) DoAndReturn(f func(context.Context, *v10.ListAccessKeysByAccountRequest, ...grpc.CallOption) (*v10.ListAccessKeysResponse, error)) *MockAccessKeyServiceListByAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockAccessKeyService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockAccessKeyServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockAccessKeyService)(nil).ListOperations), varargs...) + return &MockAccessKeyServiceListOperationsCall{Call: call} +} + +// MockAccessKeyServiceListOperationsCall wrap *gomock.Call +type MockAccessKeyServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockAccessKeyServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAccessKeyServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAccessKeyServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockAccessKeyService) Update(arg0 context.Context, arg1 *v10.UpdateAccessKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockAccessKeyServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockAccessKeyServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAccessKeyService)(nil).Update), varargs...) + return &MockAccessKeyServiceUpdateCall{Call: call} +} + +// MockAccessKeyServiceUpdateCall wrap *gomock.Call +type MockAccessKeyServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAccessKeyServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockAccessKeyServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAccessKeyServiceUpdateCall) Do(f func(context.Context, *v10.UpdateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAccessKeyServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAccessKeyServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/auth_public_key_service.mock.go b/mocks/nebius/iam/v1/auth_public_key_service.mock.go new file mode 100644 index 0000000..6e3d9f8 --- /dev/null +++ b/mocks/nebius/iam/v1/auth_public_key_service.mock.go @@ -0,0 +1,528 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/auth_public_key_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/auth_public_key_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockAuthPublicKeyService is a mock of AuthPublicKeyService interface. +type MockAuthPublicKeyService struct { + ctrl *gomock.Controller + recorder *MockAuthPublicKeyServiceMockRecorder +} + +// MockAuthPublicKeyServiceMockRecorder is the mock recorder for MockAuthPublicKeyService. +type MockAuthPublicKeyServiceMockRecorder struct { + mock *MockAuthPublicKeyService +} + +// NewMockAuthPublicKeyService creates a new mock instance. +func NewMockAuthPublicKeyService(ctrl *gomock.Controller) *MockAuthPublicKeyService { + mock := &MockAuthPublicKeyService{ctrl: ctrl} + mock.recorder = &MockAuthPublicKeyServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAuthPublicKeyService) EXPECT() *MockAuthPublicKeyServiceMockRecorder { + return m.recorder +} + +// Activate mocks base method. +func (m *MockAuthPublicKeyService) Activate(arg0 context.Context, arg1 *v10.ActivateAuthPublicKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Activate", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Activate indicates an expected call of Activate. +func (mr *MockAuthPublicKeyServiceMockRecorder) Activate(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceActivateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Activate", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Activate), varargs...) + return &MockAuthPublicKeyServiceActivateCall{Call: call} +} + +// MockAuthPublicKeyServiceActivateCall wrap *gomock.Call +type MockAuthPublicKeyServiceActivateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceActivateCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceActivateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceActivateCall) Do(f func(context.Context, *v10.ActivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceActivateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceActivateCall) DoAndReturn(f func(context.Context, *v10.ActivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceActivateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Create mocks base method. +func (m *MockAuthPublicKeyService) Create(arg0 context.Context, arg1 *v10.CreateAuthPublicKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockAuthPublicKeyServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Create), varargs...) + return &MockAuthPublicKeyServiceCreateCall{Call: call} +} + +// MockAuthPublicKeyServiceCreateCall wrap *gomock.Call +type MockAuthPublicKeyServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceCreateCall) Do(f func(context.Context, *v10.CreateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Deactivate mocks base method. +func (m *MockAuthPublicKeyService) Deactivate(arg0 context.Context, arg1 *v10.DeactivateAuthPublicKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Deactivate", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Deactivate indicates an expected call of Deactivate. +func (mr *MockAuthPublicKeyServiceMockRecorder) Deactivate(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceDeactivateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deactivate", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Deactivate), varargs...) + return &MockAuthPublicKeyServiceDeactivateCall{Call: call} +} + +// MockAuthPublicKeyServiceDeactivateCall wrap *gomock.Call +type MockAuthPublicKeyServiceDeactivateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceDeactivateCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceDeactivateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceDeactivateCall) Do(f func(context.Context, *v10.DeactivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceDeactivateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceDeactivateCall) DoAndReturn(f func(context.Context, *v10.DeactivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceDeactivateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockAuthPublicKeyService) Delete(arg0 context.Context, arg1 *v10.DeleteAuthPublicKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockAuthPublicKeyServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Delete), varargs...) + return &MockAuthPublicKeyServiceDeleteCall{Call: call} +} + +// MockAuthPublicKeyServiceDeleteCall wrap *gomock.Call +type MockAuthPublicKeyServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceDeleteCall) Do(f func(context.Context, *v10.DeleteAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockAuthPublicKeyService) Filter(arg0 context.Context, arg1 *v10.ListAuthPublicKeyRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.AuthPublicKey, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.AuthPublicKey, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockAuthPublicKeyServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Filter), varargs...) + return &MockAuthPublicKeyServiceFilterCall{Call: call} +} + +// MockAuthPublicKeyServiceFilterCall wrap *gomock.Call +type MockAuthPublicKeyServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceFilterCall) Return(arg0 iter.Seq2[*v10.AuthPublicKey, error]) *MockAuthPublicKeyServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceFilterCall) Do(f func(context.Context, *v10.ListAuthPublicKeyRequest, ...grpc.CallOption) iter.Seq2[*v10.AuthPublicKey, error]) *MockAuthPublicKeyServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListAuthPublicKeyRequest, ...grpc.CallOption) iter.Seq2[*v10.AuthPublicKey, error]) *MockAuthPublicKeyServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockAuthPublicKeyService) Get(arg0 context.Context, arg1 *v10.GetAuthPublicKeyRequest, arg2 ...grpc.CallOption) (*v10.AuthPublicKey, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.AuthPublicKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockAuthPublicKeyServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Get), varargs...) + return &MockAuthPublicKeyServiceGetCall{Call: call} +} + +// MockAuthPublicKeyServiceGetCall wrap *gomock.Call +type MockAuthPublicKeyServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceGetCall) Return(arg0 *v10.AuthPublicKey, arg1 error) *MockAuthPublicKeyServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceGetCall) Do(f func(context.Context, *v10.GetAuthPublicKeyRequest, ...grpc.CallOption) (*v10.AuthPublicKey, error)) *MockAuthPublicKeyServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetAuthPublicKeyRequest, ...grpc.CallOption) (*v10.AuthPublicKey, error)) *MockAuthPublicKeyServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockAuthPublicKeyService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockAuthPublicKeyServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAuthPublicKeyService)(nil).GetOperation), varargs...) + return &MockAuthPublicKeyServiceGetOperationCall{Call: call} +} + +// MockAuthPublicKeyServiceGetOperationCall wrap *gomock.Call +type MockAuthPublicKeyServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockAuthPublicKeyService) List(arg0 context.Context, arg1 *v10.ListAuthPublicKeyRequest, arg2 ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListAuthPublicKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockAuthPublicKeyServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAuthPublicKeyService)(nil).List), varargs...) + return &MockAuthPublicKeyServiceListCall{Call: call} +} + +// MockAuthPublicKeyServiceListCall wrap *gomock.Call +type MockAuthPublicKeyServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceListCall) Return(arg0 *v10.ListAuthPublicKeyResponse, arg1 error) *MockAuthPublicKeyServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceListCall) Do(f func(context.Context, *v10.ListAuthPublicKeyRequest, ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error)) *MockAuthPublicKeyServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceListCall) DoAndReturn(f func(context.Context, *v10.ListAuthPublicKeyRequest, ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error)) *MockAuthPublicKeyServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListByAccount mocks base method. +func (m *MockAuthPublicKeyService) ListByAccount(arg0 context.Context, arg1 *v10.ListAuthPublicKeyByAccountRequest, arg2 ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByAccount", varargs...) + ret0, _ := ret[0].(*v10.ListAuthPublicKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByAccount indicates an expected call of ListByAccount. +func (mr *MockAuthPublicKeyServiceMockRecorder) ListByAccount(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceListByAccountCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByAccount", reflect.TypeOf((*MockAuthPublicKeyService)(nil).ListByAccount), varargs...) + return &MockAuthPublicKeyServiceListByAccountCall{Call: call} +} + +// MockAuthPublicKeyServiceListByAccountCall wrap *gomock.Call +type MockAuthPublicKeyServiceListByAccountCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceListByAccountCall) Return(arg0 *v10.ListAuthPublicKeyResponse, arg1 error) *MockAuthPublicKeyServiceListByAccountCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceListByAccountCall) Do(f func(context.Context, *v10.ListAuthPublicKeyByAccountRequest, ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error)) *MockAuthPublicKeyServiceListByAccountCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceListByAccountCall) DoAndReturn(f func(context.Context, *v10.ListAuthPublicKeyByAccountRequest, ...grpc.CallOption) (*v10.ListAuthPublicKeyResponse, error)) *MockAuthPublicKeyServiceListByAccountCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockAuthPublicKeyService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockAuthPublicKeyServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockAuthPublicKeyService)(nil).ListOperations), varargs...) + return &MockAuthPublicKeyServiceListOperationsCall{Call: call} +} + +// MockAuthPublicKeyServiceListOperationsCall wrap *gomock.Call +type MockAuthPublicKeyServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockAuthPublicKeyServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAuthPublicKeyServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAuthPublicKeyServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockAuthPublicKeyService) Update(arg0 context.Context, arg1 *v10.UpdateAuthPublicKeyRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockAuthPublicKeyServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockAuthPublicKeyServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAuthPublicKeyService)(nil).Update), varargs...) + return &MockAuthPublicKeyServiceUpdateCall{Call: call} +} + +// MockAuthPublicKeyServiceUpdateCall wrap *gomock.Call +type MockAuthPublicKeyServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAuthPublicKeyServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockAuthPublicKeyServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAuthPublicKeyServiceUpdateCall) Do(f func(context.Context, *v10.UpdateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAuthPublicKeyServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAuthPublicKeyServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/federation_certificate_service.mock.go b/mocks/nebius/iam/v1/federation_certificate_service.mock.go new file mode 100644 index 0000000..813c7a4 --- /dev/null +++ b/mocks/nebius/iam/v1/federation_certificate_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/federation_certificate_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/federation_certificate_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockFederationCertificateService is a mock of FederationCertificateService interface. +type MockFederationCertificateService struct { + ctrl *gomock.Controller + recorder *MockFederationCertificateServiceMockRecorder +} + +// MockFederationCertificateServiceMockRecorder is the mock recorder for MockFederationCertificateService. +type MockFederationCertificateServiceMockRecorder struct { + mock *MockFederationCertificateService +} + +// NewMockFederationCertificateService creates a new mock instance. +func NewMockFederationCertificateService(ctrl *gomock.Controller) *MockFederationCertificateService { + mock := &MockFederationCertificateService{ctrl: ctrl} + mock.recorder = &MockFederationCertificateServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFederationCertificateService) EXPECT() *MockFederationCertificateServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockFederationCertificateService) Create(arg0 context.Context, arg1 *v10.CreateFederationCertificateRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockFederationCertificateServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFederationCertificateService)(nil).Create), varargs...) + return &MockFederationCertificateServiceCreateCall{Call: call} +} + +// MockFederationCertificateServiceCreateCall wrap *gomock.Call +type MockFederationCertificateServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockFederationCertificateServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceCreateCall) Do(f func(context.Context, *v10.CreateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockFederationCertificateService) Delete(arg0 context.Context, arg1 *v10.DeleteFederationCertificateRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockFederationCertificateServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFederationCertificateService)(nil).Delete), varargs...) + return &MockFederationCertificateServiceDeleteCall{Call: call} +} + +// MockFederationCertificateServiceDeleteCall wrap *gomock.Call +type MockFederationCertificateServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockFederationCertificateServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceDeleteCall) Do(f func(context.Context, *v10.DeleteFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockFederationCertificateService) Get(arg0 context.Context, arg1 *v10.GetFederationCertificateRequest, arg2 ...grpc.CallOption) (*v10.FederationCertificate, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.FederationCertificate) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockFederationCertificateServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFederationCertificateService)(nil).Get), varargs...) + return &MockFederationCertificateServiceGetCall{Call: call} +} + +// MockFederationCertificateServiceGetCall wrap *gomock.Call +type MockFederationCertificateServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceGetCall) Return(arg0 *v10.FederationCertificate, arg1 error) *MockFederationCertificateServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceGetCall) Do(f func(context.Context, *v10.GetFederationCertificateRequest, ...grpc.CallOption) (*v10.FederationCertificate, error)) *MockFederationCertificateServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetFederationCertificateRequest, ...grpc.CallOption) (*v10.FederationCertificate, error)) *MockFederationCertificateServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockFederationCertificateService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockFederationCertificateServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockFederationCertificateService)(nil).GetOperation), varargs...) + return &MockFederationCertificateServiceGetOperationCall{Call: call} +} + +// MockFederationCertificateServiceGetOperationCall wrap *gomock.Call +type MockFederationCertificateServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockFederationCertificateServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListByFederation mocks base method. +func (m *MockFederationCertificateService) ListByFederation(arg0 context.Context, arg1 *v10.ListFederationCertificateByFederationRequest, arg2 ...grpc.CallOption) (*v10.ListFederationCertificateResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByFederation", varargs...) + ret0, _ := ret[0].(*v10.ListFederationCertificateResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByFederation indicates an expected call of ListByFederation. +func (mr *MockFederationCertificateServiceMockRecorder) ListByFederation(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceListByFederationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByFederation", reflect.TypeOf((*MockFederationCertificateService)(nil).ListByFederation), varargs...) + return &MockFederationCertificateServiceListByFederationCall{Call: call} +} + +// MockFederationCertificateServiceListByFederationCall wrap *gomock.Call +type MockFederationCertificateServiceListByFederationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceListByFederationCall) Return(arg0 *v10.ListFederationCertificateResponse, arg1 error) *MockFederationCertificateServiceListByFederationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceListByFederationCall) Do(f func(context.Context, *v10.ListFederationCertificateByFederationRequest, ...grpc.CallOption) (*v10.ListFederationCertificateResponse, error)) *MockFederationCertificateServiceListByFederationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceListByFederationCall) DoAndReturn(f func(context.Context, *v10.ListFederationCertificateByFederationRequest, ...grpc.CallOption) (*v10.ListFederationCertificateResponse, error)) *MockFederationCertificateServiceListByFederationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockFederationCertificateService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockFederationCertificateServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockFederationCertificateService)(nil).ListOperations), varargs...) + return &MockFederationCertificateServiceListOperationsCall{Call: call} +} + +// MockFederationCertificateServiceListOperationsCall wrap *gomock.Call +type MockFederationCertificateServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockFederationCertificateServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFederationCertificateServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFederationCertificateServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockFederationCertificateService) Update(arg0 context.Context, arg1 *v10.UpdateFederationCertificateRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockFederationCertificateServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockFederationCertificateServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFederationCertificateService)(nil).Update), varargs...) + return &MockFederationCertificateServiceUpdateCall{Call: call} +} + +// MockFederationCertificateServiceUpdateCall wrap *gomock.Call +type MockFederationCertificateServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationCertificateServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockFederationCertificateServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationCertificateServiceUpdateCall) Do(f func(context.Context, *v10.UpdateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationCertificateServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationCertificateServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/federation_service.mock.go b/mocks/nebius/iam/v1/federation_service.mock.go new file mode 100644 index 0000000..10d6221 --- /dev/null +++ b/mocks/nebius/iam/v1/federation_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/federation_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/federation_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockFederationService is a mock of FederationService interface. +type MockFederationService struct { + ctrl *gomock.Controller + recorder *MockFederationServiceMockRecorder +} + +// MockFederationServiceMockRecorder is the mock recorder for MockFederationService. +type MockFederationServiceMockRecorder struct { + mock *MockFederationService +} + +// NewMockFederationService creates a new mock instance. +func NewMockFederationService(ctrl *gomock.Controller) *MockFederationService { + mock := &MockFederationService{ctrl: ctrl} + mock.recorder = &MockFederationServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFederationService) EXPECT() *MockFederationServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockFederationService) Create(arg0 context.Context, arg1 *v10.CreateFederationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockFederationServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockFederationServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockFederationService)(nil).Create), varargs...) + return &MockFederationServiceCreateCall{Call: call} +} + +// MockFederationServiceCreateCall wrap *gomock.Call +type MockFederationServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockFederationServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceCreateCall) Do(f func(context.Context, *v10.CreateFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockFederationService) Delete(arg0 context.Context, arg1 *v10.DeleteFederationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockFederationServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockFederationServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockFederationService)(nil).Delete), varargs...) + return &MockFederationServiceDeleteCall{Call: call} +} + +// MockFederationServiceDeleteCall wrap *gomock.Call +type MockFederationServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockFederationServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceDeleteCall) Do(f func(context.Context, *v10.DeleteFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockFederationService) Filter(arg0 context.Context, arg1 *v10.ListFederationsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Federation, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Federation, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockFederationServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockFederationServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockFederationService)(nil).Filter), varargs...) + return &MockFederationServiceFilterCall{Call: call} +} + +// MockFederationServiceFilterCall wrap *gomock.Call +type MockFederationServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceFilterCall) Return(arg0 iter.Seq2[*v10.Federation, error]) *MockFederationServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceFilterCall) Do(f func(context.Context, *v10.ListFederationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Federation, error]) *MockFederationServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListFederationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Federation, error]) *MockFederationServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockFederationService) Get(arg0 context.Context, arg1 *v10.GetFederationRequest, arg2 ...grpc.CallOption) (*v10.Federation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Federation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockFederationServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockFederationServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFederationService)(nil).Get), varargs...) + return &MockFederationServiceGetCall{Call: call} +} + +// MockFederationServiceGetCall wrap *gomock.Call +type MockFederationServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceGetCall) Return(arg0 *v10.Federation, arg1 error) *MockFederationServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceGetCall) Do(f func(context.Context, *v10.GetFederationRequest, ...grpc.CallOption) (*v10.Federation, error)) *MockFederationServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetFederationRequest, ...grpc.CallOption) (*v10.Federation, error)) *MockFederationServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockFederationService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Federation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Federation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockFederationServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockFederationServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockFederationService)(nil).GetByName), varargs...) + return &MockFederationServiceGetByNameCall{Call: call} +} + +// MockFederationServiceGetByNameCall wrap *gomock.Call +type MockFederationServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceGetByNameCall) Return(arg0 *v10.Federation, arg1 error) *MockFederationServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Federation, error)) *MockFederationServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Federation, error)) *MockFederationServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockFederationService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockFederationServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockFederationServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockFederationService)(nil).GetOperation), varargs...) + return &MockFederationServiceGetOperationCall{Call: call} +} + +// MockFederationServiceGetOperationCall wrap *gomock.Call +type MockFederationServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockFederationServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockFederationService) List(arg0 context.Context, arg1 *v10.ListFederationsRequest, arg2 ...grpc.CallOption) (*v10.ListFederationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListFederationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockFederationServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockFederationServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockFederationService)(nil).List), varargs...) + return &MockFederationServiceListCall{Call: call} +} + +// MockFederationServiceListCall wrap *gomock.Call +type MockFederationServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceListCall) Return(arg0 *v10.ListFederationsResponse, arg1 error) *MockFederationServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceListCall) Do(f func(context.Context, *v10.ListFederationsRequest, ...grpc.CallOption) (*v10.ListFederationsResponse, error)) *MockFederationServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceListCall) DoAndReturn(f func(context.Context, *v10.ListFederationsRequest, ...grpc.CallOption) (*v10.ListFederationsResponse, error)) *MockFederationServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockFederationService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockFederationServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockFederationServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockFederationService)(nil).ListOperations), varargs...) + return &MockFederationServiceListOperationsCall{Call: call} +} + +// MockFederationServiceListOperationsCall wrap *gomock.Call +type MockFederationServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockFederationServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFederationServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockFederationServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockFederationService) Update(arg0 context.Context, arg1 *v10.UpdateFederationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockFederationServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockFederationServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockFederationService)(nil).Update), varargs...) + return &MockFederationServiceUpdateCall{Call: call} +} + +// MockFederationServiceUpdateCall wrap *gomock.Call +type MockFederationServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockFederationServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockFederationServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockFederationServiceUpdateCall) Do(f func(context.Context, *v10.UpdateFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockFederationServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateFederationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockFederationServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/group_membership_service.mock.go b/mocks/nebius/iam/v1/group_membership_service.mock.go new file mode 100644 index 0000000..e231568 --- /dev/null +++ b/mocks/nebius/iam/v1/group_membership_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/group_membership_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/group_membership_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockGroupMembershipService is a mock of GroupMembershipService interface. +type MockGroupMembershipService struct { + ctrl *gomock.Controller + recorder *MockGroupMembershipServiceMockRecorder +} + +// MockGroupMembershipServiceMockRecorder is the mock recorder for MockGroupMembershipService. +type MockGroupMembershipServiceMockRecorder struct { + mock *MockGroupMembershipService +} + +// NewMockGroupMembershipService creates a new mock instance. +func NewMockGroupMembershipService(ctrl *gomock.Controller) *MockGroupMembershipService { + mock := &MockGroupMembershipService{ctrl: ctrl} + mock.recorder = &MockGroupMembershipServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGroupMembershipService) EXPECT() *MockGroupMembershipServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockGroupMembershipService) Create(arg0 context.Context, arg1 *v10.CreateGroupMembershipRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockGroupMembershipServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockGroupMembershipService)(nil).Create), varargs...) + return &MockGroupMembershipServiceCreateCall{Call: call} +} + +// MockGroupMembershipServiceCreateCall wrap *gomock.Call +type MockGroupMembershipServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockGroupMembershipServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceCreateCall) Do(f func(context.Context, *v10.CreateGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockGroupMembershipService) Delete(arg0 context.Context, arg1 *v10.DeleteGroupMembershipRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockGroupMembershipServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockGroupMembershipService)(nil).Delete), varargs...) + return &MockGroupMembershipServiceDeleteCall{Call: call} +} + +// MockGroupMembershipServiceDeleteCall wrap *gomock.Call +type MockGroupMembershipServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockGroupMembershipServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceDeleteCall) Do(f func(context.Context, *v10.DeleteGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockGroupMembershipService) Get(arg0 context.Context, arg1 *v10.GetGroupMembershipRequest, arg2 ...grpc.CallOption) (*v10.GroupMembership, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.GroupMembership) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockGroupMembershipServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGroupMembershipService)(nil).Get), varargs...) + return &MockGroupMembershipServiceGetCall{Call: call} +} + +// MockGroupMembershipServiceGetCall wrap *gomock.Call +type MockGroupMembershipServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceGetCall) Return(arg0 *v10.GroupMembership, arg1 error) *MockGroupMembershipServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceGetCall) Do(f func(context.Context, *v10.GetGroupMembershipRequest, ...grpc.CallOption) (*v10.GroupMembership, error)) *MockGroupMembershipServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetGroupMembershipRequest, ...grpc.CallOption) (*v10.GroupMembership, error)) *MockGroupMembershipServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockGroupMembershipService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockGroupMembershipServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockGroupMembershipService)(nil).GetOperation), varargs...) + return &MockGroupMembershipServiceGetOperationCall{Call: call} +} + +// MockGroupMembershipServiceGetOperationCall wrap *gomock.Call +type MockGroupMembershipServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockGroupMembershipServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockGroupMembershipServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListMemberOf mocks base method. +func (m *MockGroupMembershipService) ListMemberOf(arg0 context.Context, arg1 *v10.ListMemberOfRequest, arg2 ...grpc.CallOption) (*v10.ListMemberOfResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListMemberOf", varargs...) + ret0, _ := ret[0].(*v10.ListMemberOfResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListMemberOf indicates an expected call of ListMemberOf. +func (mr *MockGroupMembershipServiceMockRecorder) ListMemberOf(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceListMemberOfCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMemberOf", reflect.TypeOf((*MockGroupMembershipService)(nil).ListMemberOf), varargs...) + return &MockGroupMembershipServiceListMemberOfCall{Call: call} +} + +// MockGroupMembershipServiceListMemberOfCall wrap *gomock.Call +type MockGroupMembershipServiceListMemberOfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceListMemberOfCall) Return(arg0 *v10.ListMemberOfResponse, arg1 error) *MockGroupMembershipServiceListMemberOfCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceListMemberOfCall) Do(f func(context.Context, *v10.ListMemberOfRequest, ...grpc.CallOption) (*v10.ListMemberOfResponse, error)) *MockGroupMembershipServiceListMemberOfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceListMemberOfCall) DoAndReturn(f func(context.Context, *v10.ListMemberOfRequest, ...grpc.CallOption) (*v10.ListMemberOfResponse, error)) *MockGroupMembershipServiceListMemberOfCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListMembers mocks base method. +func (m *MockGroupMembershipService) ListMembers(arg0 context.Context, arg1 *v10.ListGroupMembershipsRequest, arg2 ...grpc.CallOption) (*v10.ListGroupMembershipsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListMembers", varargs...) + ret0, _ := ret[0].(*v10.ListGroupMembershipsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListMembers indicates an expected call of ListMembers. +func (mr *MockGroupMembershipServiceMockRecorder) ListMembers(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceListMembersCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMembers", reflect.TypeOf((*MockGroupMembershipService)(nil).ListMembers), varargs...) + return &MockGroupMembershipServiceListMembersCall{Call: call} +} + +// MockGroupMembershipServiceListMembersCall wrap *gomock.Call +type MockGroupMembershipServiceListMembersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceListMembersCall) Return(arg0 *v10.ListGroupMembershipsResponse, arg1 error) *MockGroupMembershipServiceListMembersCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceListMembersCall) Do(f func(context.Context, *v10.ListGroupMembershipsRequest, ...grpc.CallOption) (*v10.ListGroupMembershipsResponse, error)) *MockGroupMembershipServiceListMembersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceListMembersCall) DoAndReturn(f func(context.Context, *v10.ListGroupMembershipsRequest, ...grpc.CallOption) (*v10.ListGroupMembershipsResponse, error)) *MockGroupMembershipServiceListMembersCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockGroupMembershipService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockGroupMembershipServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockGroupMembershipServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockGroupMembershipService)(nil).ListOperations), varargs...) + return &MockGroupMembershipServiceListOperationsCall{Call: call} +} + +// MockGroupMembershipServiceListOperationsCall wrap *gomock.Call +type MockGroupMembershipServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupMembershipServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockGroupMembershipServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupMembershipServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGroupMembershipServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupMembershipServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockGroupMembershipServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/group_service.mock.go b/mocks/nebius/iam/v1/group_service.mock.go new file mode 100644 index 0000000..79f1612 --- /dev/null +++ b/mocks/nebius/iam/v1/group_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/group_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/group_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockGroupService is a mock of GroupService interface. +type MockGroupService struct { + ctrl *gomock.Controller + recorder *MockGroupServiceMockRecorder +} + +// MockGroupServiceMockRecorder is the mock recorder for MockGroupService. +type MockGroupServiceMockRecorder struct { + mock *MockGroupService +} + +// NewMockGroupService creates a new mock instance. +func NewMockGroupService(ctrl *gomock.Controller) *MockGroupService { + mock := &MockGroupService{ctrl: ctrl} + mock.recorder = &MockGroupServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockGroupService) EXPECT() *MockGroupServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockGroupService) Filter(arg0 context.Context, arg1 *v1.ListGroupsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.Group, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.Group, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockGroupServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockGroupServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockGroupService)(nil).Filter), varargs...) + return &MockGroupServiceFilterCall{Call: call} +} + +// MockGroupServiceFilterCall wrap *gomock.Call +type MockGroupServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupServiceFilterCall) Return(arg0 iter.Seq2[*v1.Group, error]) *MockGroupServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupServiceFilterCall) Do(f func(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1.Group, error]) *MockGroupServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1.Group, error]) *MockGroupServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockGroupService) Get(arg0 context.Context, arg1 *v1.GetGroupRequest, arg2 ...grpc.CallOption) (*v1.Group, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.Group) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockGroupServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockGroupServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockGroupService)(nil).Get), varargs...) + return &MockGroupServiceGetCall{Call: call} +} + +// MockGroupServiceGetCall wrap *gomock.Call +type MockGroupServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupServiceGetCall) Return(arg0 *v1.Group, arg1 error) *MockGroupServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupServiceGetCall) Do(f func(context.Context, *v1.GetGroupRequest, ...grpc.CallOption) (*v1.Group, error)) *MockGroupServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetGroupRequest, ...grpc.CallOption) (*v1.Group, error)) *MockGroupServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockGroupService) GetByName(arg0 context.Context, arg1 *v1.GetGroupByNameRequest, arg2 ...grpc.CallOption) (*v1.Group, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1.Group) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockGroupServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockGroupServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockGroupService)(nil).GetByName), varargs...) + return &MockGroupServiceGetByNameCall{Call: call} +} + +// MockGroupServiceGetByNameCall wrap *gomock.Call +type MockGroupServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupServiceGetByNameCall) Return(arg0 *v1.Group, arg1 error) *MockGroupServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupServiceGetByNameCall) Do(f func(context.Context, *v1.GetGroupByNameRequest, ...grpc.CallOption) (*v1.Group, error)) *MockGroupServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetGroupByNameRequest, ...grpc.CallOption) (*v1.Group, error)) *MockGroupServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockGroupService) List(arg0 context.Context, arg1 *v1.ListGroupsRequest, arg2 ...grpc.CallOption) (*v1.ListGroupsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListGroupsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockGroupServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockGroupServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockGroupService)(nil).List), varargs...) + return &MockGroupServiceListCall{Call: call} +} + +// MockGroupServiceListCall wrap *gomock.Call +type MockGroupServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockGroupServiceListCall) Return(arg0 *v1.ListGroupsResponse, arg1 error) *MockGroupServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockGroupServiceListCall) Do(f func(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) (*v1.ListGroupsResponse, error)) *MockGroupServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockGroupServiceListCall) DoAndReturn(f func(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) (*v1.ListGroupsResponse, error)) *MockGroupServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/identity_service.mock.go b/mocks/nebius/iam/v1/identity_service.mock.go new file mode 100644 index 0000000..b972bf7 --- /dev/null +++ b/mocks/nebius/iam/v1/identity_service.mock.go @@ -0,0 +1,86 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/identity_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/identity_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockIdentityService is a mock of IdentityService interface. +type MockIdentityService struct { + ctrl *gomock.Controller + recorder *MockIdentityServiceMockRecorder +} + +// MockIdentityServiceMockRecorder is the mock recorder for MockIdentityService. +type MockIdentityServiceMockRecorder struct { + mock *MockIdentityService +} + +// NewMockIdentityService creates a new mock instance. +func NewMockIdentityService(ctrl *gomock.Controller) *MockIdentityService { + mock := &MockIdentityService{ctrl: ctrl} + mock.recorder = &MockIdentityServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockIdentityService) EXPECT() *MockIdentityServiceMockRecorder { + return m.recorder +} + +// ExchangeToken mocks base method. +func (m *MockIdentityService) ExchangeToken(arg0 context.Context, arg1 *v1.ExchangeTokenRequest, arg2 ...grpc.CallOption) (*v1.CreateTokenResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ExchangeToken", varargs...) + ret0, _ := ret[0].(*v1.CreateTokenResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ExchangeToken indicates an expected call of ExchangeToken. +func (mr *MockIdentityServiceMockRecorder) ExchangeToken(arg0, arg1 any, arg2 ...any) *MockIdentityServiceExchangeTokenCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExchangeToken", reflect.TypeOf((*MockIdentityService)(nil).ExchangeToken), varargs...) + return &MockIdentityServiceExchangeTokenCall{Call: call} +} + +// MockIdentityServiceExchangeTokenCall wrap *gomock.Call +type MockIdentityServiceExchangeTokenCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockIdentityServiceExchangeTokenCall) Return(arg0 *v1.CreateTokenResponse, arg1 error) *MockIdentityServiceExchangeTokenCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockIdentityServiceExchangeTokenCall) Do(f func(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error)) *MockIdentityServiceExchangeTokenCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockIdentityServiceExchangeTokenCall) DoAndReturn(f func(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error)) *MockIdentityServiceExchangeTokenCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/invitation_service.mock.go b/mocks/nebius/iam/v1/invitation_service.mock.go new file mode 100644 index 0000000..bf67d4e --- /dev/null +++ b/mocks/nebius/iam/v1/invitation_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/invitation_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/invitation_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockInvitationService is a mock of InvitationService interface. +type MockInvitationService struct { + ctrl *gomock.Controller + recorder *MockInvitationServiceMockRecorder +} + +// MockInvitationServiceMockRecorder is the mock recorder for MockInvitationService. +type MockInvitationServiceMockRecorder struct { + mock *MockInvitationService +} + +// NewMockInvitationService creates a new mock instance. +func NewMockInvitationService(ctrl *gomock.Controller) *MockInvitationService { + mock := &MockInvitationService{ctrl: ctrl} + mock.recorder = &MockInvitationServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInvitationService) EXPECT() *MockInvitationServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockInvitationService) Create(arg0 context.Context, arg1 *v10.CreateInvitationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockInvitationServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockInvitationServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInvitationService)(nil).Create), varargs...) + return &MockInvitationServiceCreateCall{Call: call} +} + +// MockInvitationServiceCreateCall wrap *gomock.Call +type MockInvitationServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockInvitationServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceCreateCall) Do(f func(context.Context, *v10.CreateInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockInvitationService) Delete(arg0 context.Context, arg1 *v10.DeleteInvitationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInvitationServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockInvitationServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInvitationService)(nil).Delete), varargs...) + return &MockInvitationServiceDeleteCall{Call: call} +} + +// MockInvitationServiceDeleteCall wrap *gomock.Call +type MockInvitationServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockInvitationServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceDeleteCall) Do(f func(context.Context, *v10.DeleteInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockInvitationService) Filter(arg0 context.Context, arg1 *v10.ListInvitationsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Invitation, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Invitation, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockInvitationServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockInvitationServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockInvitationService)(nil).Filter), varargs...) + return &MockInvitationServiceFilterCall{Call: call} +} + +// MockInvitationServiceFilterCall wrap *gomock.Call +type MockInvitationServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceFilterCall) Return(arg0 iter.Seq2[*v10.Invitation, error]) *MockInvitationServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceFilterCall) Do(f func(context.Context, *v10.ListInvitationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Invitation, error]) *MockInvitationServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListInvitationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Invitation, error]) *MockInvitationServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockInvitationService) Get(arg0 context.Context, arg1 *v10.GetInvitationRequest, arg2 ...grpc.CallOption) (*v10.Invitation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Invitation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInvitationServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockInvitationServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInvitationService)(nil).Get), varargs...) + return &MockInvitationServiceGetCall{Call: call} +} + +// MockInvitationServiceGetCall wrap *gomock.Call +type MockInvitationServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceGetCall) Return(arg0 *v10.Invitation, arg1 error) *MockInvitationServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceGetCall) Do(f func(context.Context, *v10.GetInvitationRequest, ...grpc.CallOption) (*v10.Invitation, error)) *MockInvitationServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetInvitationRequest, ...grpc.CallOption) (*v10.Invitation, error)) *MockInvitationServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockInvitationService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockInvitationServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockInvitationServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockInvitationService)(nil).GetOperation), varargs...) + return &MockInvitationServiceGetOperationCall{Call: call} +} + +// MockInvitationServiceGetOperationCall wrap *gomock.Call +type MockInvitationServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockInvitationServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockInvitationService) List(arg0 context.Context, arg1 *v10.ListInvitationsRequest, arg2 ...grpc.CallOption) (*v10.ListInvitationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListInvitationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockInvitationServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockInvitationServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInvitationService)(nil).List), varargs...) + return &MockInvitationServiceListCall{Call: call} +} + +// MockInvitationServiceListCall wrap *gomock.Call +type MockInvitationServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceListCall) Return(arg0 *v10.ListInvitationsResponse, arg1 error) *MockInvitationServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceListCall) Do(f func(context.Context, *v10.ListInvitationsRequest, ...grpc.CallOption) (*v10.ListInvitationsResponse, error)) *MockInvitationServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceListCall) DoAndReturn(f func(context.Context, *v10.ListInvitationsRequest, ...grpc.CallOption) (*v10.ListInvitationsResponse, error)) *MockInvitationServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockInvitationService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockInvitationServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockInvitationServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockInvitationService)(nil).ListOperations), varargs...) + return &MockInvitationServiceListOperationsCall{Call: call} +} + +// MockInvitationServiceListOperationsCall wrap *gomock.Call +type MockInvitationServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockInvitationServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInvitationServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockInvitationServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Resend mocks base method. +func (m *MockInvitationService) Resend(arg0 context.Context, arg1 *v10.ResendInvitationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Resend", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Resend indicates an expected call of Resend. +func (mr *MockInvitationServiceMockRecorder) Resend(arg0, arg1 any, arg2 ...any) *MockInvitationServiceResendCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resend", reflect.TypeOf((*MockInvitationService)(nil).Resend), varargs...) + return &MockInvitationServiceResendCall{Call: call} +} + +// MockInvitationServiceResendCall wrap *gomock.Call +type MockInvitationServiceResendCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceResendCall) Return(arg0 operations.Operation, arg1 error) *MockInvitationServiceResendCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceResendCall) Do(f func(context.Context, *v10.ResendInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceResendCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceResendCall) DoAndReturn(f func(context.Context, *v10.ResendInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceResendCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockInvitationService) Update(arg0 context.Context, arg1 *v10.UpdateInvitationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockInvitationServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockInvitationServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInvitationService)(nil).Update), varargs...) + return &MockInvitationServiceUpdateCall{Call: call} +} + +// MockInvitationServiceUpdateCall wrap *gomock.Call +type MockInvitationServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockInvitationServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockInvitationServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockInvitationServiceUpdateCall) Do(f func(context.Context, *v10.UpdateInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockInvitationServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateInvitationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockInvitationServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/profile_service.mock.go b/mocks/nebius/iam/v1/profile_service.mock.go new file mode 100644 index 0000000..2c6bc9e --- /dev/null +++ b/mocks/nebius/iam/v1/profile_service.mock.go @@ -0,0 +1,86 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/profile_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/profile_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockProfileService is a mock of ProfileService interface. +type MockProfileService struct { + ctrl *gomock.Controller + recorder *MockProfileServiceMockRecorder +} + +// MockProfileServiceMockRecorder is the mock recorder for MockProfileService. +type MockProfileServiceMockRecorder struct { + mock *MockProfileService +} + +// NewMockProfileService creates a new mock instance. +func NewMockProfileService(ctrl *gomock.Controller) *MockProfileService { + mock := &MockProfileService{ctrl: ctrl} + mock.recorder = &MockProfileServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProfileService) EXPECT() *MockProfileServiceMockRecorder { + return m.recorder +} + +// Get mocks base method. +func (m *MockProfileService) Get(arg0 context.Context, arg1 *v1.GetProfileRequest, arg2 ...grpc.CallOption) (*v1.GetProfileResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.GetProfileResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockProfileServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockProfileServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockProfileService)(nil).Get), varargs...) + return &MockProfileServiceGetCall{Call: call} +} + +// MockProfileServiceGetCall wrap *gomock.Call +type MockProfileServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProfileServiceGetCall) Return(arg0 *v1.GetProfileResponse, arg1 error) *MockProfileServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProfileServiceGetCall) Do(f func(context.Context, *v1.GetProfileRequest, ...grpc.CallOption) (*v1.GetProfileResponse, error)) *MockProfileServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProfileServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetProfileRequest, ...grpc.CallOption) (*v1.GetProfileResponse, error)) *MockProfileServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/project_service.mock.go b/mocks/nebius/iam/v1/project_service.mock.go new file mode 100644 index 0000000..5b03469 --- /dev/null +++ b/mocks/nebius/iam/v1/project_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/project_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/project_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockProjectService is a mock of ProjectService interface. +type MockProjectService struct { + ctrl *gomock.Controller + recorder *MockProjectServiceMockRecorder +} + +// MockProjectServiceMockRecorder is the mock recorder for MockProjectService. +type MockProjectServiceMockRecorder struct { + mock *MockProjectService +} + +// NewMockProjectService creates a new mock instance. +func NewMockProjectService(ctrl *gomock.Controller) *MockProjectService { + mock := &MockProjectService{ctrl: ctrl} + mock.recorder = &MockProjectServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProjectService) EXPECT() *MockProjectServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockProjectService) Filter(arg0 context.Context, arg1 *v1.ListProjectsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.Container, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.Container, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockProjectServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockProjectServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockProjectService)(nil).Filter), varargs...) + return &MockProjectServiceFilterCall{Call: call} +} + +// MockProjectServiceFilterCall wrap *gomock.Call +type MockProjectServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectServiceFilterCall) Return(arg0 iter.Seq2[*v1.Container, error]) *MockProjectServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectServiceFilterCall) Do(f func(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error]) *MockProjectServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error]) *MockProjectServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockProjectService) Get(arg0 context.Context, arg1 *v1.GetProjectRequest, arg2 ...grpc.CallOption) (*v1.Container, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.Container) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockProjectServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockProjectServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockProjectService)(nil).Get), varargs...) + return &MockProjectServiceGetCall{Call: call} +} + +// MockProjectServiceGetCall wrap *gomock.Call +type MockProjectServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectServiceGetCall) Return(arg0 *v1.Container, arg1 error) *MockProjectServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectServiceGetCall) Do(f func(context.Context, *v1.GetProjectRequest, ...grpc.CallOption) (*v1.Container, error)) *MockProjectServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetProjectRequest, ...grpc.CallOption) (*v1.Container, error)) *MockProjectServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockProjectService) GetByName(arg0 context.Context, arg1 *v1.GetProjectByNameRequest, arg2 ...grpc.CallOption) (*v1.Container, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1.Container) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockProjectServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockProjectServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockProjectService)(nil).GetByName), varargs...) + return &MockProjectServiceGetByNameCall{Call: call} +} + +// MockProjectServiceGetByNameCall wrap *gomock.Call +type MockProjectServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectServiceGetByNameCall) Return(arg0 *v1.Container, arg1 error) *MockProjectServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectServiceGetByNameCall) Do(f func(context.Context, *v1.GetProjectByNameRequest, ...grpc.CallOption) (*v1.Container, error)) *MockProjectServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetProjectByNameRequest, ...grpc.CallOption) (*v1.Container, error)) *MockProjectServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockProjectService) List(arg0 context.Context, arg1 *v1.ListProjectsRequest, arg2 ...grpc.CallOption) (*v1.ListProjectsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListProjectsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockProjectServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockProjectServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockProjectService)(nil).List), varargs...) + return &MockProjectServiceListCall{Call: call} +} + +// MockProjectServiceListCall wrap *gomock.Call +type MockProjectServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockProjectServiceListCall) Return(arg0 *v1.ListProjectsResponse, arg1 error) *MockProjectServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockProjectServiceListCall) Do(f func(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) (*v1.ListProjectsResponse, error)) *MockProjectServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockProjectServiceListCall) DoAndReturn(f func(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) (*v1.ListProjectsResponse, error)) *MockProjectServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/service_account_service.mock.go b/mocks/nebius/iam/v1/service_account_service.mock.go new file mode 100644 index 0000000..f0f8ff5 --- /dev/null +++ b/mocks/nebius/iam/v1/service_account_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/service_account_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/service_account_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockServiceAccountService is a mock of ServiceAccountService interface. +type MockServiceAccountService struct { + ctrl *gomock.Controller + recorder *MockServiceAccountServiceMockRecorder +} + +// MockServiceAccountServiceMockRecorder is the mock recorder for MockServiceAccountService. +type MockServiceAccountServiceMockRecorder struct { + mock *MockServiceAccountService +} + +// NewMockServiceAccountService creates a new mock instance. +func NewMockServiceAccountService(ctrl *gomock.Controller) *MockServiceAccountService { + mock := &MockServiceAccountService{ctrl: ctrl} + mock.recorder = &MockServiceAccountServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockServiceAccountService) EXPECT() *MockServiceAccountServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockServiceAccountService) Create(arg0 context.Context, arg1 *v10.CreateServiceAccountRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockServiceAccountServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockServiceAccountService)(nil).Create), varargs...) + return &MockServiceAccountServiceCreateCall{Call: call} +} + +// MockServiceAccountServiceCreateCall wrap *gomock.Call +type MockServiceAccountServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockServiceAccountServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceCreateCall) Do(f func(context.Context, *v10.CreateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockServiceAccountService) Delete(arg0 context.Context, arg1 *v10.DeleteServiceAccountRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockServiceAccountServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockServiceAccountService)(nil).Delete), varargs...) + return &MockServiceAccountServiceDeleteCall{Call: call} +} + +// MockServiceAccountServiceDeleteCall wrap *gomock.Call +type MockServiceAccountServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockServiceAccountServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceDeleteCall) Do(f func(context.Context, *v10.DeleteServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockServiceAccountService) Filter(arg0 context.Context, arg1 *v10.ListServiceAccountRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.ServiceAccount, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.ServiceAccount, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockServiceAccountServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockServiceAccountService)(nil).Filter), varargs...) + return &MockServiceAccountServiceFilterCall{Call: call} +} + +// MockServiceAccountServiceFilterCall wrap *gomock.Call +type MockServiceAccountServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceFilterCall) Return(arg0 iter.Seq2[*v10.ServiceAccount, error]) *MockServiceAccountServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceFilterCall) Do(f func(context.Context, *v10.ListServiceAccountRequest, ...grpc.CallOption) iter.Seq2[*v10.ServiceAccount, error]) *MockServiceAccountServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListServiceAccountRequest, ...grpc.CallOption) iter.Seq2[*v10.ServiceAccount, error]) *MockServiceAccountServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockServiceAccountService) Get(arg0 context.Context, arg1 *v10.GetServiceAccountRequest, arg2 ...grpc.CallOption) (*v10.ServiceAccount, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.ServiceAccount) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockServiceAccountServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServiceAccountService)(nil).Get), varargs...) + return &MockServiceAccountServiceGetCall{Call: call} +} + +// MockServiceAccountServiceGetCall wrap *gomock.Call +type MockServiceAccountServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceGetCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceGetCall) Do(f func(context.Context, *v10.GetServiceAccountRequest, ...grpc.CallOption) (*v10.ServiceAccount, error)) *MockServiceAccountServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetServiceAccountRequest, ...grpc.CallOption) (*v10.ServiceAccount, error)) *MockServiceAccountServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockServiceAccountService) GetByName(arg0 context.Context, arg1 *v10.GetServiceAccountByNameRequest, arg2 ...grpc.CallOption) (*v10.ServiceAccount, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.ServiceAccount) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockServiceAccountServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockServiceAccountService)(nil).GetByName), varargs...) + return &MockServiceAccountServiceGetByNameCall{Call: call} +} + +// MockServiceAccountServiceGetByNameCall wrap *gomock.Call +type MockServiceAccountServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceGetByNameCall) Return(arg0 *v10.ServiceAccount, arg1 error) *MockServiceAccountServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceGetByNameCall) Do(f func(context.Context, *v10.GetServiceAccountByNameRequest, ...grpc.CallOption) (*v10.ServiceAccount, error)) *MockServiceAccountServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceGetByNameCall) DoAndReturn(f func(context.Context, *v10.GetServiceAccountByNameRequest, ...grpc.CallOption) (*v10.ServiceAccount, error)) *MockServiceAccountServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockServiceAccountService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockServiceAccountServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockServiceAccountService)(nil).GetOperation), varargs...) + return &MockServiceAccountServiceGetOperationCall{Call: call} +} + +// MockServiceAccountServiceGetOperationCall wrap *gomock.Call +type MockServiceAccountServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockServiceAccountServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockServiceAccountService) List(arg0 context.Context, arg1 *v10.ListServiceAccountRequest, arg2 ...grpc.CallOption) (*v10.ListServiceAccountResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListServiceAccountResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockServiceAccountServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockServiceAccountService)(nil).List), varargs...) + return &MockServiceAccountServiceListCall{Call: call} +} + +// MockServiceAccountServiceListCall wrap *gomock.Call +type MockServiceAccountServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceListCall) Return(arg0 *v10.ListServiceAccountResponse, arg1 error) *MockServiceAccountServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceListCall) Do(f func(context.Context, *v10.ListServiceAccountRequest, ...grpc.CallOption) (*v10.ListServiceAccountResponse, error)) *MockServiceAccountServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceListCall) DoAndReturn(f func(context.Context, *v10.ListServiceAccountRequest, ...grpc.CallOption) (*v10.ListServiceAccountResponse, error)) *MockServiceAccountServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockServiceAccountService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockServiceAccountServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockServiceAccountService)(nil).ListOperations), varargs...) + return &MockServiceAccountServiceListOperationsCall{Call: call} +} + +// MockServiceAccountServiceListOperationsCall wrap *gomock.Call +type MockServiceAccountServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockServiceAccountServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockServiceAccountServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockServiceAccountServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockServiceAccountService) Update(arg0 context.Context, arg1 *v10.UpdateServiceAccountRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockServiceAccountServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockServiceAccountServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockServiceAccountService)(nil).Update), varargs...) + return &MockServiceAccountServiceUpdateCall{Call: call} +} + +// MockServiceAccountServiceUpdateCall wrap *gomock.Call +type MockServiceAccountServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockServiceAccountServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockServiceAccountServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockServiceAccountServiceUpdateCall) Do(f func(context.Context, *v10.UpdateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockServiceAccountServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockServiceAccountServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/session_management_service.mock.go b/mocks/nebius/iam/v1/session_management_service.mock.go new file mode 100644 index 0000000..7de786b --- /dev/null +++ b/mocks/nebius/iam/v1/session_management_service.mock.go @@ -0,0 +1,86 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/session_management_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/session_management_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockSessionManagementService is a mock of SessionManagementService interface. +type MockSessionManagementService struct { + ctrl *gomock.Controller + recorder *MockSessionManagementServiceMockRecorder +} + +// MockSessionManagementServiceMockRecorder is the mock recorder for MockSessionManagementService. +type MockSessionManagementServiceMockRecorder struct { + mock *MockSessionManagementService +} + +// NewMockSessionManagementService creates a new mock instance. +func NewMockSessionManagementService(ctrl *gomock.Controller) *MockSessionManagementService { + mock := &MockSessionManagementService{ctrl: ctrl} + mock.recorder = &MockSessionManagementServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSessionManagementService) EXPECT() *MockSessionManagementServiceMockRecorder { + return m.recorder +} + +// Revoke mocks base method. +func (m *MockSessionManagementService) Revoke(arg0 context.Context, arg1 *v1.RevokeSessionRequest, arg2 ...grpc.CallOption) (*v1.RevokeSessionResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Revoke", varargs...) + ret0, _ := ret[0].(*v1.RevokeSessionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Revoke indicates an expected call of Revoke. +func (mr *MockSessionManagementServiceMockRecorder) Revoke(arg0, arg1 any, arg2 ...any) *MockSessionManagementServiceRevokeCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revoke", reflect.TypeOf((*MockSessionManagementService)(nil).Revoke), varargs...) + return &MockSessionManagementServiceRevokeCall{Call: call} +} + +// MockSessionManagementServiceRevokeCall wrap *gomock.Call +type MockSessionManagementServiceRevokeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionManagementServiceRevokeCall) Return(arg0 *v1.RevokeSessionResponse, arg1 error) *MockSessionManagementServiceRevokeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionManagementServiceRevokeCall) Do(f func(context.Context, *v1.RevokeSessionRequest, ...grpc.CallOption) (*v1.RevokeSessionResponse, error)) *MockSessionManagementServiceRevokeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionManagementServiceRevokeCall) DoAndReturn(f func(context.Context, *v1.RevokeSessionRequest, ...grpc.CallOption) (*v1.RevokeSessionResponse, error)) *MockSessionManagementServiceRevokeCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/tenant_service.mock.go b/mocks/nebius/iam/v1/tenant_service.mock.go new file mode 100644 index 0000000..03794f1 --- /dev/null +++ b/mocks/nebius/iam/v1/tenant_service.mock.go @@ -0,0 +1,174 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/tenant_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/tenant_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockTenantService is a mock of TenantService interface. +type MockTenantService struct { + ctrl *gomock.Controller + recorder *MockTenantServiceMockRecorder +} + +// MockTenantServiceMockRecorder is the mock recorder for MockTenantService. +type MockTenantServiceMockRecorder struct { + mock *MockTenantService +} + +// NewMockTenantService creates a new mock instance. +func NewMockTenantService(ctrl *gomock.Controller) *MockTenantService { + mock := &MockTenantService{ctrl: ctrl} + mock.recorder = &MockTenantServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTenantService) EXPECT() *MockTenantServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockTenantService) Filter(arg0 context.Context, arg1 *v1.ListTenantsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.Container, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.Container, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockTenantServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockTenantServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockTenantService)(nil).Filter), varargs...) + return &MockTenantServiceFilterCall{Call: call} +} + +// MockTenantServiceFilterCall wrap *gomock.Call +type MockTenantServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantServiceFilterCall) Return(arg0 iter.Seq2[*v1.Container, error]) *MockTenantServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantServiceFilterCall) Do(f func(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error]) *MockTenantServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error]) *MockTenantServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockTenantService) Get(arg0 context.Context, arg1 *v1.GetTenantRequest, arg2 ...grpc.CallOption) (*v1.Container, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.Container) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockTenantServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockTenantServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTenantService)(nil).Get), varargs...) + return &MockTenantServiceGetCall{Call: call} +} + +// MockTenantServiceGetCall wrap *gomock.Call +type MockTenantServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantServiceGetCall) Return(arg0 *v1.Container, arg1 error) *MockTenantServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantServiceGetCall) Do(f func(context.Context, *v1.GetTenantRequest, ...grpc.CallOption) (*v1.Container, error)) *MockTenantServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetTenantRequest, ...grpc.CallOption) (*v1.Container, error)) *MockTenantServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockTenantService) List(arg0 context.Context, arg1 *v1.ListTenantsRequest, arg2 ...grpc.CallOption) (*v1.ListTenantsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListTenantsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockTenantServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockTenantServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockTenantService)(nil).List), varargs...) + return &MockTenantServiceListCall{Call: call} +} + +// MockTenantServiceListCall wrap *gomock.Call +type MockTenantServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantServiceListCall) Return(arg0 *v1.ListTenantsResponse, arg1 error) *MockTenantServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantServiceListCall) Do(f func(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) (*v1.ListTenantsResponse, error)) *MockTenantServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantServiceListCall) DoAndReturn(f func(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) (*v1.ListTenantsResponse, error)) *MockTenantServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/tenant_user_account_service.mock.go b/mocks/nebius/iam/v1/tenant_user_account_service.mock.go new file mode 100644 index 0000000..a326047 --- /dev/null +++ b/mocks/nebius/iam/v1/tenant_user_account_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/tenant_user_account_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/tenant_user_account_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockTenantUserAccountService is a mock of TenantUserAccountService interface. +type MockTenantUserAccountService struct { + ctrl *gomock.Controller + recorder *MockTenantUserAccountServiceMockRecorder +} + +// MockTenantUserAccountServiceMockRecorder is the mock recorder for MockTenantUserAccountService. +type MockTenantUserAccountServiceMockRecorder struct { + mock *MockTenantUserAccountService +} + +// NewMockTenantUserAccountService creates a new mock instance. +func NewMockTenantUserAccountService(ctrl *gomock.Controller) *MockTenantUserAccountService { + mock := &MockTenantUserAccountService{ctrl: ctrl} + mock.recorder = &MockTenantUserAccountServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTenantUserAccountService) EXPECT() *MockTenantUserAccountServiceMockRecorder { + return m.recorder +} + +// Block mocks base method. +func (m *MockTenantUserAccountService) Block(arg0 context.Context, arg1 *v10.BlockTenantUserAccountRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Block", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Block indicates an expected call of Block. +func (mr *MockTenantUserAccountServiceMockRecorder) Block(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceBlockCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Block", reflect.TypeOf((*MockTenantUserAccountService)(nil).Block), varargs...) + return &MockTenantUserAccountServiceBlockCall{Call: call} +} + +// MockTenantUserAccountServiceBlockCall wrap *gomock.Call +type MockTenantUserAccountServiceBlockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceBlockCall) Return(arg0 operations.Operation, arg1 error) *MockTenantUserAccountServiceBlockCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceBlockCall) Do(f func(context.Context, *v10.BlockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceBlockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceBlockCall) DoAndReturn(f func(context.Context, *v10.BlockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceBlockCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockTenantUserAccountService) Filter(arg0 context.Context, arg1 *v10.ListTenantUserAccountsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.TenantUserAccount, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.TenantUserAccount, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockTenantUserAccountServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockTenantUserAccountService)(nil).Filter), varargs...) + return &MockTenantUserAccountServiceFilterCall{Call: call} +} + +// MockTenantUserAccountServiceFilterCall wrap *gomock.Call +type MockTenantUserAccountServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceFilterCall) Return(arg0 iter.Seq2[*v10.TenantUserAccount, error]) *MockTenantUserAccountServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceFilterCall) Do(f func(context.Context, *v10.ListTenantUserAccountsRequest, ...grpc.CallOption) iter.Seq2[*v10.TenantUserAccount, error]) *MockTenantUserAccountServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListTenantUserAccountsRequest, ...grpc.CallOption) iter.Seq2[*v10.TenantUserAccount, error]) *MockTenantUserAccountServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockTenantUserAccountService) Get(arg0 context.Context, arg1 *v10.GetTenantUserAccountRequest, arg2 ...grpc.CallOption) (*v10.TenantUserAccount, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.TenantUserAccount) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockTenantUserAccountServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTenantUserAccountService)(nil).Get), varargs...) + return &MockTenantUserAccountServiceGetCall{Call: call} +} + +// MockTenantUserAccountServiceGetCall wrap *gomock.Call +type MockTenantUserAccountServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceGetCall) Return(arg0 *v10.TenantUserAccount, arg1 error) *MockTenantUserAccountServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceGetCall) Do(f func(context.Context, *v10.GetTenantUserAccountRequest, ...grpc.CallOption) (*v10.TenantUserAccount, error)) *MockTenantUserAccountServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetTenantUserAccountRequest, ...grpc.CallOption) (*v10.TenantUserAccount, error)) *MockTenantUserAccountServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockTenantUserAccountService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockTenantUserAccountServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockTenantUserAccountService)(nil).GetOperation), varargs...) + return &MockTenantUserAccountServiceGetOperationCall{Call: call} +} + +// MockTenantUserAccountServiceGetOperationCall wrap *gomock.Call +type MockTenantUserAccountServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockTenantUserAccountServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockTenantUserAccountService) List(arg0 context.Context, arg1 *v10.ListTenantUserAccountsRequest, arg2 ...grpc.CallOption) (*v10.ListTenantUserAccountsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListTenantUserAccountsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockTenantUserAccountServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockTenantUserAccountService)(nil).List), varargs...) + return &MockTenantUserAccountServiceListCall{Call: call} +} + +// MockTenantUserAccountServiceListCall wrap *gomock.Call +type MockTenantUserAccountServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceListCall) Return(arg0 *v10.ListTenantUserAccountsResponse, arg1 error) *MockTenantUserAccountServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceListCall) Do(f func(context.Context, *v10.ListTenantUserAccountsRequest, ...grpc.CallOption) (*v10.ListTenantUserAccountsResponse, error)) *MockTenantUserAccountServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceListCall) DoAndReturn(f func(context.Context, *v10.ListTenantUserAccountsRequest, ...grpc.CallOption) (*v10.ListTenantUserAccountsResponse, error)) *MockTenantUserAccountServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockTenantUserAccountService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockTenantUserAccountServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockTenantUserAccountService)(nil).ListOperations), varargs...) + return &MockTenantUserAccountServiceListOperationsCall{Call: call} +} + +// MockTenantUserAccountServiceListOperationsCall wrap *gomock.Call +type MockTenantUserAccountServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockTenantUserAccountServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockTenantUserAccountServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockTenantUserAccountServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Unblock mocks base method. +func (m *MockTenantUserAccountService) Unblock(arg0 context.Context, arg1 *v10.UnblockTenantUserAccountRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Unblock", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Unblock indicates an expected call of Unblock. +func (mr *MockTenantUserAccountServiceMockRecorder) Unblock(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountServiceUnblockCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unblock", reflect.TypeOf((*MockTenantUserAccountService)(nil).Unblock), varargs...) + return &MockTenantUserAccountServiceUnblockCall{Call: call} +} + +// MockTenantUserAccountServiceUnblockCall wrap *gomock.Call +type MockTenantUserAccountServiceUnblockCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountServiceUnblockCall) Return(arg0 operations.Operation, arg1 error) *MockTenantUserAccountServiceUnblockCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountServiceUnblockCall) Do(f func(context.Context, *v10.UnblockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceUnblockCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountServiceUnblockCall) DoAndReturn(f func(context.Context, *v10.UnblockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error)) *MockTenantUserAccountServiceUnblockCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/tenant_user_account_with_attributes_service.mock.go b/mocks/nebius/iam/v1/tenant_user_account_with_attributes_service.mock.go new file mode 100644 index 0000000..8cc5335 --- /dev/null +++ b/mocks/nebius/iam/v1/tenant_user_account_with_attributes_service.mock.go @@ -0,0 +1,174 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/tenant_user_account_with_attributes_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/tenant_user_account_with_attributes_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockTenantUserAccountWithAttributesService is a mock of TenantUserAccountWithAttributesService interface. +type MockTenantUserAccountWithAttributesService struct { + ctrl *gomock.Controller + recorder *MockTenantUserAccountWithAttributesServiceMockRecorder +} + +// MockTenantUserAccountWithAttributesServiceMockRecorder is the mock recorder for MockTenantUserAccountWithAttributesService. +type MockTenantUserAccountWithAttributesServiceMockRecorder struct { + mock *MockTenantUserAccountWithAttributesService +} + +// NewMockTenantUserAccountWithAttributesService creates a new mock instance. +func NewMockTenantUserAccountWithAttributesService(ctrl *gomock.Controller) *MockTenantUserAccountWithAttributesService { + mock := &MockTenantUserAccountWithAttributesService{ctrl: ctrl} + mock.recorder = &MockTenantUserAccountWithAttributesServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTenantUserAccountWithAttributesService) EXPECT() *MockTenantUserAccountWithAttributesServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockTenantUserAccountWithAttributesService) Filter(arg0 context.Context, arg1 *v1.ListTenantUserAccountsWithAttributesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccountWithAttributes, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.TenantUserAccountWithAttributes, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockTenantUserAccountWithAttributesServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountWithAttributesServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockTenantUserAccountWithAttributesService)(nil).Filter), varargs...) + return &MockTenantUserAccountWithAttributesServiceFilterCall{Call: call} +} + +// MockTenantUserAccountWithAttributesServiceFilterCall wrap *gomock.Call +type MockTenantUserAccountWithAttributesServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountWithAttributesServiceFilterCall) Return(arg0 iter.Seq2[*v1.TenantUserAccountWithAttributes, error]) *MockTenantUserAccountWithAttributesServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountWithAttributesServiceFilterCall) Do(f func(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccountWithAttributes, error]) *MockTenantUserAccountWithAttributesServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountWithAttributesServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccountWithAttributes, error]) *MockTenantUserAccountWithAttributesServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockTenantUserAccountWithAttributesService) Get(arg0 context.Context, arg1 *v1.GetTenantUserAccountWithAttributesRequest, arg2 ...grpc.CallOption) (*v1.TenantUserAccountWithAttributes, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.TenantUserAccountWithAttributes) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockTenantUserAccountWithAttributesServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountWithAttributesServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTenantUserAccountWithAttributesService)(nil).Get), varargs...) + return &MockTenantUserAccountWithAttributesServiceGetCall{Call: call} +} + +// MockTenantUserAccountWithAttributesServiceGetCall wrap *gomock.Call +type MockTenantUserAccountWithAttributesServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountWithAttributesServiceGetCall) Return(arg0 *v1.TenantUserAccountWithAttributes, arg1 error) *MockTenantUserAccountWithAttributesServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountWithAttributesServiceGetCall) Do(f func(context.Context, *v1.GetTenantUserAccountWithAttributesRequest, ...grpc.CallOption) (*v1.TenantUserAccountWithAttributes, error)) *MockTenantUserAccountWithAttributesServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountWithAttributesServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetTenantUserAccountWithAttributesRequest, ...grpc.CallOption) (*v1.TenantUserAccountWithAttributes, error)) *MockTenantUserAccountWithAttributesServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockTenantUserAccountWithAttributesService) List(arg0 context.Context, arg1 *v1.ListTenantUserAccountsWithAttributesRequest, arg2 ...grpc.CallOption) (*v1.ListTenantUserAccountsWithAttributesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListTenantUserAccountsWithAttributesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockTenantUserAccountWithAttributesServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockTenantUserAccountWithAttributesServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockTenantUserAccountWithAttributesService)(nil).List), varargs...) + return &MockTenantUserAccountWithAttributesServiceListCall{Call: call} +} + +// MockTenantUserAccountWithAttributesServiceListCall wrap *gomock.Call +type MockTenantUserAccountWithAttributesServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTenantUserAccountWithAttributesServiceListCall) Return(arg0 *v1.ListTenantUserAccountsWithAttributesResponse, arg1 error) *MockTenantUserAccountWithAttributesServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTenantUserAccountWithAttributesServiceListCall) Do(f func(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) (*v1.ListTenantUserAccountsWithAttributesResponse, error)) *MockTenantUserAccountWithAttributesServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTenantUserAccountWithAttributesServiceListCall) DoAndReturn(f func(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) (*v1.ListTenantUserAccountsWithAttributesResponse, error)) *MockTenantUserAccountWithAttributesServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/iam/v1/token_exchange_service.mock.go b/mocks/nebius/iam/v1/token_exchange_service.mock.go new file mode 100644 index 0000000..c00f494 --- /dev/null +++ b/mocks/nebius/iam/v1/token_exchange_service.mock.go @@ -0,0 +1,86 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/iam/v1/token_exchange_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/iam/v1/token_exchange_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockTokenExchangeService is a mock of TokenExchangeService interface. +type MockTokenExchangeService struct { + ctrl *gomock.Controller + recorder *MockTokenExchangeServiceMockRecorder +} + +// MockTokenExchangeServiceMockRecorder is the mock recorder for MockTokenExchangeService. +type MockTokenExchangeServiceMockRecorder struct { + mock *MockTokenExchangeService +} + +// NewMockTokenExchangeService creates a new mock instance. +func NewMockTokenExchangeService(ctrl *gomock.Controller) *MockTokenExchangeService { + mock := &MockTokenExchangeService{ctrl: ctrl} + mock.recorder = &MockTokenExchangeServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTokenExchangeService) EXPECT() *MockTokenExchangeServiceMockRecorder { + return m.recorder +} + +// Exchange mocks base method. +func (m *MockTokenExchangeService) Exchange(arg0 context.Context, arg1 *v1.ExchangeTokenRequest, arg2 ...grpc.CallOption) (*v1.CreateTokenResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Exchange", varargs...) + ret0, _ := ret[0].(*v1.CreateTokenResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Exchange indicates an expected call of Exchange. +func (mr *MockTokenExchangeServiceMockRecorder) Exchange(arg0, arg1 any, arg2 ...any) *MockTokenExchangeServiceExchangeCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exchange", reflect.TypeOf((*MockTokenExchangeService)(nil).Exchange), varargs...) + return &MockTokenExchangeServiceExchangeCall{Call: call} +} + +// MockTokenExchangeServiceExchangeCall wrap *gomock.Call +type MockTokenExchangeServiceExchangeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTokenExchangeServiceExchangeCall) Return(arg0 *v1.CreateTokenResponse, arg1 error) *MockTokenExchangeServiceExchangeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTokenExchangeServiceExchangeCall) Do(f func(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error)) *MockTokenExchangeServiceExchangeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTokenExchangeServiceExchangeCall) DoAndReturn(f func(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error)) *MockTokenExchangeServiceExchangeCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/logging/v1/agentmanager/version_service.mock.go b/mocks/nebius/logging/v1/agentmanager/version_service.mock.go new file mode 100644 index 0000000..16cb067 --- /dev/null +++ b/mocks/nebius/logging/v1/agentmanager/version_service.mock.go @@ -0,0 +1,86 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/logging/v1/agentmanager/version_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/logging/v1/agentmanager/version_service.sdk.go -package agentmanager -typed +// + +// Package agentmanager is a generated GoMock package. +package agentmanager + +import ( + context "context" + reflect "reflect" + + agentmanager "github.com/nebius/gosdk/proto/nebius/logging/v1/agentmanager" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockVersionService is a mock of VersionService interface. +type MockVersionService struct { + ctrl *gomock.Controller + recorder *MockVersionServiceMockRecorder +} + +// MockVersionServiceMockRecorder is the mock recorder for MockVersionService. +type MockVersionServiceMockRecorder struct { + mock *MockVersionService +} + +// NewMockVersionService creates a new mock instance. +func NewMockVersionService(ctrl *gomock.Controller) *MockVersionService { + mock := &MockVersionService{ctrl: ctrl} + mock.recorder = &MockVersionServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockVersionService) EXPECT() *MockVersionServiceMockRecorder { + return m.recorder +} + +// GetVersion mocks base method. +func (m *MockVersionService) GetVersion(arg0 context.Context, arg1 *agentmanager.GetVersionRequest, arg2 ...grpc.CallOption) (*agentmanager.GetVersionResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetVersion", varargs...) + ret0, _ := ret[0].(*agentmanager.GetVersionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVersion indicates an expected call of GetVersion. +func (mr *MockVersionServiceMockRecorder) GetVersion(arg0, arg1 any, arg2 ...any) *MockVersionServiceGetVersionCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockVersionService)(nil).GetVersion), varargs...) + return &MockVersionServiceGetVersionCall{Call: call} +} + +// MockVersionServiceGetVersionCall wrap *gomock.Call +type MockVersionServiceGetVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockVersionServiceGetVersionCall) Return(arg0 *agentmanager.GetVersionResponse, arg1 error) *MockVersionServiceGetVersionCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockVersionServiceGetVersionCall) Do(f func(context.Context, *agentmanager.GetVersionRequest, ...grpc.CallOption) (*agentmanager.GetVersionResponse, error)) *MockVersionServiceGetVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockVersionServiceGetVersionCall) DoAndReturn(f func(context.Context, *agentmanager.GetVersionRequest, ...grpc.CallOption) (*agentmanager.GetVersionResponse, error)) *MockVersionServiceGetVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/mk8s/v1/cluster_service.mock.go b/mocks/nebius/mk8s/v1/cluster_service.mock.go new file mode 100644 index 0000000..11ac444 --- /dev/null +++ b/mocks/nebius/mk8s/v1/cluster_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/mk8s/v1/cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/mk8s/v1/cluster_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/mk8s/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockClusterService is a mock of ClusterService interface. +type MockClusterService struct { + ctrl *gomock.Controller + recorder *MockClusterServiceMockRecorder +} + +// MockClusterServiceMockRecorder is the mock recorder for MockClusterService. +type MockClusterServiceMockRecorder struct { + mock *MockClusterService +} + +// NewMockClusterService creates a new mock instance. +func NewMockClusterService(ctrl *gomock.Controller) *MockClusterService { + mock := &MockClusterService{ctrl: ctrl} + mock.recorder = &MockClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClusterService) EXPECT() *MockClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockClusterService) Create(arg0 context.Context, arg1 *v10.CreateClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterService)(nil).Create), varargs...) + return &MockClusterServiceCreateCall{Call: call} +} + +// MockClusterServiceCreateCall wrap *gomock.Call +type MockClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceCreateCall) Do(f func(context.Context, *v10.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClusterService) Delete(arg0 context.Context, arg1 *v10.DeleteClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterService)(nil).Delete), varargs...) + return &MockClusterServiceDeleteCall{Call: call} +} + +// MockClusterServiceDeleteCall wrap *gomock.Call +type MockClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceDeleteCall) Do(f func(context.Context, *v10.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockClusterService) Filter(arg0 context.Context, arg1 *v10.ListClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Cluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Cluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockClusterService)(nil).Filter), varargs...) + return &MockClusterServiceFilterCall{Call: call} +} + +// MockClusterServiceFilterCall wrap *gomock.Call +type MockClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceFilterCall) Return(arg0 iter.Seq2[*v10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceFilterCall) Do(f func(context.Context, *v10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockClusterService) Get(arg0 context.Context, arg1 *v10.GetClusterRequest, arg2 ...grpc.CallOption) (*v10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterService)(nil).Get), varargs...) + return &MockClusterServiceGetCall{Call: call} +} + +// MockClusterServiceGetCall wrap *gomock.Call +type MockClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetCall) Return(arg0 *v10.Cluster, arg1 error) *MockClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetCall) Do(f func(context.Context, *v10.GetClusterRequest, ...grpc.CallOption) (*v10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetClusterRequest, ...grpc.CallOption) (*v10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockClusterService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockClusterService)(nil).GetByName), varargs...) + return &MockClusterServiceGetByNameCall{Call: call} +} + +// MockClusterServiceGetByNameCall wrap *gomock.Call +type MockClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetByNameCall) Return(arg0 *v10.Cluster, arg1 error) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockClusterService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockClusterService)(nil).GetOperation), varargs...) + return &MockClusterServiceGetOperationCall{Call: call} +} + +// MockClusterServiceGetOperationCall wrap *gomock.Call +type MockClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockClusterService) List(arg0 context.Context, arg1 *v10.ListClustersRequest, arg2 ...grpc.CallOption) (*v10.ListClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterService)(nil).List), varargs...) + return &MockClusterServiceListCall{Call: call} +} + +// MockClusterServiceListCall wrap *gomock.Call +type MockClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListCall) Return(arg0 *v10.ListClustersResponse, arg1 error) *MockClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListCall) Do(f func(context.Context, *v10.ListClustersRequest, ...grpc.CallOption) (*v10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListCall) DoAndReturn(f func(context.Context, *v10.ListClustersRequest, ...grpc.CallOption) (*v10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockClusterService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockClusterService)(nil).ListOperations), varargs...) + return &MockClusterServiceListOperationsCall{Call: call} +} + +// MockClusterServiceListOperationsCall wrap *gomock.Call +type MockClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockClusterService) Update(arg0 context.Context, arg1 *v10.UpdateClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterService)(nil).Update), varargs...) + return &MockClusterServiceUpdateCall{Call: call} +} + +// MockClusterServiceUpdateCall wrap *gomock.Call +type MockClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceUpdateCall) Do(f func(context.Context, *v10.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/mk8s/v1/node_group_service.mock.go b/mocks/nebius/mk8s/v1/node_group_service.mock.go new file mode 100644 index 0000000..637e96f --- /dev/null +++ b/mocks/nebius/mk8s/v1/node_group_service.mock.go @@ -0,0 +1,484 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/mk8s/v1/node_group_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/mk8s/v1/node_group_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/mk8s/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockNodeGroupService is a mock of NodeGroupService interface. +type MockNodeGroupService struct { + ctrl *gomock.Controller + recorder *MockNodeGroupServiceMockRecorder +} + +// MockNodeGroupServiceMockRecorder is the mock recorder for MockNodeGroupService. +type MockNodeGroupServiceMockRecorder struct { + mock *MockNodeGroupService +} + +// NewMockNodeGroupService creates a new mock instance. +func NewMockNodeGroupService(ctrl *gomock.Controller) *MockNodeGroupService { + mock := &MockNodeGroupService{ctrl: ctrl} + mock.recorder = &MockNodeGroupServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockNodeGroupService) EXPECT() *MockNodeGroupServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockNodeGroupService) Create(arg0 context.Context, arg1 *v10.CreateNodeGroupRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockNodeGroupServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNodeGroupService)(nil).Create), varargs...) + return &MockNodeGroupServiceCreateCall{Call: call} +} + +// MockNodeGroupServiceCreateCall wrap *gomock.Call +type MockNodeGroupServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceCreateCall) Do(f func(context.Context, *v10.CreateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockNodeGroupService) Delete(arg0 context.Context, arg1 *v10.DeleteNodeGroupRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockNodeGroupServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNodeGroupService)(nil).Delete), varargs...) + return &MockNodeGroupServiceDeleteCall{Call: call} +} + +// MockNodeGroupServiceDeleteCall wrap *gomock.Call +type MockNodeGroupServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceDeleteCall) Do(f func(context.Context, *v10.DeleteNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockNodeGroupService) Filter(arg0 context.Context, arg1 *v10.ListNodeGroupsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.NodeGroup, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.NodeGroup, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockNodeGroupServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockNodeGroupService)(nil).Filter), varargs...) + return &MockNodeGroupServiceFilterCall{Call: call} +} + +// MockNodeGroupServiceFilterCall wrap *gomock.Call +type MockNodeGroupServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceFilterCall) Return(arg0 iter.Seq2[*v10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceFilterCall) Do(f func(context.Context, *v10.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockNodeGroupService) Get(arg0 context.Context, arg1 *v10.GetNodeGroupRequest, arg2 ...grpc.CallOption) (*v10.NodeGroup, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.NodeGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockNodeGroupServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNodeGroupService)(nil).Get), varargs...) + return &MockNodeGroupServiceGetCall{Call: call} +} + +// MockNodeGroupServiceGetCall wrap *gomock.Call +type MockNodeGroupServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetCall) Return(arg0 *v10.NodeGroup, arg1 error) *MockNodeGroupServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetCall) Do(f func(context.Context, *v10.GetNodeGroupRequest, ...grpc.CallOption) (*v10.NodeGroup, error)) *MockNodeGroupServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetNodeGroupRequest, ...grpc.CallOption) (*v10.NodeGroup, error)) *MockNodeGroupServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockNodeGroupService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v10.NodeGroup, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.NodeGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockNodeGroupServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNodeGroupService)(nil).GetByName), varargs...) + return &MockNodeGroupServiceGetByNameCall{Call: call} +} + +// MockNodeGroupServiceGetByNameCall wrap *gomock.Call +type MockNodeGroupServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetByNameCall) Return(arg0 *v10.NodeGroup, arg1 error) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.NodeGroup, error)) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v10.NodeGroup, error)) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockNodeGroupService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockNodeGroupServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockNodeGroupService)(nil).GetOperation), varargs...) + return &MockNodeGroupServiceGetOperationCall{Call: call} +} + +// MockNodeGroupServiceGetOperationCall wrap *gomock.Call +type MockNodeGroupServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockNodeGroupService) List(arg0 context.Context, arg1 *v10.ListNodeGroupsRequest, arg2 ...grpc.CallOption) (*v10.ListNodeGroupsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListNodeGroupsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockNodeGroupServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNodeGroupService)(nil).List), varargs...) + return &MockNodeGroupServiceListCall{Call: call} +} + +// MockNodeGroupServiceListCall wrap *gomock.Call +type MockNodeGroupServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceListCall) Return(arg0 *v10.ListNodeGroupsResponse, arg1 error) *MockNodeGroupServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceListCall) Do(f func(context.Context, *v10.ListNodeGroupsRequest, ...grpc.CallOption) (*v10.ListNodeGroupsResponse, error)) *MockNodeGroupServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceListCall) DoAndReturn(f func(context.Context, *v10.ListNodeGroupsRequest, ...grpc.CallOption) (*v10.ListNodeGroupsResponse, error)) *MockNodeGroupServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockNodeGroupService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockNodeGroupServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockNodeGroupService)(nil).ListOperations), varargs...) + return &MockNodeGroupServiceListOperationsCall{Call: call} +} + +// MockNodeGroupServiceListOperationsCall wrap *gomock.Call +type MockNodeGroupServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockNodeGroupService) Update(arg0 context.Context, arg1 *v10.UpdateNodeGroupRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockNodeGroupServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNodeGroupService)(nil).Update), varargs...) + return &MockNodeGroupServiceUpdateCall{Call: call} +} + +// MockNodeGroupServiceUpdateCall wrap *gomock.Call +type MockNodeGroupServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceUpdateCall) Do(f func(context.Context, *v10.UpdateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Upgrade mocks base method. +func (m *MockNodeGroupService) Upgrade(arg0 context.Context, arg1 *v10.UpgradeNodeGroupRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Upgrade", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Upgrade indicates an expected call of Upgrade. +func (mr *MockNodeGroupServiceMockRecorder) Upgrade(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceUpgradeCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockNodeGroupService)(nil).Upgrade), varargs...) + return &MockNodeGroupServiceUpgradeCall{Call: call} +} + +// MockNodeGroupServiceUpgradeCall wrap *gomock.Call +type MockNodeGroupServiceUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceUpgradeCall) Return(arg0 operations.Operation, arg1 error) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceUpgradeCall) Do(f func(context.Context, *v10.UpgradeNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceUpgradeCall) DoAndReturn(f func(context.Context, *v10.UpgradeNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error)) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/mk8s/v1alpha1/cluster_service.mock.go b/mocks/nebius/mk8s/v1alpha1/cluster_service.mock.go new file mode 100644 index 0000000..fc7344b --- /dev/null +++ b/mocks/nebius/mk8s/v1alpha1/cluster_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/mk8s/v1alpha1/cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/mk8s/v1alpha1/cluster_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/mk8s/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockClusterService is a mock of ClusterService interface. +type MockClusterService struct { + ctrl *gomock.Controller + recorder *MockClusterServiceMockRecorder +} + +// MockClusterServiceMockRecorder is the mock recorder for MockClusterService. +type MockClusterServiceMockRecorder struct { + mock *MockClusterService +} + +// NewMockClusterService creates a new mock instance. +func NewMockClusterService(ctrl *gomock.Controller) *MockClusterService { + mock := &MockClusterService{ctrl: ctrl} + mock.recorder = &MockClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClusterService) EXPECT() *MockClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockClusterService) Create(arg0 context.Context, arg1 *v1alpha10.CreateClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterService)(nil).Create), varargs...) + return &MockClusterServiceCreateCall{Call: call} +} + +// MockClusterServiceCreateCall wrap *gomock.Call +type MockClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClusterService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterService)(nil).Delete), varargs...) + return &MockClusterServiceDeleteCall{Call: call} +} + +// MockClusterServiceDeleteCall wrap *gomock.Call +type MockClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockClusterService) Filter(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Cluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockClusterService)(nil).Filter), varargs...) + return &MockClusterServiceFilterCall{Call: call} +} + +// MockClusterServiceFilterCall wrap *gomock.Call +type MockClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockClusterService) Get(arg0 context.Context, arg1 *v1alpha10.GetClusterRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterService)(nil).Get), varargs...) + return &MockClusterServiceGetCall{Call: call} +} + +// MockClusterServiceGetCall wrap *gomock.Call +type MockClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetCall) Do(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockClusterService) GetByName(arg0 context.Context, arg1 *v1alpha10.GetClusterByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockClusterService)(nil).GetByName), varargs...) + return &MockClusterServiceGetByNameCall{Call: call} +} + +// MockClusterServiceGetByNameCall wrap *gomock.Call +type MockClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetByNameCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetByNameCall) Do(f func(context.Context, *v1alpha10.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha10.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockClusterService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockClusterService)(nil).GetOperation), varargs...) + return &MockClusterServiceGetOperationCall{Call: call} +} + +// MockClusterServiceGetOperationCall wrap *gomock.Call +type MockClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockClusterService) List(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterService)(nil).List), varargs...) + return &MockClusterServiceListCall{Call: call} +} + +// MockClusterServiceListCall wrap *gomock.Call +type MockClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListCall) Return(arg0 *v1alpha10.ListClustersResponse, arg1 error) *MockClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockClusterService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockClusterService)(nil).ListOperations), varargs...) + return &MockClusterServiceListOperationsCall{Call: call} +} + +// MockClusterServiceListOperationsCall wrap *gomock.Call +type MockClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockClusterService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterService)(nil).Update), varargs...) + return &MockClusterServiceUpdateCall{Call: call} +} + +// MockClusterServiceUpdateCall wrap *gomock.Call +type MockClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/mk8s/v1alpha1/node_group_service.mock.go b/mocks/nebius/mk8s/v1alpha1/node_group_service.mock.go new file mode 100644 index 0000000..944de32 --- /dev/null +++ b/mocks/nebius/mk8s/v1alpha1/node_group_service.mock.go @@ -0,0 +1,484 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/mk8s/v1alpha1/node_group_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/mk8s/v1alpha1/node_group_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/mk8s/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockNodeGroupService is a mock of NodeGroupService interface. +type MockNodeGroupService struct { + ctrl *gomock.Controller + recorder *MockNodeGroupServiceMockRecorder +} + +// MockNodeGroupServiceMockRecorder is the mock recorder for MockNodeGroupService. +type MockNodeGroupServiceMockRecorder struct { + mock *MockNodeGroupService +} + +// NewMockNodeGroupService creates a new mock instance. +func NewMockNodeGroupService(ctrl *gomock.Controller) *MockNodeGroupService { + mock := &MockNodeGroupService{ctrl: ctrl} + mock.recorder = &MockNodeGroupServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockNodeGroupService) EXPECT() *MockNodeGroupServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockNodeGroupService) Create(arg0 context.Context, arg1 *v1alpha10.CreateNodeGroupRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockNodeGroupServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockNodeGroupService)(nil).Create), varargs...) + return &MockNodeGroupServiceCreateCall{Call: call} +} + +// MockNodeGroupServiceCreateCall wrap *gomock.Call +type MockNodeGroupServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockNodeGroupService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteNodeGroupRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockNodeGroupServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockNodeGroupService)(nil).Delete), varargs...) + return &MockNodeGroupServiceDeleteCall{Call: call} +} + +// MockNodeGroupServiceDeleteCall wrap *gomock.Call +type MockNodeGroupServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockNodeGroupService) Filter(arg0 context.Context, arg1 *v1alpha10.ListNodeGroupsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.NodeGroup, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.NodeGroup, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockNodeGroupServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockNodeGroupService)(nil).Filter), varargs...) + return &MockNodeGroupServiceFilterCall{Call: call} +} + +// MockNodeGroupServiceFilterCall wrap *gomock.Call +type MockNodeGroupServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.NodeGroup, error]) *MockNodeGroupServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockNodeGroupService) Get(arg0 context.Context, arg1 *v1alpha10.GetNodeGroupRequest, arg2 ...grpc.CallOption) (*v1alpha10.NodeGroup, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.NodeGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockNodeGroupServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNodeGroupService)(nil).Get), varargs...) + return &MockNodeGroupServiceGetCall{Call: call} +} + +// MockNodeGroupServiceGetCall wrap *gomock.Call +type MockNodeGroupServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetCall) Return(arg0 *v1alpha10.NodeGroup, arg1 error) *MockNodeGroupServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetCall) Do(f func(context.Context, *v1alpha10.GetNodeGroupRequest, ...grpc.CallOption) (*v1alpha10.NodeGroup, error)) *MockNodeGroupServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetNodeGroupRequest, ...grpc.CallOption) (*v1alpha10.NodeGroup, error)) *MockNodeGroupServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockNodeGroupService) GetByName(arg0 context.Context, arg1 *v1alpha10.GetNodeGroupByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.NodeGroup, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.NodeGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockNodeGroupServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNodeGroupService)(nil).GetByName), varargs...) + return &MockNodeGroupServiceGetByNameCall{Call: call} +} + +// MockNodeGroupServiceGetByNameCall wrap *gomock.Call +type MockNodeGroupServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetByNameCall) Return(arg0 *v1alpha10.NodeGroup, arg1 error) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetByNameCall) Do(f func(context.Context, *v1alpha10.GetNodeGroupByNameRequest, ...grpc.CallOption) (*v1alpha10.NodeGroup, error)) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha10.GetNodeGroupByNameRequest, ...grpc.CallOption) (*v1alpha10.NodeGroup, error)) *MockNodeGroupServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockNodeGroupService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockNodeGroupServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockNodeGroupService)(nil).GetOperation), varargs...) + return &MockNodeGroupServiceGetOperationCall{Call: call} +} + +// MockNodeGroupServiceGetOperationCall wrap *gomock.Call +type MockNodeGroupServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockNodeGroupService) List(arg0 context.Context, arg1 *v1alpha10.ListNodeGroupsRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListNodeGroupsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListNodeGroupsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockNodeGroupServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNodeGroupService)(nil).List), varargs...) + return &MockNodeGroupServiceListCall{Call: call} +} + +// MockNodeGroupServiceListCall wrap *gomock.Call +type MockNodeGroupServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceListCall) Return(arg0 *v1alpha10.ListNodeGroupsResponse, arg1 error) *MockNodeGroupServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceListCall) Do(f func(context.Context, *v1alpha10.ListNodeGroupsRequest, ...grpc.CallOption) (*v1alpha10.ListNodeGroupsResponse, error)) *MockNodeGroupServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListNodeGroupsRequest, ...grpc.CallOption) (*v1alpha10.ListNodeGroupsResponse, error)) *MockNodeGroupServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockNodeGroupService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockNodeGroupServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockNodeGroupService)(nil).ListOperations), varargs...) + return &MockNodeGroupServiceListOperationsCall{Call: call} +} + +// MockNodeGroupServiceListOperationsCall wrap *gomock.Call +type MockNodeGroupServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockNodeGroupServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockNodeGroupService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateNodeGroupRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockNodeGroupServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockNodeGroupService)(nil).Update), varargs...) + return &MockNodeGroupServiceUpdateCall{Call: call} +} + +// MockNodeGroupServiceUpdateCall wrap *gomock.Call +type MockNodeGroupServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Upgrade mocks base method. +func (m *MockNodeGroupService) Upgrade(arg0 context.Context, arg1 *v1alpha10.UpgradeNodeGroupRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Upgrade", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Upgrade indicates an expected call of Upgrade. +func (mr *MockNodeGroupServiceMockRecorder) Upgrade(arg0, arg1 any, arg2 ...any) *MockNodeGroupServiceUpgradeCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upgrade", reflect.TypeOf((*MockNodeGroupService)(nil).Upgrade), varargs...) + return &MockNodeGroupServiceUpgradeCall{Call: call} +} + +// MockNodeGroupServiceUpgradeCall wrap *gomock.Call +type MockNodeGroupServiceUpgradeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNodeGroupServiceUpgradeCall) Return(arg0 *alphaops.Operation, arg1 error) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNodeGroupServiceUpgradeCall) Do(f func(context.Context, *v1alpha10.UpgradeNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNodeGroupServiceUpgradeCall) DoAndReturn(f func(context.Context, *v1alpha10.UpgradeNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockNodeGroupServiceUpgradeCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/mlflow/v1alpha1/cluster_service.mock.go b/mocks/nebius/msp/mlflow/v1alpha1/cluster_service.mock.go new file mode 100644 index 0000000..3db3071 --- /dev/null +++ b/mocks/nebius/msp/mlflow/v1alpha1/cluster_service.mock.go @@ -0,0 +1,396 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/mlflow/v1alpha1/cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/mlflow/v1alpha1/cluster_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/msp/mlflow/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockClusterService is a mock of ClusterService interface. +type MockClusterService struct { + ctrl *gomock.Controller + recorder *MockClusterServiceMockRecorder +} + +// MockClusterServiceMockRecorder is the mock recorder for MockClusterService. +type MockClusterServiceMockRecorder struct { + mock *MockClusterService +} + +// NewMockClusterService creates a new mock instance. +func NewMockClusterService(ctrl *gomock.Controller) *MockClusterService { + mock := &MockClusterService{ctrl: ctrl} + mock.recorder = &MockClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClusterService) EXPECT() *MockClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockClusterService) Create(arg0 context.Context, arg1 *v1alpha10.CreateClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterService)(nil).Create), varargs...) + return &MockClusterServiceCreateCall{Call: call} +} + +// MockClusterServiceCreateCall wrap *gomock.Call +type MockClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClusterService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterService)(nil).Delete), varargs...) + return &MockClusterServiceDeleteCall{Call: call} +} + +// MockClusterServiceDeleteCall wrap *gomock.Call +type MockClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockClusterService) Filter(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Cluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockClusterService)(nil).Filter), varargs...) + return &MockClusterServiceFilterCall{Call: call} +} + +// MockClusterServiceFilterCall wrap *gomock.Call +type MockClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockClusterService) Get(arg0 context.Context, arg1 *v1alpha10.GetClusterRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterService)(nil).Get), varargs...) + return &MockClusterServiceGetCall{Call: call} +} + +// MockClusterServiceGetCall wrap *gomock.Call +type MockClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetCall) Do(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockClusterService) GetByName(arg0 context.Context, arg1 *v1alpha10.GetClusterByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockClusterService)(nil).GetByName), varargs...) + return &MockClusterServiceGetByNameCall{Call: call} +} + +// MockClusterServiceGetByNameCall wrap *gomock.Call +type MockClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetByNameCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetByNameCall) Do(f func(context.Context, *v1alpha10.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha10.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockClusterService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockClusterService)(nil).GetOperation), varargs...) + return &MockClusterServiceGetOperationCall{Call: call} +} + +// MockClusterServiceGetOperationCall wrap *gomock.Call +type MockClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockClusterService) List(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterService)(nil).List), varargs...) + return &MockClusterServiceListCall{Call: call} +} + +// MockClusterServiceListCall wrap *gomock.Call +type MockClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListCall) Return(arg0 *v1alpha10.ListClustersResponse, arg1 error) *MockClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockClusterService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockClusterService)(nil).ListOperations), varargs...) + return &MockClusterServiceListOperationsCall{Call: call} +} + +// MockClusterServiceListOperationsCall wrap *gomock.Call +type MockClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/postgresql/v1alpha1/cluster_service.mock.go b/mocks/nebius/msp/postgresql/v1alpha1/cluster_service.mock.go new file mode 100644 index 0000000..b4222ea --- /dev/null +++ b/mocks/nebius/msp/postgresql/v1alpha1/cluster_service.mock.go @@ -0,0 +1,441 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/postgresql/v1alpha1/cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/postgresql/v1alpha1/cluster_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/msp/postgresql/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockClusterService is a mock of ClusterService interface. +type MockClusterService struct { + ctrl *gomock.Controller + recorder *MockClusterServiceMockRecorder +} + +// MockClusterServiceMockRecorder is the mock recorder for MockClusterService. +type MockClusterServiceMockRecorder struct { + mock *MockClusterService +} + +// NewMockClusterService creates a new mock instance. +func NewMockClusterService(ctrl *gomock.Controller) *MockClusterService { + mock := &MockClusterService{ctrl: ctrl} + mock.recorder = &MockClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClusterService) EXPECT() *MockClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockClusterService) Create(arg0 context.Context, arg1 *v1alpha10.CreateClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterService)(nil).Create), varargs...) + return &MockClusterServiceCreateCall{Call: call} +} + +// MockClusterServiceCreateCall wrap *gomock.Call +type MockClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClusterService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterService)(nil).Delete), varargs...) + return &MockClusterServiceDeleteCall{Call: call} +} + +// MockClusterServiceDeleteCall wrap *gomock.Call +type MockClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockClusterService) Filter(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Cluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockClusterService)(nil).Filter), varargs...) + return &MockClusterServiceFilterCall{Call: call} +} + +// MockClusterServiceFilterCall wrap *gomock.Call +type MockClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockClusterService) Get(arg0 context.Context, arg1 *v1alpha10.GetClusterRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterService)(nil).Get), varargs...) + return &MockClusterServiceGetCall{Call: call} +} + +// MockClusterServiceGetCall wrap *gomock.Call +type MockClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetCall) Do(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetClusterRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockClusterService) GetByName(arg0 context.Context, arg1 *v1.GetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockClusterService)(nil).GetByName), varargs...) + return &MockClusterServiceGetByNameCall{Call: call} +} + +// MockClusterServiceGetByNameCall wrap *gomock.Call +type MockClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetByNameCall) Return(arg0 *v1alpha10.Cluster, arg1 error) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetByNameCall) Do(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha10.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockClusterService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockClusterService)(nil).GetOperation), varargs...) + return &MockClusterServiceGetOperationCall{Call: call} +} + +// MockClusterServiceGetOperationCall wrap *gomock.Call +type MockClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockClusterService) List(arg0 context.Context, arg1 *v1alpha10.ListClustersRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterService)(nil).List), varargs...) + return &MockClusterServiceListCall{Call: call} +} + +// MockClusterServiceListCall wrap *gomock.Call +type MockClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListCall) Return(arg0 *v1alpha10.ListClustersResponse, arg1 error) *MockClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListCall) Do(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListClustersRequest, ...grpc.CallOption) (*v1alpha10.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockClusterService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockClusterService)(nil).ListOperations), varargs...) + return &MockClusterServiceListOperationsCall{Call: call} +} + +// MockClusterServiceListOperationsCall wrap *gomock.Call +type MockClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockClusterService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateClusterRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterService)(nil).Update), varargs...) + return &MockClusterServiceUpdateCall{Call: call} +} + +// MockClusterServiceUpdateCall wrap *gomock.Call +type MockClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/spark/v1alpha1/cluster_service.mock.go b/mocks/nebius/msp/spark/v1alpha1/cluster_service.mock.go new file mode 100644 index 0000000..67dfa6b --- /dev/null +++ b/mocks/nebius/msp/spark/v1alpha1/cluster_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/spark/v1alpha1/cluster_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/spark/v1alpha1/cluster_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockClusterService is a mock of ClusterService interface. +type MockClusterService struct { + ctrl *gomock.Controller + recorder *MockClusterServiceMockRecorder +} + +// MockClusterServiceMockRecorder is the mock recorder for MockClusterService. +type MockClusterServiceMockRecorder struct { + mock *MockClusterService +} + +// NewMockClusterService creates a new mock instance. +func NewMockClusterService(ctrl *gomock.Controller) *MockClusterService { + mock := &MockClusterService{ctrl: ctrl} + mock.recorder = &MockClusterServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClusterService) EXPECT() *MockClusterServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockClusterService) Create(arg0 context.Context, arg1 *v1alpha1.CreateClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockClusterServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockClusterServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClusterService)(nil).Create), varargs...) + return &MockClusterServiceCreateCall{Call: call} +} + +// MockClusterServiceCreateCall wrap *gomock.Call +type MockClusterServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceCreateCall) Do(f func(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClusterService) Delete(arg0 context.Context, arg1 *v1alpha1.DeleteClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClusterServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockClusterServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClusterService)(nil).Delete), varargs...) + return &MockClusterServiceDeleteCall{Call: call} +} + +// MockClusterServiceDeleteCall wrap *gomock.Call +type MockClusterServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceDeleteCall) Do(f func(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockClusterService) Filter(arg0 context.Context, arg1 *v1alpha1.ListClustersRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Cluster, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockClusterServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockClusterServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockClusterService)(nil).Filter), varargs...) + return &MockClusterServiceFilterCall{Call: call} +} + +// MockClusterServiceFilterCall wrap *gomock.Call +type MockClusterServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error]) *MockClusterServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockClusterService) Get(arg0 context.Context, arg1 *v1alpha1.GetClusterRequest, arg2 ...grpc.CallOption) (*v1alpha1.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockClusterServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClusterService)(nil).Get), varargs...) + return &MockClusterServiceGetCall{Call: call} +} + +// MockClusterServiceGetCall wrap *gomock.Call +type MockClusterServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetCall) Return(arg0 *v1alpha1.Cluster, arg1 error) *MockClusterServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetCall) Do(f func(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error)) *MockClusterServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockClusterService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetClusterByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Cluster, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Cluster) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockClusterServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockClusterService)(nil).GetByName), varargs...) + return &MockClusterServiceGetByNameCall{Call: call} +} + +// MockClusterServiceGetByNameCall wrap *gomock.Call +type MockClusterServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetByNameCall) Return(arg0 *v1alpha1.Cluster, arg1 error) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error)) *MockClusterServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockClusterService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockClusterServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockClusterServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockClusterService)(nil).GetOperation), varargs...) + return &MockClusterServiceGetOperationCall{Call: call} +} + +// MockClusterServiceGetOperationCall wrap *gomock.Call +type MockClusterServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockClusterService) List(arg0 context.Context, arg1 *v1alpha1.ListClustersRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListClustersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockClusterServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockClusterServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClusterService)(nil).List), varargs...) + return &MockClusterServiceListCall{Call: call} +} + +// MockClusterServiceListCall wrap *gomock.Call +type MockClusterServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListCall) Return(arg0 *v1alpha1.ListClustersResponse, arg1 error) *MockClusterServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListCall) Do(f func(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error)) *MockClusterServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockClusterService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockClusterServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockClusterServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockClusterService)(nil).ListOperations), varargs...) + return &MockClusterServiceListOperationsCall{Call: call} +} + +// MockClusterServiceListOperationsCall wrap *gomock.Call +type MockClusterServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockClusterServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockClusterService) Update(arg0 context.Context, arg1 *v1alpha1.UpdateClusterRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockClusterServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockClusterServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClusterService)(nil).Update), varargs...) + return &MockClusterServiceUpdateCall{Call: call} +} + +// MockClusterServiceUpdateCall wrap *gomock.Call +type MockClusterServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClusterServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockClusterServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClusterServiceUpdateCall) Do(f func(context.Context, *v1alpha1.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClusterServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha1.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error)) *MockClusterServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/spark/v1alpha1/job_service.mock.go b/mocks/nebius/msp/spark/v1alpha1/job_service.mock.go new file mode 100644 index 0000000..678cce6 --- /dev/null +++ b/mocks/nebius/msp/spark/v1alpha1/job_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/spark/v1alpha1/job_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/spark/v1alpha1/job_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockJobService is a mock of JobService interface. +type MockJobService struct { + ctrl *gomock.Controller + recorder *MockJobServiceMockRecorder +} + +// MockJobServiceMockRecorder is the mock recorder for MockJobService. +type MockJobServiceMockRecorder struct { + mock *MockJobService +} + +// NewMockJobService creates a new mock instance. +func NewMockJobService(ctrl *gomock.Controller) *MockJobService { + mock := &MockJobService{ctrl: ctrl} + mock.recorder = &MockJobServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockJobService) EXPECT() *MockJobServiceMockRecorder { + return m.recorder +} + +// Cancel mocks base method. +func (m *MockJobService) Cancel(arg0 context.Context, arg1 *v1alpha1.CancelJobRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Cancel", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Cancel indicates an expected call of Cancel. +func (mr *MockJobServiceMockRecorder) Cancel(arg0, arg1 any, arg2 ...any) *MockJobServiceCancelCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockJobService)(nil).Cancel), varargs...) + return &MockJobServiceCancelCall{Call: call} +} + +// MockJobServiceCancelCall wrap *gomock.Call +type MockJobServiceCancelCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceCancelCall) Return(arg0 operations.Operation, arg1 error) *MockJobServiceCancelCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceCancelCall) Do(f func(context.Context, *v1alpha1.CancelJobRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceCancelCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceCancelCall) DoAndReturn(f func(context.Context, *v1alpha1.CancelJobRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceCancelCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Create mocks base method. +func (m *MockJobService) Create(arg0 context.Context, arg1 *v1alpha1.CreateJobRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockJobServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockJobServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockJobService)(nil).Create), varargs...) + return &MockJobServiceCreateCall{Call: call} +} + +// MockJobServiceCreateCall wrap *gomock.Call +type MockJobServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockJobServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceCreateCall) Do(f func(context.Context, *v1alpha1.CreateJobRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha1.CreateJobRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockJobService) Filter(arg0 context.Context, arg1 *v1alpha1.ListJobsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Job, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Job, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockJobServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockJobServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockJobService)(nil).Filter), varargs...) + return &MockJobServiceFilterCall{Call: call} +} + +// MockJobServiceFilterCall wrap *gomock.Call +type MockJobServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Job, error]) *MockJobServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Job, error]) *MockJobServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Job, error]) *MockJobServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockJobService) Get(arg0 context.Context, arg1 *v1alpha1.GetJobRequest, arg2 ...grpc.CallOption) (*v1alpha1.Job, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Job) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockJobServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockJobServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockJobService)(nil).Get), varargs...) + return &MockJobServiceGetCall{Call: call} +} + +// MockJobServiceGetCall wrap *gomock.Call +type MockJobServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceGetCall) Return(arg0 *v1alpha1.Job, arg1 error) *MockJobServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceGetCall) Do(f func(context.Context, *v1alpha1.GetJobRequest, ...grpc.CallOption) (*v1alpha1.Job, error)) *MockJobServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetJobRequest, ...grpc.CallOption) (*v1alpha1.Job, error)) *MockJobServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockJobService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockJobServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockJobServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockJobService)(nil).GetOperation), varargs...) + return &MockJobServiceGetOperationCall{Call: call} +} + +// MockJobServiceGetOperationCall wrap *gomock.Call +type MockJobServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockJobServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockJobServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockJobService) List(arg0 context.Context, arg1 *v1alpha1.ListJobsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListJobsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListJobsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockJobServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockJobServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockJobService)(nil).List), varargs...) + return &MockJobServiceListCall{Call: call} +} + +// MockJobServiceListCall wrap *gomock.Call +type MockJobServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceListCall) Return(arg0 *v1alpha1.ListJobsResponse, arg1 error) *MockJobServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceListCall) Do(f func(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) (*v1alpha1.ListJobsResponse, error)) *MockJobServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) (*v1alpha1.ListJobsResponse, error)) *MockJobServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockJobService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockJobServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockJobServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockJobService)(nil).ListOperations), varargs...) + return &MockJobServiceListOperationsCall{Call: call} +} + +// MockJobServiceListOperationsCall wrap *gomock.Call +type MockJobServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockJobServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockJobServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockJobServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockJobServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockJobServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockJobServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/spark/v1alpha1/session_service.mock.go b/mocks/nebius/msp/spark/v1alpha1/session_service.mock.go new file mode 100644 index 0000000..55df4f0 --- /dev/null +++ b/mocks/nebius/msp/spark/v1alpha1/session_service.mock.go @@ -0,0 +1,396 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/spark/v1alpha1/session_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/spark/v1alpha1/session_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockSessionService is a mock of SessionService interface. +type MockSessionService struct { + ctrl *gomock.Controller + recorder *MockSessionServiceMockRecorder +} + +// MockSessionServiceMockRecorder is the mock recorder for MockSessionService. +type MockSessionServiceMockRecorder struct { + mock *MockSessionService +} + +// NewMockSessionService creates a new mock instance. +func NewMockSessionService(ctrl *gomock.Controller) *MockSessionService { + mock := &MockSessionService{ctrl: ctrl} + mock.recorder = &MockSessionServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSessionService) EXPECT() *MockSessionServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockSessionService) Create(arg0 context.Context, arg1 *v1alpha1.CreateSessionRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockSessionServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockSessionServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSessionService)(nil).Create), varargs...) + return &MockSessionServiceCreateCall{Call: call} +} + +// MockSessionServiceCreateCall wrap *gomock.Call +type MockSessionServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockSessionServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceCreateCall) Do(f func(context.Context, *v1alpha1.CreateSessionRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha1.CreateSessionRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockSessionService) Delete(arg0 context.Context, arg1 *v1alpha1.DeleteSessionRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockSessionServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockSessionServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSessionService)(nil).Delete), varargs...) + return &MockSessionServiceDeleteCall{Call: call} +} + +// MockSessionServiceDeleteCall wrap *gomock.Call +type MockSessionServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockSessionServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceDeleteCall) Do(f func(context.Context, *v1alpha1.DeleteSessionRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha1.DeleteSessionRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockSessionService) Filter(arg0 context.Context, arg1 *v1alpha1.ListSessionsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Session, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Session, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockSessionServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockSessionServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockSessionService)(nil).Filter), varargs...) + return &MockSessionServiceFilterCall{Call: call} +} + +// MockSessionServiceFilterCall wrap *gomock.Call +type MockSessionServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Session, error]) *MockSessionServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Session, error]) *MockSessionServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Session, error]) *MockSessionServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockSessionService) Get(arg0 context.Context, arg1 *v1alpha1.GetSessionRequest, arg2 ...grpc.CallOption) (*v1alpha1.Session, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Session) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockSessionServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockSessionServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSessionService)(nil).Get), varargs...) + return &MockSessionServiceGetCall{Call: call} +} + +// MockSessionServiceGetCall wrap *gomock.Call +type MockSessionServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceGetCall) Return(arg0 *v1alpha1.Session, arg1 error) *MockSessionServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceGetCall) Do(f func(context.Context, *v1alpha1.GetSessionRequest, ...grpc.CallOption) (*v1alpha1.Session, error)) *MockSessionServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetSessionRequest, ...grpc.CallOption) (*v1alpha1.Session, error)) *MockSessionServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockSessionService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetSessionByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Session, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Session) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockSessionServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockSessionServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockSessionService)(nil).GetByName), varargs...) + return &MockSessionServiceGetByNameCall{Call: call} +} + +// MockSessionServiceGetByNameCall wrap *gomock.Call +type MockSessionServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceGetByNameCall) Return(arg0 *v1alpha1.Session, arg1 error) *MockSessionServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetSessionByNameRequest, ...grpc.CallOption) (*v1alpha1.Session, error)) *MockSessionServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetSessionByNameRequest, ...grpc.CallOption) (*v1alpha1.Session, error)) *MockSessionServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockSessionService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockSessionServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockSessionServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockSessionService)(nil).GetOperation), varargs...) + return &MockSessionServiceGetOperationCall{Call: call} +} + +// MockSessionServiceGetOperationCall wrap *gomock.Call +type MockSessionServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockSessionServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockSessionServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockSessionService) List(arg0 context.Context, arg1 *v1alpha1.ListSessionsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListSessionsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListSessionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockSessionServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockSessionServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSessionService)(nil).List), varargs...) + return &MockSessionServiceListCall{Call: call} +} + +// MockSessionServiceListCall wrap *gomock.Call +type MockSessionServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceListCall) Return(arg0 *v1alpha1.ListSessionsResponse, arg1 error) *MockSessionServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceListCall) Do(f func(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) (*v1alpha1.ListSessionsResponse, error)) *MockSessionServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) (*v1alpha1.ListSessionsResponse, error)) *MockSessionServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockSessionService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockSessionServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockSessionServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockSessionService)(nil).ListOperations), varargs...) + return &MockSessionServiceListOperationsCall{Call: call} +} + +// MockSessionServiceListOperationsCall wrap *gomock.Call +type MockSessionServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSessionServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockSessionServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSessionServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockSessionServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSessionServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockSessionServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/v1alpha1/resource/preset_service.mock.go b/mocks/nebius/msp/v1alpha1/resource/preset_service.mock.go new file mode 100644 index 0000000..12836a4 --- /dev/null +++ b/mocks/nebius/msp/v1alpha1/resource/preset_service.mock.go @@ -0,0 +1,130 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/v1alpha1/resource/preset_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/v1alpha1/resource/preset_service.sdk.go -package resource -typed +// + +// Package resource is a generated GoMock package. +package resource + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockPresetService is a mock of PresetService interface. +type MockPresetService struct { + ctrl *gomock.Controller + recorder *MockPresetServiceMockRecorder +} + +// MockPresetServiceMockRecorder is the mock recorder for MockPresetService. +type MockPresetServiceMockRecorder struct { + mock *MockPresetService +} + +// NewMockPresetService creates a new mock instance. +func NewMockPresetService(ctrl *gomock.Controller) *MockPresetService { + mock := &MockPresetService{ctrl: ctrl} + mock.recorder = &MockPresetServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPresetService) EXPECT() *MockPresetServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockPresetService) Filter(arg0 context.Context, arg1 *resource.ListPresetsRequest, arg2 ...grpc.CallOption) iter.Seq2[*resource.Preset, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*resource.Preset, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockPresetServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockPresetServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockPresetService)(nil).Filter), varargs...) + return &MockPresetServiceFilterCall{Call: call} +} + +// MockPresetServiceFilterCall wrap *gomock.Call +type MockPresetServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPresetServiceFilterCall) Return(arg0 iter.Seq2[*resource.Preset, error]) *MockPresetServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPresetServiceFilterCall) Do(f func(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) iter.Seq2[*resource.Preset, error]) *MockPresetServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPresetServiceFilterCall) DoAndReturn(f func(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) iter.Seq2[*resource.Preset, error]) *MockPresetServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockPresetService) List(arg0 context.Context, arg1 *resource.ListPresetsRequest, arg2 ...grpc.CallOption) (*resource.ListPresetsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*resource.ListPresetsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockPresetServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockPresetServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPresetService)(nil).List), varargs...) + return &MockPresetServiceListCall{Call: call} +} + +// MockPresetServiceListCall wrap *gomock.Call +type MockPresetServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPresetServiceListCall) Return(arg0 *resource.ListPresetsResponse, arg1 error) *MockPresetServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPresetServiceListCall) Do(f func(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) (*resource.ListPresetsResponse, error)) *MockPresetServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPresetServiceListCall) DoAndReturn(f func(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) (*resource.ListPresetsResponse, error)) *MockPresetServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/msp/v1alpha1/resource/template_service.mock.go b/mocks/nebius/msp/v1alpha1/resource/template_service.mock.go new file mode 100644 index 0000000..e9ad279 --- /dev/null +++ b/mocks/nebius/msp/v1alpha1/resource/template_service.mock.go @@ -0,0 +1,130 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/msp/v1alpha1/resource/template_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/msp/v1alpha1/resource/template_service.sdk.go -package resource -typed +// + +// Package resource is a generated GoMock package. +package resource + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockTemplateService is a mock of TemplateService interface. +type MockTemplateService struct { + ctrl *gomock.Controller + recorder *MockTemplateServiceMockRecorder +} + +// MockTemplateServiceMockRecorder is the mock recorder for MockTemplateService. +type MockTemplateServiceMockRecorder struct { + mock *MockTemplateService +} + +// NewMockTemplateService creates a new mock instance. +func NewMockTemplateService(ctrl *gomock.Controller) *MockTemplateService { + mock := &MockTemplateService{ctrl: ctrl} + mock.recorder = &MockTemplateServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockTemplateService) EXPECT() *MockTemplateServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockTemplateService) Filter(arg0 context.Context, arg1 *resource.ListTemplatesRequest, arg2 ...grpc.CallOption) iter.Seq2[*resource.Template, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*resource.Template, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockTemplateServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockTemplateServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockTemplateService)(nil).Filter), varargs...) + return &MockTemplateServiceFilterCall{Call: call} +} + +// MockTemplateServiceFilterCall wrap *gomock.Call +type MockTemplateServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTemplateServiceFilterCall) Return(arg0 iter.Seq2[*resource.Template, error]) *MockTemplateServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTemplateServiceFilterCall) Do(f func(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) iter.Seq2[*resource.Template, error]) *MockTemplateServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTemplateServiceFilterCall) DoAndReturn(f func(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) iter.Seq2[*resource.Template, error]) *MockTemplateServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockTemplateService) List(arg0 context.Context, arg1 *resource.ListTemplatesRequest, arg2 ...grpc.CallOption) (*resource.ListTemplatesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*resource.ListTemplatesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockTemplateServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockTemplateServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockTemplateService)(nil).List), varargs...) + return &MockTemplateServiceListCall{Call: call} +} + +// MockTemplateServiceListCall wrap *gomock.Call +type MockTemplateServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTemplateServiceListCall) Return(arg0 *resource.ListTemplatesResponse, arg1 error) *MockTemplateServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTemplateServiceListCall) Do(f func(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) (*resource.ListTemplatesResponse, error)) *MockTemplateServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTemplateServiceListCall) DoAndReturn(f func(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) (*resource.ListTemplatesResponse, error)) *MockTemplateServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/registry/v1/artifact_service.mock.go b/mocks/nebius/registry/v1/artifact_service.mock.go new file mode 100644 index 0000000..9a9812f --- /dev/null +++ b/mocks/nebius/registry/v1/artifact_service.mock.go @@ -0,0 +1,308 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/registry/v1/artifact_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/registry/v1/artifact_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/registry/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockArtifactService is a mock of ArtifactService interface. +type MockArtifactService struct { + ctrl *gomock.Controller + recorder *MockArtifactServiceMockRecorder +} + +// MockArtifactServiceMockRecorder is the mock recorder for MockArtifactService. +type MockArtifactServiceMockRecorder struct { + mock *MockArtifactService +} + +// NewMockArtifactService creates a new mock instance. +func NewMockArtifactService(ctrl *gomock.Controller) *MockArtifactService { + mock := &MockArtifactService{ctrl: ctrl} + mock.recorder = &MockArtifactServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockArtifactService) EXPECT() *MockArtifactServiceMockRecorder { + return m.recorder +} + +// Delete mocks base method. +func (m *MockArtifactService) Delete(arg0 context.Context, arg1 *v10.DeleteArtifactRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockArtifactServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockArtifactServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockArtifactService)(nil).Delete), varargs...) + return &MockArtifactServiceDeleteCall{Call: call} +} + +// MockArtifactServiceDeleteCall wrap *gomock.Call +type MockArtifactServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockArtifactServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceDeleteCall) Do(f func(context.Context, *v10.DeleteArtifactRequest, ...grpc.CallOption) (operations.Operation, error)) *MockArtifactServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteArtifactRequest, ...grpc.CallOption) (operations.Operation, error)) *MockArtifactServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockArtifactService) Filter(arg0 context.Context, arg1 *v10.ListArtifactsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Artifact, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Artifact, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockArtifactServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockArtifactServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockArtifactService)(nil).Filter), varargs...) + return &MockArtifactServiceFilterCall{Call: call} +} + +// MockArtifactServiceFilterCall wrap *gomock.Call +type MockArtifactServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceFilterCall) Return(arg0 iter.Seq2[*v10.Artifact, error]) *MockArtifactServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceFilterCall) Do(f func(context.Context, *v10.ListArtifactsRequest, ...grpc.CallOption) iter.Seq2[*v10.Artifact, error]) *MockArtifactServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListArtifactsRequest, ...grpc.CallOption) iter.Seq2[*v10.Artifact, error]) *MockArtifactServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockArtifactService) Get(arg0 context.Context, arg1 *v10.GetArtifactRequest, arg2 ...grpc.CallOption) (*v10.Artifact, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Artifact) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockArtifactServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockArtifactServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockArtifactService)(nil).Get), varargs...) + return &MockArtifactServiceGetCall{Call: call} +} + +// MockArtifactServiceGetCall wrap *gomock.Call +type MockArtifactServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceGetCall) Return(arg0 *v10.Artifact, arg1 error) *MockArtifactServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceGetCall) Do(f func(context.Context, *v10.GetArtifactRequest, ...grpc.CallOption) (*v10.Artifact, error)) *MockArtifactServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetArtifactRequest, ...grpc.CallOption) (*v10.Artifact, error)) *MockArtifactServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockArtifactService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockArtifactServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockArtifactServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockArtifactService)(nil).GetOperation), varargs...) + return &MockArtifactServiceGetOperationCall{Call: call} +} + +// MockArtifactServiceGetOperationCall wrap *gomock.Call +type MockArtifactServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockArtifactServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockArtifactServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockArtifactServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockArtifactService) List(arg0 context.Context, arg1 *v10.ListArtifactsRequest, arg2 ...grpc.CallOption) (*v10.ListArtifactsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListArtifactsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockArtifactServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockArtifactServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockArtifactService)(nil).List), varargs...) + return &MockArtifactServiceListCall{Call: call} +} + +// MockArtifactServiceListCall wrap *gomock.Call +type MockArtifactServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceListCall) Return(arg0 *v10.ListArtifactsResponse, arg1 error) *MockArtifactServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceListCall) Do(f func(context.Context, *v10.ListArtifactsRequest, ...grpc.CallOption) (*v10.ListArtifactsResponse, error)) *MockArtifactServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceListCall) DoAndReturn(f func(context.Context, *v10.ListArtifactsRequest, ...grpc.CallOption) (*v10.ListArtifactsResponse, error)) *MockArtifactServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockArtifactService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockArtifactServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockArtifactServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockArtifactService)(nil).ListOperations), varargs...) + return &MockArtifactServiceListOperationsCall{Call: call} +} + +// MockArtifactServiceListOperationsCall wrap *gomock.Call +type MockArtifactServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockArtifactServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockArtifactServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockArtifactServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockArtifactServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockArtifactServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockArtifactServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/registry/v1/registry_service.mock.go b/mocks/nebius/registry/v1/registry_service.mock.go new file mode 100644 index 0000000..f4b0593 --- /dev/null +++ b/mocks/nebius/registry/v1/registry_service.mock.go @@ -0,0 +1,396 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/registry/v1/registry_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/registry/v1/registry_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/registry/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockRegistryService is a mock of RegistryService interface. +type MockRegistryService struct { + ctrl *gomock.Controller + recorder *MockRegistryServiceMockRecorder +} + +// MockRegistryServiceMockRecorder is the mock recorder for MockRegistryService. +type MockRegistryServiceMockRecorder struct { + mock *MockRegistryService +} + +// NewMockRegistryService creates a new mock instance. +func NewMockRegistryService(ctrl *gomock.Controller) *MockRegistryService { + mock := &MockRegistryService{ctrl: ctrl} + mock.recorder = &MockRegistryServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRegistryService) EXPECT() *MockRegistryServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockRegistryService) Create(arg0 context.Context, arg1 *v10.CreateRegistryRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockRegistryServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockRegistryServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRegistryService)(nil).Create), varargs...) + return &MockRegistryServiceCreateCall{Call: call} +} + +// MockRegistryServiceCreateCall wrap *gomock.Call +type MockRegistryServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockRegistryServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceCreateCall) Do(f func(context.Context, *v10.CreateRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockRegistryService) Delete(arg0 context.Context, arg1 *v10.DeleteRegistryRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockRegistryServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockRegistryServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRegistryService)(nil).Delete), varargs...) + return &MockRegistryServiceDeleteCall{Call: call} +} + +// MockRegistryServiceDeleteCall wrap *gomock.Call +type MockRegistryServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockRegistryServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceDeleteCall) Do(f func(context.Context, *v10.DeleteRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockRegistryService) Filter(arg0 context.Context, arg1 *v10.ListRegistriesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Registry, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Registry, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockRegistryServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockRegistryServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockRegistryService)(nil).Filter), varargs...) + return &MockRegistryServiceFilterCall{Call: call} +} + +// MockRegistryServiceFilterCall wrap *gomock.Call +type MockRegistryServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceFilterCall) Return(arg0 iter.Seq2[*v10.Registry, error]) *MockRegistryServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceFilterCall) Do(f func(context.Context, *v10.ListRegistriesRequest, ...grpc.CallOption) iter.Seq2[*v10.Registry, error]) *MockRegistryServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListRegistriesRequest, ...grpc.CallOption) iter.Seq2[*v10.Registry, error]) *MockRegistryServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockRegistryService) Get(arg0 context.Context, arg1 *v10.GetRegistryRequest, arg2 ...grpc.CallOption) (*v10.Registry, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Registry) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockRegistryServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockRegistryServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRegistryService)(nil).Get), varargs...) + return &MockRegistryServiceGetCall{Call: call} +} + +// MockRegistryServiceGetCall wrap *gomock.Call +type MockRegistryServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceGetCall) Return(arg0 *v10.Registry, arg1 error) *MockRegistryServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceGetCall) Do(f func(context.Context, *v10.GetRegistryRequest, ...grpc.CallOption) (*v10.Registry, error)) *MockRegistryServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetRegistryRequest, ...grpc.CallOption) (*v10.Registry, error)) *MockRegistryServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockRegistryService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockRegistryServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockRegistryServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockRegistryService)(nil).GetOperation), varargs...) + return &MockRegistryServiceGetOperationCall{Call: call} +} + +// MockRegistryServiceGetOperationCall wrap *gomock.Call +type MockRegistryServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockRegistryServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockRegistryService) List(arg0 context.Context, arg1 *v10.ListRegistriesRequest, arg2 ...grpc.CallOption) (*v10.ListRegistriesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListRegistriesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockRegistryServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockRegistryServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockRegistryService)(nil).List), varargs...) + return &MockRegistryServiceListCall{Call: call} +} + +// MockRegistryServiceListCall wrap *gomock.Call +type MockRegistryServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceListCall) Return(arg0 *v10.ListRegistriesResponse, arg1 error) *MockRegistryServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceListCall) Do(f func(context.Context, *v10.ListRegistriesRequest, ...grpc.CallOption) (*v10.ListRegistriesResponse, error)) *MockRegistryServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceListCall) DoAndReturn(f func(context.Context, *v10.ListRegistriesRequest, ...grpc.CallOption) (*v10.ListRegistriesResponse, error)) *MockRegistryServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockRegistryService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockRegistryServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockRegistryServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockRegistryService)(nil).ListOperations), varargs...) + return &MockRegistryServiceListOperationsCall{Call: call} +} + +// MockRegistryServiceListOperationsCall wrap *gomock.Call +type MockRegistryServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockRegistryServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockRegistryServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockRegistryServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockRegistryService) Update(arg0 context.Context, arg1 *v10.UpdateRegistryRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockRegistryServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockRegistryServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRegistryService)(nil).Update), varargs...) + return &MockRegistryServiceUpdateCall{Call: call} +} + +// MockRegistryServiceUpdateCall wrap *gomock.Call +type MockRegistryServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockRegistryServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockRegistryServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockRegistryServiceUpdateCall) Do(f func(context.Context, *v10.UpdateRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockRegistryServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateRegistryRequest, ...grpc.CallOption) (operations.Operation, error)) *MockRegistryServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/storage/v1/bucket_service.mock.go b/mocks/nebius/storage/v1/bucket_service.mock.go new file mode 100644 index 0000000..35331ba --- /dev/null +++ b/mocks/nebius/storage/v1/bucket_service.mock.go @@ -0,0 +1,528 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/storage/v1/bucket_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/storage/v1/bucket_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/storage/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockBucketService is a mock of BucketService interface. +type MockBucketService struct { + ctrl *gomock.Controller + recorder *MockBucketServiceMockRecorder +} + +// MockBucketServiceMockRecorder is the mock recorder for MockBucketService. +type MockBucketServiceMockRecorder struct { + mock *MockBucketService +} + +// NewMockBucketService creates a new mock instance. +func NewMockBucketService(ctrl *gomock.Controller) *MockBucketService { + mock := &MockBucketService{ctrl: ctrl} + mock.recorder = &MockBucketServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBucketService) EXPECT() *MockBucketServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockBucketService) Create(arg0 context.Context, arg1 *v10.CreateBucketRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockBucketServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockBucketServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockBucketService)(nil).Create), varargs...) + return &MockBucketServiceCreateCall{Call: call} +} + +// MockBucketServiceCreateCall wrap *gomock.Call +type MockBucketServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceCreateCall) Do(f func(context.Context, *v10.CreateBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockBucketService) Delete(arg0 context.Context, arg1 *v10.DeleteBucketRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockBucketServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockBucketServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockBucketService)(nil).Delete), varargs...) + return &MockBucketServiceDeleteCall{Call: call} +} + +// MockBucketServiceDeleteCall wrap *gomock.Call +type MockBucketServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceDeleteCall) Do(f func(context.Context, *v10.DeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockBucketService) Filter(arg0 context.Context, arg1 *v10.ListBucketsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Bucket, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Bucket, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockBucketServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockBucketServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockBucketService)(nil).Filter), varargs...) + return &MockBucketServiceFilterCall{Call: call} +} + +// MockBucketServiceFilterCall wrap *gomock.Call +type MockBucketServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceFilterCall) Return(arg0 iter.Seq2[*v10.Bucket, error]) *MockBucketServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceFilterCall) Do(f func(context.Context, *v10.ListBucketsRequest, ...grpc.CallOption) iter.Seq2[*v10.Bucket, error]) *MockBucketServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListBucketsRequest, ...grpc.CallOption) iter.Seq2[*v10.Bucket, error]) *MockBucketServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockBucketService) Get(arg0 context.Context, arg1 *v10.GetBucketRequest, arg2 ...grpc.CallOption) (*v10.Bucket, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Bucket) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockBucketServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockBucketServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockBucketService)(nil).Get), varargs...) + return &MockBucketServiceGetCall{Call: call} +} + +// MockBucketServiceGetCall wrap *gomock.Call +type MockBucketServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceGetCall) Return(arg0 *v10.Bucket, arg1 error) *MockBucketServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceGetCall) Do(f func(context.Context, *v10.GetBucketRequest, ...grpc.CallOption) (*v10.Bucket, error)) *MockBucketServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetBucketRequest, ...grpc.CallOption) (*v10.Bucket, error)) *MockBucketServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockBucketService) GetByName(arg0 context.Context, arg1 *v10.GetBucketByNameRequest, arg2 ...grpc.CallOption) (*v10.Bucket, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Bucket) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockBucketServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockBucketServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockBucketService)(nil).GetByName), varargs...) + return &MockBucketServiceGetByNameCall{Call: call} +} + +// MockBucketServiceGetByNameCall wrap *gomock.Call +type MockBucketServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceGetByNameCall) Return(arg0 *v10.Bucket, arg1 error) *MockBucketServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceGetByNameCall) Do(f func(context.Context, *v10.GetBucketByNameRequest, ...grpc.CallOption) (*v10.Bucket, error)) *MockBucketServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceGetByNameCall) DoAndReturn(f func(context.Context, *v10.GetBucketByNameRequest, ...grpc.CallOption) (*v10.Bucket, error)) *MockBucketServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockBucketService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockBucketServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockBucketServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockBucketService)(nil).GetOperation), varargs...) + return &MockBucketServiceGetOperationCall{Call: call} +} + +// MockBucketServiceGetOperationCall wrap *gomock.Call +type MockBucketServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockBucketService) List(arg0 context.Context, arg1 *v10.ListBucketsRequest, arg2 ...grpc.CallOption) (*v10.ListBucketsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListBucketsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockBucketServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockBucketServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockBucketService)(nil).List), varargs...) + return &MockBucketServiceListCall{Call: call} +} + +// MockBucketServiceListCall wrap *gomock.Call +type MockBucketServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceListCall) Return(arg0 *v10.ListBucketsResponse, arg1 error) *MockBucketServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceListCall) Do(f func(context.Context, *v10.ListBucketsRequest, ...grpc.CallOption) (*v10.ListBucketsResponse, error)) *MockBucketServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceListCall) DoAndReturn(f func(context.Context, *v10.ListBucketsRequest, ...grpc.CallOption) (*v10.ListBucketsResponse, error)) *MockBucketServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockBucketService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockBucketServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockBucketServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockBucketService)(nil).ListOperations), varargs...) + return &MockBucketServiceListOperationsCall{Call: call} +} + +// MockBucketServiceListOperationsCall wrap *gomock.Call +type MockBucketServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockBucketServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockBucketServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockBucketServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Purge mocks base method. +func (m *MockBucketService) Purge(arg0 context.Context, arg1 *v10.PurgeBucketRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Purge", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Purge indicates an expected call of Purge. +func (mr *MockBucketServiceMockRecorder) Purge(arg0, arg1 any, arg2 ...any) *MockBucketServicePurgeCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Purge", reflect.TypeOf((*MockBucketService)(nil).Purge), varargs...) + return &MockBucketServicePurgeCall{Call: call} +} + +// MockBucketServicePurgeCall wrap *gomock.Call +type MockBucketServicePurgeCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServicePurgeCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServicePurgeCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServicePurgeCall) Do(f func(context.Context, *v10.PurgeBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServicePurgeCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServicePurgeCall) DoAndReturn(f func(context.Context, *v10.PurgeBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServicePurgeCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Undelete mocks base method. +func (m *MockBucketService) Undelete(arg0 context.Context, arg1 *v10.UndeleteBucketRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Undelete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Undelete indicates an expected call of Undelete. +func (mr *MockBucketServiceMockRecorder) Undelete(arg0, arg1 any, arg2 ...any) *MockBucketServiceUndeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Undelete", reflect.TypeOf((*MockBucketService)(nil).Undelete), varargs...) + return &MockBucketServiceUndeleteCall{Call: call} +} + +// MockBucketServiceUndeleteCall wrap *gomock.Call +type MockBucketServiceUndeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceUndeleteCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServiceUndeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceUndeleteCall) Do(f func(context.Context, *v10.UndeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceUndeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceUndeleteCall) DoAndReturn(f func(context.Context, *v10.UndeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceUndeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockBucketService) Update(arg0 context.Context, arg1 *v10.UpdateBucketRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockBucketServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockBucketServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockBucketService)(nil).Update), varargs...) + return &MockBucketServiceUpdateCall{Call: call} +} + +// MockBucketServiceUpdateCall wrap *gomock.Call +type MockBucketServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockBucketServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockBucketServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockBucketServiceUpdateCall) Do(f func(context.Context, *v10.UpdateBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockBucketServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateBucketRequest, ...grpc.CallOption) (operations.Operation, error)) *MockBucketServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1/allocation_service.mock.go b/mocks/nebius/vpc/v1/allocation_service.mock.go new file mode 100644 index 0000000..beaa344 --- /dev/null +++ b/mocks/nebius/vpc/v1/allocation_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1/allocation_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1/allocation_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockAllocationService is a mock of AllocationService interface. +type MockAllocationService struct { + ctrl *gomock.Controller + recorder *MockAllocationServiceMockRecorder +} + +// MockAllocationServiceMockRecorder is the mock recorder for MockAllocationService. +type MockAllocationServiceMockRecorder struct { + mock *MockAllocationService +} + +// NewMockAllocationService creates a new mock instance. +func NewMockAllocationService(ctrl *gomock.Controller) *MockAllocationService { + mock := &MockAllocationService{ctrl: ctrl} + mock.recorder = &MockAllocationServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAllocationService) EXPECT() *MockAllocationServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockAllocationService) Create(arg0 context.Context, arg1 *v10.CreateAllocationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockAllocationServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockAllocationServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAllocationService)(nil).Create), varargs...) + return &MockAllocationServiceCreateCall{Call: call} +} + +// MockAllocationServiceCreateCall wrap *gomock.Call +type MockAllocationServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceCreateCall) Return(arg0 operations.Operation, arg1 error) *MockAllocationServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceCreateCall) Do(f func(context.Context, *v10.CreateAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceCreateCall) DoAndReturn(f func(context.Context, *v10.CreateAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockAllocationService) Delete(arg0 context.Context, arg1 *v10.DeleteAllocationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockAllocationServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockAllocationServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockAllocationService)(nil).Delete), varargs...) + return &MockAllocationServiceDeleteCall{Call: call} +} + +// MockAllocationServiceDeleteCall wrap *gomock.Call +type MockAllocationServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceDeleteCall) Return(arg0 operations.Operation, arg1 error) *MockAllocationServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceDeleteCall) Do(f func(context.Context, *v10.DeleteAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceDeleteCall) DoAndReturn(f func(context.Context, *v10.DeleteAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockAllocationService) Filter(arg0 context.Context, arg1 *v10.ListAllocationsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Allocation, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Allocation, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockAllocationServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockAllocationServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockAllocationService)(nil).Filter), varargs...) + return &MockAllocationServiceFilterCall{Call: call} +} + +// MockAllocationServiceFilterCall wrap *gomock.Call +type MockAllocationServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceFilterCall) Return(arg0 iter.Seq2[*v10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceFilterCall) Do(f func(context.Context, *v10.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockAllocationService) Get(arg0 context.Context, arg1 *v10.GetAllocationRequest, arg2 ...grpc.CallOption) (*v10.Allocation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Allocation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockAllocationServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAllocationService)(nil).Get), varargs...) + return &MockAllocationServiceGetCall{Call: call} +} + +// MockAllocationServiceGetCall wrap *gomock.Call +type MockAllocationServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetCall) Return(arg0 *v10.Allocation, arg1 error) *MockAllocationServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetCall) Do(f func(context.Context, *v10.GetAllocationRequest, ...grpc.CallOption) (*v10.Allocation, error)) *MockAllocationServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetAllocationRequest, ...grpc.CallOption) (*v10.Allocation, error)) *MockAllocationServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockAllocationService) GetByName(arg0 context.Context, arg1 *v10.GetAllocationByNameRequest, arg2 ...grpc.CallOption) (*v10.Allocation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Allocation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockAllocationServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockAllocationService)(nil).GetByName), varargs...) + return &MockAllocationServiceGetByNameCall{Call: call} +} + +// MockAllocationServiceGetByNameCall wrap *gomock.Call +type MockAllocationServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetByNameCall) Return(arg0 *v10.Allocation, arg1 error) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetByNameCall) Do(f func(context.Context, *v10.GetAllocationByNameRequest, ...grpc.CallOption) (*v10.Allocation, error)) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetByNameCall) DoAndReturn(f func(context.Context, *v10.GetAllocationByNameRequest, ...grpc.CallOption) (*v10.Allocation, error)) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockAllocationService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockAllocationServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAllocationService)(nil).GetOperation), varargs...) + return &MockAllocationServiceGetOperationCall{Call: call} +} + +// MockAllocationServiceGetOperationCall wrap *gomock.Call +type MockAllocationServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockAllocationService) List(arg0 context.Context, arg1 *v10.ListAllocationsRequest, arg2 ...grpc.CallOption) (*v10.ListAllocationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListAllocationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockAllocationServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockAllocationServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAllocationService)(nil).List), varargs...) + return &MockAllocationServiceListCall{Call: call} +} + +// MockAllocationServiceListCall wrap *gomock.Call +type MockAllocationServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceListCall) Return(arg0 *v10.ListAllocationsResponse, arg1 error) *MockAllocationServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceListCall) Do(f func(context.Context, *v10.ListAllocationsRequest, ...grpc.CallOption) (*v10.ListAllocationsResponse, error)) *MockAllocationServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceListCall) DoAndReturn(f func(context.Context, *v10.ListAllocationsRequest, ...grpc.CallOption) (*v10.ListAllocationsResponse, error)) *MockAllocationServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockAllocationService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockAllocationServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockAllocationServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockAllocationService)(nil).ListOperations), varargs...) + return &MockAllocationServiceListOperationsCall{Call: call} +} + +// MockAllocationServiceListOperationsCall wrap *gomock.Call +type MockAllocationServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockAllocationService) Update(arg0 context.Context, arg1 *v10.UpdateAllocationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockAllocationServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockAllocationServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAllocationService)(nil).Update), varargs...) + return &MockAllocationServiceUpdateCall{Call: call} +} + +// MockAllocationServiceUpdateCall wrap *gomock.Call +type MockAllocationServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockAllocationServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceUpdateCall) Do(f func(context.Context, *v10.UpdateAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdateAllocationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockAllocationServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1/network_service.mock.go b/mocks/nebius/vpc/v1/network_service.mock.go new file mode 100644 index 0000000..b309eb2 --- /dev/null +++ b/mocks/nebius/vpc/v1/network_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1/network_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1/network_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockNetworkService is a mock of NetworkService interface. +type MockNetworkService struct { + ctrl *gomock.Controller + recorder *MockNetworkServiceMockRecorder +} + +// MockNetworkServiceMockRecorder is the mock recorder for MockNetworkService. +type MockNetworkServiceMockRecorder struct { + mock *MockNetworkService +} + +// NewMockNetworkService creates a new mock instance. +func NewMockNetworkService(ctrl *gomock.Controller) *MockNetworkService { + mock := &MockNetworkService{ctrl: ctrl} + mock.recorder = &MockNetworkServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockNetworkService) EXPECT() *MockNetworkServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockNetworkService) Filter(arg0 context.Context, arg1 *v1.ListNetworksRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.Network, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.Network, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockNetworkServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockNetworkServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockNetworkService)(nil).Filter), varargs...) + return &MockNetworkServiceFilterCall{Call: call} +} + +// MockNetworkServiceFilterCall wrap *gomock.Call +type MockNetworkServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceFilterCall) Return(arg0 iter.Seq2[*v1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceFilterCall) Do(f func(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockNetworkService) Get(arg0 context.Context, arg1 *v1.GetNetworkRequest, arg2 ...grpc.CallOption) (*v1.Network, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.Network) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockNetworkServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockNetworkServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNetworkService)(nil).Get), varargs...) + return &MockNetworkServiceGetCall{Call: call} +} + +// MockNetworkServiceGetCall wrap *gomock.Call +type MockNetworkServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetCall) Return(arg0 *v1.Network, arg1 error) *MockNetworkServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetCall) Do(f func(context.Context, *v1.GetNetworkRequest, ...grpc.CallOption) (*v1.Network, error)) *MockNetworkServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetNetworkRequest, ...grpc.CallOption) (*v1.Network, error)) *MockNetworkServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockNetworkService) GetByName(arg0 context.Context, arg1 *v1.GetNetworkByNameRequest, arg2 ...grpc.CallOption) (*v1.Network, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1.Network) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockNetworkServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockNetworkServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNetworkService)(nil).GetByName), varargs...) + return &MockNetworkServiceGetByNameCall{Call: call} +} + +// MockNetworkServiceGetByNameCall wrap *gomock.Call +type MockNetworkServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetByNameCall) Return(arg0 *v1.Network, arg1 error) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetByNameCall) Do(f func(context.Context, *v1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1.Network, error)) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1.Network, error)) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockNetworkService) List(arg0 context.Context, arg1 *v1.ListNetworksRequest, arg2 ...grpc.CallOption) (*v1.ListNetworksResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListNetworksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockNetworkServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockNetworkServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNetworkService)(nil).List), varargs...) + return &MockNetworkServiceListCall{Call: call} +} + +// MockNetworkServiceListCall wrap *gomock.Call +type MockNetworkServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceListCall) Return(arg0 *v1.ListNetworksResponse, arg1 error) *MockNetworkServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceListCall) Do(f func(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) (*v1.ListNetworksResponse, error)) *MockNetworkServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceListCall) DoAndReturn(f func(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) (*v1.ListNetworksResponse, error)) *MockNetworkServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1/pool_service.mock.go b/mocks/nebius/vpc/v1/pool_service.mock.go new file mode 100644 index 0000000..f9e39c5 --- /dev/null +++ b/mocks/nebius/vpc/v1/pool_service.mock.go @@ -0,0 +1,352 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1/pool_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1/pool_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v10 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockPoolService is a mock of PoolService interface. +type MockPoolService struct { + ctrl *gomock.Controller + recorder *MockPoolServiceMockRecorder +} + +// MockPoolServiceMockRecorder is the mock recorder for MockPoolService. +type MockPoolServiceMockRecorder struct { + mock *MockPoolService +} + +// NewMockPoolService creates a new mock instance. +func NewMockPoolService(ctrl *gomock.Controller) *MockPoolService { + mock := &MockPoolService{ctrl: ctrl} + mock.recorder = &MockPoolServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPoolService) EXPECT() *MockPoolServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockPoolService) Filter(arg0 context.Context, arg1 *v10.ListPoolsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v10.Pool, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v10.Pool, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockPoolServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockPoolServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockPoolService)(nil).Filter), varargs...) + return &MockPoolServiceFilterCall{Call: call} +} + +// MockPoolServiceFilterCall wrap *gomock.Call +type MockPoolServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceFilterCall) Return(arg0 iter.Seq2[*v10.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceFilterCall) Do(f func(context.Context, *v10.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v10.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceFilterCall) DoAndReturn(f func(context.Context, *v10.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v10.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockPoolService) Get(arg0 context.Context, arg1 *v10.GetPoolRequest, arg2 ...grpc.CallOption) (*v10.Pool, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v10.Pool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockPoolServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockPoolServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPoolService)(nil).Get), varargs...) + return &MockPoolServiceGetCall{Call: call} +} + +// MockPoolServiceGetCall wrap *gomock.Call +type MockPoolServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceGetCall) Return(arg0 *v10.Pool, arg1 error) *MockPoolServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceGetCall) Do(f func(context.Context, *v10.GetPoolRequest, ...grpc.CallOption) (*v10.Pool, error)) *MockPoolServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceGetCall) DoAndReturn(f func(context.Context, *v10.GetPoolRequest, ...grpc.CallOption) (*v10.Pool, error)) *MockPoolServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockPoolService) GetByName(arg0 context.Context, arg1 *v10.GetPoolByNameRequest, arg2 ...grpc.CallOption) (*v10.Pool, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v10.Pool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockPoolServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockPoolServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPoolService)(nil).GetByName), varargs...) + return &MockPoolServiceGetByNameCall{Call: call} +} + +// MockPoolServiceGetByNameCall wrap *gomock.Call +type MockPoolServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceGetByNameCall) Return(arg0 *v10.Pool, arg1 error) *MockPoolServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceGetByNameCall) Do(f func(context.Context, *v10.GetPoolByNameRequest, ...grpc.CallOption) (*v10.Pool, error)) *MockPoolServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceGetByNameCall) DoAndReturn(f func(context.Context, *v10.GetPoolByNameRequest, ...grpc.CallOption) (*v10.Pool, error)) *MockPoolServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockPoolService) GetOperation(arg0 context.Context, arg1 *v1.GetOperationRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockPoolServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockPoolServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockPoolService)(nil).GetOperation), varargs...) + return &MockPoolServiceGetOperationCall{Call: call} +} + +// MockPoolServiceGetOperationCall wrap *gomock.Call +type MockPoolServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceGetOperationCall) Return(arg0 operations.Operation, arg1 error) *MockPoolServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceGetOperationCall) Do(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockPoolServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error)) *MockPoolServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockPoolService) List(arg0 context.Context, arg1 *v10.ListPoolsRequest, arg2 ...grpc.CallOption) (*v10.ListPoolsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v10.ListPoolsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockPoolServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockPoolServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPoolService)(nil).List), varargs...) + return &MockPoolServiceListCall{Call: call} +} + +// MockPoolServiceListCall wrap *gomock.Call +type MockPoolServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceListCall) Return(arg0 *v10.ListPoolsResponse, arg1 error) *MockPoolServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceListCall) Do(f func(context.Context, *v10.ListPoolsRequest, ...grpc.CallOption) (*v10.ListPoolsResponse, error)) *MockPoolServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceListCall) DoAndReturn(f func(context.Context, *v10.ListPoolsRequest, ...grpc.CallOption) (*v10.ListPoolsResponse, error)) *MockPoolServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockPoolService) ListOperations(arg0 context.Context, arg1 *v1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockPoolServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockPoolServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockPoolService)(nil).ListOperations), varargs...) + return &MockPoolServiceListOperationsCall{Call: call} +} + +// MockPoolServiceListOperationsCall wrap *gomock.Call +type MockPoolServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceListOperationsCall) Return(arg0 *v1.ListOperationsResponse, arg1 error) *MockPoolServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceListOperationsCall) Do(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockPoolServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error)) *MockPoolServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockPoolService) Update(arg0 context.Context, arg1 *v10.UpdatePoolRequest, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockPoolServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockPoolServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPoolService)(nil).Update), varargs...) + return &MockPoolServiceUpdateCall{Call: call} +} + +// MockPoolServiceUpdateCall wrap *gomock.Call +type MockPoolServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceUpdateCall) Return(arg0 operations.Operation, arg1 error) *MockPoolServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceUpdateCall) Do(f func(context.Context, *v10.UpdatePoolRequest, ...grpc.CallOption) (operations.Operation, error)) *MockPoolServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceUpdateCall) DoAndReturn(f func(context.Context, *v10.UpdatePoolRequest, ...grpc.CallOption) (operations.Operation, error)) *MockPoolServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1/subnet_service.mock.go b/mocks/nebius/vpc/v1/subnet_service.mock.go new file mode 100644 index 0000000..20185f1 --- /dev/null +++ b/mocks/nebius/vpc/v1/subnet_service.mock.go @@ -0,0 +1,262 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1/subnet_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1/subnet_service.sdk.go -package v1 -typed +// + +// Package v1 is a generated GoMock package. +package v1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockSubnetService is a mock of SubnetService interface. +type MockSubnetService struct { + ctrl *gomock.Controller + recorder *MockSubnetServiceMockRecorder +} + +// MockSubnetServiceMockRecorder is the mock recorder for MockSubnetService. +type MockSubnetServiceMockRecorder struct { + mock *MockSubnetService +} + +// NewMockSubnetService creates a new mock instance. +func NewMockSubnetService(ctrl *gomock.Controller) *MockSubnetService { + mock := &MockSubnetService{ctrl: ctrl} + mock.recorder = &MockSubnetServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSubnetService) EXPECT() *MockSubnetServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockSubnetService) Filter(arg0 context.Context, arg1 *v1.ListSubnetsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1.Subnet, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1.Subnet, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockSubnetServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockSubnetServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockSubnetService)(nil).Filter), varargs...) + return &MockSubnetServiceFilterCall{Call: call} +} + +// MockSubnetServiceFilterCall wrap *gomock.Call +type MockSubnetServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceFilterCall) Return(arg0 iter.Seq2[*v1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceFilterCall) Do(f func(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceFilterCall) DoAndReturn(f func(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockSubnetService) Get(arg0 context.Context, arg1 *v1.GetSubnetRequest, arg2 ...grpc.CallOption) (*v1.Subnet, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1.Subnet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockSubnetServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockSubnetServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSubnetService)(nil).Get), varargs...) + return &MockSubnetServiceGetCall{Call: call} +} + +// MockSubnetServiceGetCall wrap *gomock.Call +type MockSubnetServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceGetCall) Return(arg0 *v1.Subnet, arg1 error) *MockSubnetServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceGetCall) Do(f func(context.Context, *v1.GetSubnetRequest, ...grpc.CallOption) (*v1.Subnet, error)) *MockSubnetServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceGetCall) DoAndReturn(f func(context.Context, *v1.GetSubnetRequest, ...grpc.CallOption) (*v1.Subnet, error)) *MockSubnetServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockSubnetService) GetByName(arg0 context.Context, arg1 *v1.GetSubnetByNameRequest, arg2 ...grpc.CallOption) (*v1.Subnet, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1.Subnet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockSubnetServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockSubnetServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockSubnetService)(nil).GetByName), varargs...) + return &MockSubnetServiceGetByNameCall{Call: call} +} + +// MockSubnetServiceGetByNameCall wrap *gomock.Call +type MockSubnetServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceGetByNameCall) Return(arg0 *v1.Subnet, arg1 error) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceGetByNameCall) Do(f func(context.Context, *v1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1.Subnet, error)) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1.Subnet, error)) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockSubnetService) List(arg0 context.Context, arg1 *v1.ListSubnetsRequest, arg2 ...grpc.CallOption) (*v1.ListSubnetsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1.ListSubnetsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockSubnetServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockSubnetServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSubnetService)(nil).List), varargs...) + return &MockSubnetServiceListCall{Call: call} +} + +// MockSubnetServiceListCall wrap *gomock.Call +type MockSubnetServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceListCall) Return(arg0 *v1.ListSubnetsResponse, arg1 error) *MockSubnetServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceListCall) Do(f func(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error)) *MockSubnetServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceListCall) DoAndReturn(f func(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error)) *MockSubnetServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListByNetwork mocks base method. +func (m *MockSubnetService) ListByNetwork(arg0 context.Context, arg1 *v1.ListSubnetsByNetworkRequest, arg2 ...grpc.CallOption) (*v1.ListSubnetsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByNetwork", varargs...) + ret0, _ := ret[0].(*v1.ListSubnetsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByNetwork indicates an expected call of ListByNetwork. +func (mr *MockSubnetServiceMockRecorder) ListByNetwork(arg0, arg1 any, arg2 ...any) *MockSubnetServiceListByNetworkCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByNetwork", reflect.TypeOf((*MockSubnetService)(nil).ListByNetwork), varargs...) + return &MockSubnetServiceListByNetworkCall{Call: call} +} + +// MockSubnetServiceListByNetworkCall wrap *gomock.Call +type MockSubnetServiceListByNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceListByNetworkCall) Return(arg0 *v1.ListSubnetsResponse, arg1 error) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceListByNetworkCall) Do(f func(context.Context, *v1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error)) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceListByNetworkCall) DoAndReturn(f func(context.Context, *v1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error)) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1alpha1/allocation_service.mock.go b/mocks/nebius/vpc/v1alpha1/allocation_service.mock.go new file mode 100644 index 0000000..aa8a2e9 --- /dev/null +++ b/mocks/nebius/vpc/v1alpha1/allocation_service.mock.go @@ -0,0 +1,440 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1alpha1/allocation_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1alpha1/allocation_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha10 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockAllocationService is a mock of AllocationService interface. +type MockAllocationService struct { + ctrl *gomock.Controller + recorder *MockAllocationServiceMockRecorder +} + +// MockAllocationServiceMockRecorder is the mock recorder for MockAllocationService. +type MockAllocationServiceMockRecorder struct { + mock *MockAllocationService +} + +// NewMockAllocationService creates a new mock instance. +func NewMockAllocationService(ctrl *gomock.Controller) *MockAllocationService { + mock := &MockAllocationService{ctrl: ctrl} + mock.recorder = &MockAllocationServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAllocationService) EXPECT() *MockAllocationServiceMockRecorder { + return m.recorder +} + +// Create mocks base method. +func (m *MockAllocationService) Create(arg0 context.Context, arg1 *v1alpha10.CreateAllocationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Create", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Create indicates an expected call of Create. +func (mr *MockAllocationServiceMockRecorder) Create(arg0, arg1 any, arg2 ...any) *MockAllocationServiceCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockAllocationService)(nil).Create), varargs...) + return &MockAllocationServiceCreateCall{Call: call} +} + +// MockAllocationServiceCreateCall wrap *gomock.Call +type MockAllocationServiceCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceCreateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockAllocationServiceCreateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceCreateCall) Do(f func(context.Context, *v1alpha10.CreateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceCreateCall) DoAndReturn(f func(context.Context, *v1alpha10.CreateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockAllocationService) Delete(arg0 context.Context, arg1 *v1alpha10.DeleteAllocationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Delete", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Delete indicates an expected call of Delete. +func (mr *MockAllocationServiceMockRecorder) Delete(arg0, arg1 any, arg2 ...any) *MockAllocationServiceDeleteCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockAllocationService)(nil).Delete), varargs...) + return &MockAllocationServiceDeleteCall{Call: call} +} + +// MockAllocationServiceDeleteCall wrap *gomock.Call +type MockAllocationServiceDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceDeleteCall) Return(arg0 *alphaops.Operation, arg1 error) *MockAllocationServiceDeleteCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceDeleteCall) Do(f func(context.Context, *v1alpha10.DeleteAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceDeleteCall) DoAndReturn(f func(context.Context, *v1alpha10.DeleteAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Filter mocks base method. +func (m *MockAllocationService) Filter(arg0 context.Context, arg1 *v1alpha10.ListAllocationsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha10.Allocation, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha10.Allocation, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockAllocationServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockAllocationServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockAllocationService)(nil).Filter), varargs...) + return &MockAllocationServiceFilterCall{Call: call} +} + +// MockAllocationServiceFilterCall wrap *gomock.Call +type MockAllocationServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceFilterCall) Do(f func(context.Context, *v1alpha10.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha10.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha10.Allocation, error]) *MockAllocationServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockAllocationService) Get(arg0 context.Context, arg1 *v1alpha10.GetAllocationRequest, arg2 ...grpc.CallOption) (*v1alpha10.Allocation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha10.Allocation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockAllocationServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockAllocationService)(nil).Get), varargs...) + return &MockAllocationServiceGetCall{Call: call} +} + +// MockAllocationServiceGetCall wrap *gomock.Call +type MockAllocationServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetCall) Return(arg0 *v1alpha10.Allocation, arg1 error) *MockAllocationServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetCall) Do(f func(context.Context, *v1alpha10.GetAllocationRequest, ...grpc.CallOption) (*v1alpha10.Allocation, error)) *MockAllocationServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha10.GetAllocationRequest, ...grpc.CallOption) (*v1alpha10.Allocation, error)) *MockAllocationServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockAllocationService) GetByName(arg0 context.Context, arg1 *v1alpha10.GetAllocationByNameRequest, arg2 ...grpc.CallOption) (*v1alpha10.Allocation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha10.Allocation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockAllocationServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockAllocationService)(nil).GetByName), varargs...) + return &MockAllocationServiceGetByNameCall{Call: call} +} + +// MockAllocationServiceGetByNameCall wrap *gomock.Call +type MockAllocationServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetByNameCall) Return(arg0 *v1alpha10.Allocation, arg1 error) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetByNameCall) Do(f func(context.Context, *v1alpha10.GetAllocationByNameRequest, ...grpc.CallOption) (*v1alpha10.Allocation, error)) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha10.GetAllocationByNameRequest, ...grpc.CallOption) (*v1alpha10.Allocation, error)) *MockAllocationServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetOperation mocks base method. +func (m *MockAllocationService) GetOperation(arg0 context.Context, arg1 *v1alpha1.GetOperationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetOperation", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperation indicates an expected call of GetOperation. +func (mr *MockAllocationServiceMockRecorder) GetOperation(arg0, arg1 any, arg2 ...any) *MockAllocationServiceGetOperationCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperation", reflect.TypeOf((*MockAllocationService)(nil).GetOperation), varargs...) + return &MockAllocationServiceGetOperationCall{Call: call} +} + +// MockAllocationServiceGetOperationCall wrap *gomock.Call +type MockAllocationServiceGetOperationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceGetOperationCall) Return(arg0 *alphaops.Operation, arg1 error) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceGetOperationCall) Do(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceGetOperationCall) DoAndReturn(f func(context.Context, *v1alpha1.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceGetOperationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockAllocationService) List(arg0 context.Context, arg1 *v1alpha10.ListAllocationsRequest, arg2 ...grpc.CallOption) (*v1alpha10.ListAllocationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha10.ListAllocationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockAllocationServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockAllocationServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockAllocationService)(nil).List), varargs...) + return &MockAllocationServiceListCall{Call: call} +} + +// MockAllocationServiceListCall wrap *gomock.Call +type MockAllocationServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceListCall) Return(arg0 *v1alpha10.ListAllocationsResponse, arg1 error) *MockAllocationServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceListCall) Do(f func(context.Context, *v1alpha10.ListAllocationsRequest, ...grpc.CallOption) (*v1alpha10.ListAllocationsResponse, error)) *MockAllocationServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceListCall) DoAndReturn(f func(context.Context, *v1alpha10.ListAllocationsRequest, ...grpc.CallOption) (*v1alpha10.ListAllocationsResponse, error)) *MockAllocationServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListOperations mocks base method. +func (m *MockAllocationService) ListOperations(arg0 context.Context, arg1 *v1alpha1.ListOperationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListOperations", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListOperationsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListOperations indicates an expected call of ListOperations. +func (mr *MockAllocationServiceMockRecorder) ListOperations(arg0, arg1 any, arg2 ...any) *MockAllocationServiceListOperationsCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperations", reflect.TypeOf((*MockAllocationService)(nil).ListOperations), varargs...) + return &MockAllocationServiceListOperationsCall{Call: call} +} + +// MockAllocationServiceListOperationsCall wrap *gomock.Call +type MockAllocationServiceListOperationsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceListOperationsCall) Return(arg0 *v1alpha1.ListOperationsResponse, arg1 error) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceListOperationsCall) Do(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceListOperationsCall) DoAndReturn(f func(context.Context, *v1alpha1.ListOperationsRequest, ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error)) *MockAllocationServiceListOperationsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Update mocks base method. +func (m *MockAllocationService) Update(arg0 context.Context, arg1 *v1alpha10.UpdateAllocationRequest, arg2 ...grpc.CallOption) (*alphaops.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Update", varargs...) + ret0, _ := ret[0].(*alphaops.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Update indicates an expected call of Update. +func (mr *MockAllocationServiceMockRecorder) Update(arg0, arg1 any, arg2 ...any) *MockAllocationServiceUpdateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAllocationService)(nil).Update), varargs...) + return &MockAllocationServiceUpdateCall{Call: call} +} + +// MockAllocationServiceUpdateCall wrap *gomock.Call +type MockAllocationServiceUpdateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockAllocationServiceUpdateCall) Return(arg0 *alphaops.Operation, arg1 error) *MockAllocationServiceUpdateCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockAllocationServiceUpdateCall) Do(f func(context.Context, *v1alpha10.UpdateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceUpdateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockAllocationServiceUpdateCall) DoAndReturn(f func(context.Context, *v1alpha10.UpdateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error)) *MockAllocationServiceUpdateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1alpha1/network_service.mock.go b/mocks/nebius/vpc/v1alpha1/network_service.mock.go new file mode 100644 index 0000000..e8b5f33 --- /dev/null +++ b/mocks/nebius/vpc/v1alpha1/network_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1alpha1/network_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1alpha1/network_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockNetworkService is a mock of NetworkService interface. +type MockNetworkService struct { + ctrl *gomock.Controller + recorder *MockNetworkServiceMockRecorder +} + +// MockNetworkServiceMockRecorder is the mock recorder for MockNetworkService. +type MockNetworkServiceMockRecorder struct { + mock *MockNetworkService +} + +// NewMockNetworkService creates a new mock instance. +func NewMockNetworkService(ctrl *gomock.Controller) *MockNetworkService { + mock := &MockNetworkService{ctrl: ctrl} + mock.recorder = &MockNetworkServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockNetworkService) EXPECT() *MockNetworkServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockNetworkService) Filter(arg0 context.Context, arg1 *v1alpha1.ListNetworksRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Network, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Network, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockNetworkServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockNetworkServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockNetworkService)(nil).Filter), varargs...) + return &MockNetworkServiceFilterCall{Call: call} +} + +// MockNetworkServiceFilterCall wrap *gomock.Call +type MockNetworkServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Network, error]) *MockNetworkServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockNetworkService) Get(arg0 context.Context, arg1 *v1alpha1.GetNetworkRequest, arg2 ...grpc.CallOption) (*v1alpha1.Network, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Network) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockNetworkServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockNetworkServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNetworkService)(nil).Get), varargs...) + return &MockNetworkServiceGetCall{Call: call} +} + +// MockNetworkServiceGetCall wrap *gomock.Call +type MockNetworkServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetCall) Return(arg0 *v1alpha1.Network, arg1 error) *MockNetworkServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetCall) Do(f func(context.Context, *v1alpha1.GetNetworkRequest, ...grpc.CallOption) (*v1alpha1.Network, error)) *MockNetworkServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetNetworkRequest, ...grpc.CallOption) (*v1alpha1.Network, error)) *MockNetworkServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockNetworkService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetNetworkByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Network, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Network) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockNetworkServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockNetworkServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockNetworkService)(nil).GetByName), varargs...) + return &MockNetworkServiceGetByNameCall{Call: call} +} + +// MockNetworkServiceGetByNameCall wrap *gomock.Call +type MockNetworkServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceGetByNameCall) Return(arg0 *v1alpha1.Network, arg1 error) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1alpha1.Network, error)) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1alpha1.Network, error)) *MockNetworkServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockNetworkService) List(arg0 context.Context, arg1 *v1alpha1.ListNetworksRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListNetworksResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListNetworksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockNetworkServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockNetworkServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNetworkService)(nil).List), varargs...) + return &MockNetworkServiceListCall{Call: call} +} + +// MockNetworkServiceListCall wrap *gomock.Call +type MockNetworkServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockNetworkServiceListCall) Return(arg0 *v1alpha1.ListNetworksResponse, arg1 error) *MockNetworkServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockNetworkServiceListCall) Do(f func(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) (*v1alpha1.ListNetworksResponse, error)) *MockNetworkServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockNetworkServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) (*v1alpha1.ListNetworksResponse, error)) *MockNetworkServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1alpha1/pool_service.mock.go b/mocks/nebius/vpc/v1alpha1/pool_service.mock.go new file mode 100644 index 0000000..54238f3 --- /dev/null +++ b/mocks/nebius/vpc/v1alpha1/pool_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1alpha1/pool_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1alpha1/pool_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockPoolService is a mock of PoolService interface. +type MockPoolService struct { + ctrl *gomock.Controller + recorder *MockPoolServiceMockRecorder +} + +// MockPoolServiceMockRecorder is the mock recorder for MockPoolService. +type MockPoolServiceMockRecorder struct { + mock *MockPoolService +} + +// NewMockPoolService creates a new mock instance. +func NewMockPoolService(ctrl *gomock.Controller) *MockPoolService { + mock := &MockPoolService{ctrl: ctrl} + mock.recorder = &MockPoolServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPoolService) EXPECT() *MockPoolServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockPoolService) Filter(arg0 context.Context, arg1 *v1alpha1.ListPoolsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Pool, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Pool, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockPoolServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockPoolServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockPoolService)(nil).Filter), varargs...) + return &MockPoolServiceFilterCall{Call: call} +} + +// MockPoolServiceFilterCall wrap *gomock.Call +type MockPoolServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Pool, error]) *MockPoolServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockPoolService) Get(arg0 context.Context, arg1 *v1alpha1.GetPoolRequest, arg2 ...grpc.CallOption) (*v1alpha1.Pool, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Pool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockPoolServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockPoolServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPoolService)(nil).Get), varargs...) + return &MockPoolServiceGetCall{Call: call} +} + +// MockPoolServiceGetCall wrap *gomock.Call +type MockPoolServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceGetCall) Return(arg0 *v1alpha1.Pool, arg1 error) *MockPoolServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceGetCall) Do(f func(context.Context, *v1alpha1.GetPoolRequest, ...grpc.CallOption) (*v1alpha1.Pool, error)) *MockPoolServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetPoolRequest, ...grpc.CallOption) (*v1alpha1.Pool, error)) *MockPoolServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockPoolService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetPoolByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Pool, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Pool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockPoolServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockPoolServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockPoolService)(nil).GetByName), varargs...) + return &MockPoolServiceGetByNameCall{Call: call} +} + +// MockPoolServiceGetByNameCall wrap *gomock.Call +type MockPoolServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceGetByNameCall) Return(arg0 *v1alpha1.Pool, arg1 error) *MockPoolServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetPoolByNameRequest, ...grpc.CallOption) (*v1alpha1.Pool, error)) *MockPoolServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetPoolByNameRequest, ...grpc.CallOption) (*v1alpha1.Pool, error)) *MockPoolServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockPoolService) List(arg0 context.Context, arg1 *v1alpha1.ListPoolsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListPoolsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListPoolsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockPoolServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockPoolServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPoolService)(nil).List), varargs...) + return &MockPoolServiceListCall{Call: call} +} + +// MockPoolServiceListCall wrap *gomock.Call +type MockPoolServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockPoolServiceListCall) Return(arg0 *v1alpha1.ListPoolsResponse, arg1 error) *MockPoolServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockPoolServiceListCall) Do(f func(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) (*v1alpha1.ListPoolsResponse, error)) *MockPoolServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockPoolServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) (*v1alpha1.ListPoolsResponse, error)) *MockPoolServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1alpha1/scope_service.mock.go b/mocks/nebius/vpc/v1alpha1/scope_service.mock.go new file mode 100644 index 0000000..511046f --- /dev/null +++ b/mocks/nebius/vpc/v1alpha1/scope_service.mock.go @@ -0,0 +1,218 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1alpha1/scope_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1alpha1/scope_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockScopeService is a mock of ScopeService interface. +type MockScopeService struct { + ctrl *gomock.Controller + recorder *MockScopeServiceMockRecorder +} + +// MockScopeServiceMockRecorder is the mock recorder for MockScopeService. +type MockScopeServiceMockRecorder struct { + mock *MockScopeService +} + +// NewMockScopeService creates a new mock instance. +func NewMockScopeService(ctrl *gomock.Controller) *MockScopeService { + mock := &MockScopeService{ctrl: ctrl} + mock.recorder = &MockScopeServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockScopeService) EXPECT() *MockScopeServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockScopeService) Filter(arg0 context.Context, arg1 *v1alpha1.ListScopesRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Scope, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Scope, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockScopeServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockScopeServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockScopeService)(nil).Filter), varargs...) + return &MockScopeServiceFilterCall{Call: call} +} + +// MockScopeServiceFilterCall wrap *gomock.Call +type MockScopeServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Scope, error]) *MockScopeServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Scope, error]) *MockScopeServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Scope, error]) *MockScopeServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockScopeService) Get(arg0 context.Context, arg1 *v1alpha1.GetScopeRequest, arg2 ...grpc.CallOption) (*v1alpha1.Scope, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Scope) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockScopeServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockScopeServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockScopeService)(nil).Get), varargs...) + return &MockScopeServiceGetCall{Call: call} +} + +// MockScopeServiceGetCall wrap *gomock.Call +type MockScopeServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeServiceGetCall) Return(arg0 *v1alpha1.Scope, arg1 error) *MockScopeServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeServiceGetCall) Do(f func(context.Context, *v1alpha1.GetScopeRequest, ...grpc.CallOption) (*v1alpha1.Scope, error)) *MockScopeServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetScopeRequest, ...grpc.CallOption) (*v1alpha1.Scope, error)) *MockScopeServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockScopeService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetScopeByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Scope, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Scope) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockScopeServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockScopeServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockScopeService)(nil).GetByName), varargs...) + return &MockScopeServiceGetByNameCall{Call: call} +} + +// MockScopeServiceGetByNameCall wrap *gomock.Call +type MockScopeServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeServiceGetByNameCall) Return(arg0 *v1alpha1.Scope, arg1 error) *MockScopeServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetScopeByNameRequest, ...grpc.CallOption) (*v1alpha1.Scope, error)) *MockScopeServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetScopeByNameRequest, ...grpc.CallOption) (*v1alpha1.Scope, error)) *MockScopeServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockScopeService) List(arg0 context.Context, arg1 *v1alpha1.ListScopesRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListScopesResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListScopesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockScopeServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockScopeServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockScopeService)(nil).List), varargs...) + return &MockScopeServiceListCall{Call: call} +} + +// MockScopeServiceListCall wrap *gomock.Call +type MockScopeServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockScopeServiceListCall) Return(arg0 *v1alpha1.ListScopesResponse, arg1 error) *MockScopeServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockScopeServiceListCall) Do(f func(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) (*v1alpha1.ListScopesResponse, error)) *MockScopeServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockScopeServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) (*v1alpha1.ListScopesResponse, error)) *MockScopeServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/nebius/vpc/v1alpha1/subnet_service.mock.go b/mocks/nebius/vpc/v1alpha1/subnet_service.mock.go new file mode 100644 index 0000000..79e6ef3 --- /dev/null +++ b/mocks/nebius/vpc/v1alpha1/subnet_service.mock.go @@ -0,0 +1,262 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: services/nebius/vpc/v1alpha1/subnet_service.sdk.go +// +// Generated by this command: +// +// mockgen -source services/nebius/vpc/v1alpha1/subnet_service.sdk.go -package v1alpha1 -typed +// + +// Package v1alpha1 is a generated GoMock package. +package v1alpha1 + +import ( + context "context" + reflect "reflect" + + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" +) + +// MockSubnetService is a mock of SubnetService interface. +type MockSubnetService struct { + ctrl *gomock.Controller + recorder *MockSubnetServiceMockRecorder +} + +// MockSubnetServiceMockRecorder is the mock recorder for MockSubnetService. +type MockSubnetServiceMockRecorder struct { + mock *MockSubnetService +} + +// NewMockSubnetService creates a new mock instance. +func NewMockSubnetService(ctrl *gomock.Controller) *MockSubnetService { + mock := &MockSubnetService{ctrl: ctrl} + mock.recorder = &MockSubnetServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSubnetService) EXPECT() *MockSubnetServiceMockRecorder { + return m.recorder +} + +// Filter mocks base method. +func (m *MockSubnetService) Filter(arg0 context.Context, arg1 *v1alpha1.ListSubnetsRequest, arg2 ...grpc.CallOption) iter.Seq2[*v1alpha1.Subnet, error] { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Filter", varargs...) + ret0, _ := ret[0].(iter.Seq2[*v1alpha1.Subnet, error]) + return ret0 +} + +// Filter indicates an expected call of Filter. +func (mr *MockSubnetServiceMockRecorder) Filter(arg0, arg1 any, arg2 ...any) *MockSubnetServiceFilterCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockSubnetService)(nil).Filter), varargs...) + return &MockSubnetServiceFilterCall{Call: call} +} + +// MockSubnetServiceFilterCall wrap *gomock.Call +type MockSubnetServiceFilterCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceFilterCall) Return(arg0 iter.Seq2[*v1alpha1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceFilterCall) Do(f func(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceFilterCall) DoAndReturn(f func(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Subnet, error]) *MockSubnetServiceFilterCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Get mocks base method. +func (m *MockSubnetService) Get(arg0 context.Context, arg1 *v1alpha1.GetSubnetRequest, arg2 ...grpc.CallOption) (*v1alpha1.Subnet, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Get", varargs...) + ret0, _ := ret[0].(*v1alpha1.Subnet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockSubnetServiceMockRecorder) Get(arg0, arg1 any, arg2 ...any) *MockSubnetServiceGetCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSubnetService)(nil).Get), varargs...) + return &MockSubnetServiceGetCall{Call: call} +} + +// MockSubnetServiceGetCall wrap *gomock.Call +type MockSubnetServiceGetCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceGetCall) Return(arg0 *v1alpha1.Subnet, arg1 error) *MockSubnetServiceGetCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceGetCall) Do(f func(context.Context, *v1alpha1.GetSubnetRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error)) *MockSubnetServiceGetCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceGetCall) DoAndReturn(f func(context.Context, *v1alpha1.GetSubnetRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error)) *MockSubnetServiceGetCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// GetByName mocks base method. +func (m *MockSubnetService) GetByName(arg0 context.Context, arg1 *v1alpha1.GetSubnetByNameRequest, arg2 ...grpc.CallOption) (*v1alpha1.Subnet, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetByName", varargs...) + ret0, _ := ret[0].(*v1alpha1.Subnet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetByName indicates an expected call of GetByName. +func (mr *MockSubnetServiceMockRecorder) GetByName(arg0, arg1 any, arg2 ...any) *MockSubnetServiceGetByNameCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByName", reflect.TypeOf((*MockSubnetService)(nil).GetByName), varargs...) + return &MockSubnetServiceGetByNameCall{Call: call} +} + +// MockSubnetServiceGetByNameCall wrap *gomock.Call +type MockSubnetServiceGetByNameCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceGetByNameCall) Return(arg0 *v1alpha1.Subnet, arg1 error) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceGetByNameCall) Do(f func(context.Context, *v1alpha1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error)) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceGetByNameCall) DoAndReturn(f func(context.Context, *v1alpha1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error)) *MockSubnetServiceGetByNameCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// List mocks base method. +func (m *MockSubnetService) List(arg0 context.Context, arg1 *v1alpha1.ListSubnetsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "List", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListSubnetsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockSubnetServiceMockRecorder) List(arg0, arg1 any, arg2 ...any) *MockSubnetServiceListCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSubnetService)(nil).List), varargs...) + return &MockSubnetServiceListCall{Call: call} +} + +// MockSubnetServiceListCall wrap *gomock.Call +type MockSubnetServiceListCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceListCall) Return(arg0 *v1alpha1.ListSubnetsResponse, arg1 error) *MockSubnetServiceListCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceListCall) Do(f func(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error)) *MockSubnetServiceListCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceListCall) DoAndReturn(f func(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error)) *MockSubnetServiceListCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ListByNetwork mocks base method. +func (m *MockSubnetService) ListByNetwork(arg0 context.Context, arg1 *v1alpha1.ListSubnetsByNetworkRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListByNetwork", varargs...) + ret0, _ := ret[0].(*v1alpha1.ListSubnetsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListByNetwork indicates an expected call of ListByNetwork. +func (mr *MockSubnetServiceMockRecorder) ListByNetwork(arg0, arg1 any, arg2 ...any) *MockSubnetServiceListByNetworkCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByNetwork", reflect.TypeOf((*MockSubnetService)(nil).ListByNetwork), varargs...) + return &MockSubnetServiceListByNetworkCall{Call: call} +} + +// MockSubnetServiceListByNetworkCall wrap *gomock.Call +type MockSubnetServiceListByNetworkCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockSubnetServiceListByNetworkCall) Return(arg0 *v1alpha1.ListSubnetsResponse, arg1 error) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockSubnetServiceListByNetworkCall) Do(f func(context.Context, *v1alpha1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error)) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockSubnetServiceListByNetworkCall) DoAndReturn(f func(context.Context, *v1alpha1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error)) *MockSubnetServiceListByNetworkCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/operations/mock.go b/mocks/operations/mock.go new file mode 100644 index 0000000..3d940fc --- /dev/null +++ b/mocks/operations/mock.go @@ -0,0 +1,673 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: bazel-out/darwin_arm64-fastbuild/bin/api/tools/gosdk/mocks/operations/gopath/src/nebius.ai/nebo/api/tools/gosdk/operations/operation.go +// +// Generated by this command: +// +// mockgen -source bazel-out/darwin_arm64-fastbuild/bin/api/tools/gosdk/mocks/operations/gopath/src/nebius.ai/nebo/api/tools/gosdk/operations/operation.go -package operations -typed +// + +// Package operations is a generated GoMock package. +package operations + +import ( + context "context" + http "net/http" + reflect "reflect" + time "time" + + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + gomock "go.uber.org/mock/gomock" + grpc "google.golang.org/grpc" + status "google.golang.org/grpc/status" + proto "google.golang.org/protobuf/proto" +) + +// MockOperation is a mock of Operation interface. +type MockOperation struct { + ctrl *gomock.Controller + recorder *MockOperationMockRecorder +} + +// MockOperationMockRecorder is the mock recorder for MockOperation. +type MockOperationMockRecorder struct { + mock *MockOperation +} + +// NewMockOperation creates a new mock instance. +func NewMockOperation(ctrl *gomock.Controller) *MockOperation { + mock := &MockOperation{ctrl: ctrl} + mock.recorder = &MockOperationMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockOperation) EXPECT() *MockOperationMockRecorder { + return m.recorder +} + +// CreatedAt mocks base method. +func (m *MockOperation) CreatedAt() time.Time { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreatedAt") + ret0, _ := ret[0].(time.Time) + return ret0 +} + +// CreatedAt indicates an expected call of CreatedAt. +func (mr *MockOperationMockRecorder) CreatedAt() *MockOperationCreatedAtCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatedAt", reflect.TypeOf((*MockOperation)(nil).CreatedAt)) + return &MockOperationCreatedAtCall{Call: call} +} + +// MockOperationCreatedAtCall wrap *gomock.Call +type MockOperationCreatedAtCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationCreatedAtCall) Return(arg0 time.Time) *MockOperationCreatedAtCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationCreatedAtCall) Do(f func() time.Time) *MockOperationCreatedAtCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationCreatedAtCall) DoAndReturn(f func() time.Time) *MockOperationCreatedAtCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// CreatedBy mocks base method. +func (m *MockOperation) CreatedBy() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreatedBy") + ret0, _ := ret[0].(string) + return ret0 +} + +// CreatedBy indicates an expected call of CreatedBy. +func (mr *MockOperationMockRecorder) CreatedBy() *MockOperationCreatedByCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatedBy", reflect.TypeOf((*MockOperation)(nil).CreatedBy)) + return &MockOperationCreatedByCall{Call: call} +} + +// MockOperationCreatedByCall wrap *gomock.Call +type MockOperationCreatedByCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationCreatedByCall) Return(arg0 string) *MockOperationCreatedByCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationCreatedByCall) Do(f func() string) *MockOperationCreatedByCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationCreatedByCall) DoAndReturn(f func() string) *MockOperationCreatedByCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Description mocks base method. +func (m *MockOperation) Description() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Description") + ret0, _ := ret[0].(string) + return ret0 +} + +// Description indicates an expected call of Description. +func (mr *MockOperationMockRecorder) Description() *MockOperationDescriptionCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockOperation)(nil).Description)) + return &MockOperationDescriptionCall{Call: call} +} + +// MockOperationDescriptionCall wrap *gomock.Call +type MockOperationDescriptionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationDescriptionCall) Return(arg0 string) *MockOperationDescriptionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationDescriptionCall) Do(f func() string) *MockOperationDescriptionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationDescriptionCall) DoAndReturn(f func() string) *MockOperationDescriptionCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Done mocks base method. +func (m *MockOperation) Done() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Done") + ret0, _ := ret[0].(bool) + return ret0 +} + +// Done indicates an expected call of Done. +func (mr *MockOperationMockRecorder) Done() *MockOperationDoneCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockOperation)(nil).Done)) + return &MockOperationDoneCall{Call: call} +} + +// MockOperationDoneCall wrap *gomock.Call +type MockOperationDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationDoneCall) Return(arg0 bool) *MockOperationDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationDoneCall) Do(f func() bool) *MockOperationDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationDoneCall) DoAndReturn(f func() bool) *MockOperationDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// FinishedAt mocks base method. +func (m *MockOperation) FinishedAt() *time.Time { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "FinishedAt") + ret0, _ := ret[0].(*time.Time) + return ret0 +} + +// FinishedAt indicates an expected call of FinishedAt. +func (mr *MockOperationMockRecorder) FinishedAt() *MockOperationFinishedAtCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishedAt", reflect.TypeOf((*MockOperation)(nil).FinishedAt)) + return &MockOperationFinishedAtCall{Call: call} +} + +// MockOperationFinishedAtCall wrap *gomock.Call +type MockOperationFinishedAtCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationFinishedAtCall) Return(arg0 *time.Time) *MockOperationFinishedAtCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationFinishedAtCall) Do(f func() *time.Time) *MockOperationFinishedAtCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationFinishedAtCall) DoAndReturn(f func() *time.Time) *MockOperationFinishedAtCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ID mocks base method. +func (m *MockOperation) ID() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ID") + ret0, _ := ret[0].(string) + return ret0 +} + +// ID indicates an expected call of ID. +func (mr *MockOperationMockRecorder) ID() *MockOperationIDCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockOperation)(nil).ID)) + return &MockOperationIDCall{Call: call} +} + +// MockOperationIDCall wrap *gomock.Call +type MockOperationIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationIDCall) Return(arg0 string) *MockOperationIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationIDCall) Do(f func() string) *MockOperationIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationIDCall) DoAndReturn(f func() string) *MockOperationIDCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Poll mocks base method. +func (m *MockOperation) Poll(arg0 context.Context, arg1 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Poll", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Poll indicates an expected call of Poll. +func (mr *MockOperationMockRecorder) Poll(arg0 any, arg1 ...any) *MockOperationPollCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0}, arg1...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Poll", reflect.TypeOf((*MockOperation)(nil).Poll), varargs...) + return &MockOperationPollCall{Call: call} +} + +// MockOperationPollCall wrap *gomock.Call +type MockOperationPollCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationPollCall) Return(arg0 operations.Operation, arg1 error) *MockOperationPollCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationPollCall) Do(f func(context.Context, ...grpc.CallOption) (operations.Operation, error)) *MockOperationPollCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationPollCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (operations.Operation, error)) *MockOperationPollCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ProgressData mocks base method. +func (m *MockOperation) ProgressData() proto.Message { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ProgressData") + ret0, _ := ret[0].(proto.Message) + return ret0 +} + +// ProgressData indicates an expected call of ProgressData. +func (mr *MockOperationMockRecorder) ProgressData() *MockOperationProgressDataCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProgressData", reflect.TypeOf((*MockOperation)(nil).ProgressData)) + return &MockOperationProgressDataCall{Call: call} +} + +// MockOperationProgressDataCall wrap *gomock.Call +type MockOperationProgressDataCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationProgressDataCall) Return(arg0 proto.Message) *MockOperationProgressDataCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationProgressDataCall) Do(f func() proto.Message) *MockOperationProgressDataCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationProgressDataCall) DoAndReturn(f func() proto.Message) *MockOperationProgressDataCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Raw mocks base method. +func (m *MockOperation) Raw() *v1.Operation { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Raw") + ret0, _ := ret[0].(*v1.Operation) + return ret0 +} + +// Raw indicates an expected call of Raw. +func (mr *MockOperationMockRecorder) Raw() *MockOperationRawCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Raw", reflect.TypeOf((*MockOperation)(nil).Raw)) + return &MockOperationRawCall{Call: call} +} + +// MockOperationRawCall wrap *gomock.Call +type MockOperationRawCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRawCall) Return(arg0 *v1.Operation) *MockOperationRawCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRawCall) Do(f func() *v1.Operation) *MockOperationRawCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRawCall) DoAndReturn(f func() *v1.Operation) *MockOperationRawCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Request mocks base method. +func (m *MockOperation) Request() proto.Message { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Request") + ret0, _ := ret[0].(proto.Message) + return ret0 +} + +// Request indicates an expected call of Request. +func (mr *MockOperationMockRecorder) Request() *MockOperationRequestCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockOperation)(nil).Request)) + return &MockOperationRequestCall{Call: call} +} + +// MockOperationRequestCall wrap *gomock.Call +type MockOperationRequestCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRequestCall) Return(arg0 proto.Message) *MockOperationRequestCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRequestCall) Do(f func() proto.Message) *MockOperationRequestCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRequestCall) DoAndReturn(f func() proto.Message) *MockOperationRequestCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RequestHeaders mocks base method. +func (m *MockOperation) RequestHeaders() http.Header { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RequestHeaders") + ret0, _ := ret[0].(http.Header) + return ret0 +} + +// RequestHeaders indicates an expected call of RequestHeaders. +func (mr *MockOperationMockRecorder) RequestHeaders() *MockOperationRequestHeadersCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestHeaders", reflect.TypeOf((*MockOperation)(nil).RequestHeaders)) + return &MockOperationRequestHeadersCall{Call: call} +} + +// MockOperationRequestHeadersCall wrap *gomock.Call +type MockOperationRequestHeadersCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationRequestHeadersCall) Return(arg0 http.Header) *MockOperationRequestHeadersCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationRequestHeadersCall) Do(f func() http.Header) *MockOperationRequestHeadersCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationRequestHeadersCall) DoAndReturn(f func() http.Header) *MockOperationRequestHeadersCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ResourceID mocks base method. +func (m *MockOperation) ResourceID() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ResourceID") + ret0, _ := ret[0].(string) + return ret0 +} + +// ResourceID indicates an expected call of ResourceID. +func (mr *MockOperationMockRecorder) ResourceID() *MockOperationResourceIDCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceID", reflect.TypeOf((*MockOperation)(nil).ResourceID)) + return &MockOperationResourceIDCall{Call: call} +} + +// MockOperationResourceIDCall wrap *gomock.Call +type MockOperationResourceIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationResourceIDCall) Return(arg0 string) *MockOperationResourceIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationResourceIDCall) Do(f func() string) *MockOperationResourceIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationResourceIDCall) DoAndReturn(f func() string) *MockOperationResourceIDCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Status mocks base method. +func (m *MockOperation) Status() *status.Status { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Status") + ret0, _ := ret[0].(*status.Status) + return ret0 +} + +// Status indicates an expected call of Status. +func (mr *MockOperationMockRecorder) Status() *MockOperationStatusCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockOperation)(nil).Status)) + return &MockOperationStatusCall{Call: call} +} + +// MockOperationStatusCall wrap *gomock.Call +type MockOperationStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationStatusCall) Return(arg0 *status.Status) *MockOperationStatusCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationStatusCall) Do(f func() *status.Status) *MockOperationStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationStatusCall) DoAndReturn(f func() *status.Status) *MockOperationStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Successful mocks base method. +func (m *MockOperation) Successful() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Successful") + ret0, _ := ret[0].(bool) + return ret0 +} + +// Successful indicates an expected call of Successful. +func (mr *MockOperationMockRecorder) Successful() *MockOperationSuccessfulCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Successful", reflect.TypeOf((*MockOperation)(nil).Successful)) + return &MockOperationSuccessfulCall{Call: call} +} + +// MockOperationSuccessfulCall wrap *gomock.Call +type MockOperationSuccessfulCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationSuccessfulCall) Return(arg0 bool) *MockOperationSuccessfulCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationSuccessfulCall) Do(f func() bool) *MockOperationSuccessfulCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationSuccessfulCall) DoAndReturn(f func() bool) *MockOperationSuccessfulCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Wait mocks base method. +func (m *MockOperation) Wait(arg0 context.Context, arg1 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Wait", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Wait indicates an expected call of Wait. +func (mr *MockOperationMockRecorder) Wait(arg0 any, arg1 ...any) *MockOperationWaitCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0}, arg1...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockOperation)(nil).Wait), varargs...) + return &MockOperationWaitCall{Call: call} +} + +// MockOperationWaitCall wrap *gomock.Call +type MockOperationWaitCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationWaitCall) Return(arg0 operations.Operation, arg1 error) *MockOperationWaitCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationWaitCall) Do(f func(context.Context, ...grpc.CallOption) (operations.Operation, error)) *MockOperationWaitCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationWaitCall) DoAndReturn(f func(context.Context, ...grpc.CallOption) (operations.Operation, error)) *MockOperationWaitCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// WaitInterval mocks base method. +func (m *MockOperation) WaitInterval(arg0 context.Context, arg1 time.Duration, arg2 ...grpc.CallOption) (operations.Operation, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "WaitInterval", varargs...) + ret0, _ := ret[0].(operations.Operation) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WaitInterval indicates an expected call of WaitInterval. +func (mr *MockOperationMockRecorder) WaitInterval(arg0, arg1 any, arg2 ...any) *MockOperationWaitIntervalCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitInterval", reflect.TypeOf((*MockOperation)(nil).WaitInterval), varargs...) + return &MockOperationWaitIntervalCall{Call: call} +} + +// MockOperationWaitIntervalCall wrap *gomock.Call +type MockOperationWaitIntervalCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockOperationWaitIntervalCall) Return(arg0 operations.Operation, arg1 error) *MockOperationWaitIntervalCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockOperationWaitIntervalCall) Do(f func(context.Context, time.Duration, ...grpc.CallOption) (operations.Operation, error)) *MockOperationWaitIntervalCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockOperationWaitIntervalCall) DoAndReturn(f func(context.Context, time.Duration, ...grpc.CallOption) (operations.Operation, error)) *MockOperationWaitIntervalCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/mocks/operations/stub.go b/mocks/operations/stub.go new file mode 100644 index 0000000..d16fd49 --- /dev/null +++ b/mocks/operations/stub.go @@ -0,0 +1,147 @@ +package operations + +import ( + "context" + "net/http" + "time" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/emptypb" + + "github.com/nebius/gosdk/operations" + commonpb "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +// Stub is an [operations.Operation] wrapper over a static [commonpb.Operation]. +// It behaves like the real wrapper, mostly. +// It fails a test if the operation is not completed and Poll, Wait, or WaitInterval methods are called. +// +// If you need the full control over its behavior, use [MockOperation]. +type Stub struct { + t require.TestingT + op *commonpb.Operation +} + +// NewStubOperation returns [Stub] operation. +// If you need the full control over its behavior, use [NewMockOperation]. +func NewStubOperation(t require.TestingT, operation *commonpb.Operation) operations.Operation { + return Stub{ + t: t, + op: operation, + } +} + +func (s Stub) Done() bool { + return s.Status() != nil +} + +func (s Stub) Successful() bool { + st := s.Status() + return st != nil && st.Code() == codes.OK +} + +func (s Stub) Poll(context.Context, ...grpc.CallOption) (operations.Operation, error) { + if s.Done() { + return s, nil + } + require.Failf( + s.t, + "Poll is called on the stub with uncompleted operation", + "Underlying operation: %s", + protojson.Format(s.op), + ) + return s, nil +} + +func (s Stub) Wait(ctx context.Context, opts ...grpc.CallOption) (operations.Operation, error) { + return s.WaitInterval(ctx, operations.DefaultPollInterval, opts...) +} + +func (s Stub) WaitInterval(context.Context, time.Duration, ...grpc.CallOption) (operations.Operation, error) { + if s.Done() { + return s, operations.NewError(s) + } + require.Failf( + s.t, + "Wait is called on the stub with uncompleted operation", + "Underlying operation: %s", + protojson.Format(s.op), + ) + return s, nil +} + +func (s Stub) ID() string { + return s.op.GetId() +} + +func (s Stub) Description() string { + return s.op.GetDescription() +} + +func (s Stub) CreatedAt() time.Time { + createdAt := s.op.GetCreatedAt() + require.NoError(s.t, createdAt.CheckValid()) + return createdAt.AsTime() +} + +func (s Stub) CreatedBy() string { + return s.op.GetCreatedBy() +} + +func (s Stub) FinishedAt() *time.Time { + finishedAt := s.op.GetFinishedAt() + if finishedAt == nil { + return nil + } + require.NoError(s.t, finishedAt.CheckValid()) + asTime := finishedAt.AsTime() + return &asTime +} + +func (s Stub) Request() proto.Message { + return unmarshalNotEmpty(s.t, s.op.GetRequest()) +} + +func (s Stub) RequestHeaders() http.Header { + headers := make(http.Header, len(s.op.GetRequestHeaders())) + for name, header := range s.op.GetRequestHeaders() { + headers[name] = header.GetValues() + } + return headers +} + +func (s Stub) ResourceID() string { + return s.op.GetResourceId() +} + +func (s Stub) ProgressData() proto.Message { + return unmarshalNotEmpty(s.t, s.op.GetProgressData()) +} + +func (s Stub) Status() *status.Status { + st := s.op.GetStatus() + if st == nil { + return nil + } + return status.FromProto(st) +} + +func (s Stub) Raw() *commonpb.Operation { + return s.op +} + +func unmarshalNotEmpty(t require.TestingT, message *anypb.Any) proto.Message { + if message == nil || message.MessageIs(&emptypb.Empty{}) { + return nil + } + + unmarshalled, err := message.UnmarshalNew() + require.NoError(t, err) + return unmarshalled +} diff --git a/operations/alphaops/error.go b/operations/alphaops/error.go new file mode 100644 index 0000000..be6335e --- /dev/null +++ b/operations/alphaops/error.go @@ -0,0 +1,29 @@ +package alphaops + +import ( + "fmt" + + "google.golang.org/grpc/codes" +) + +type Error struct { + Operation *Operation + Code codes.Code + Message string +} + +func NewError(operation *Operation) error { + if operation.Successful() { + return nil + } + s := operation.Status() + return &Error{ + Operation: operation, + Code: s.Code(), + Message: s.Message(), + } +} + +func (e *Error) Error() string { + return fmt.Sprintf("operation failed [id=%s, code=%d]: %s", e.Operation.ID(), e.Code, e.Message) +} diff --git a/operations/alphaops/operation.go b/operations/alphaops/operation.go new file mode 100644 index 0000000..10a4367 --- /dev/null +++ b/operations/alphaops/operation.go @@ -0,0 +1,257 @@ +package alphaops + +import ( + "context" + "errors" + "fmt" + "net/http" + "sync" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/emptypb" + + "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" +) + +const DefaultPollInterval = 1 * time.Second + +// Operation is a wrapper over protobuf operation to simplify some actions. +// +// Deprecated: migrate to common.v1. +type Operation struct { + service v1alpha1.OperationServiceClient + mu sync.RWMutex + proto *v1alpha1.Operation + unmarshalled unmarshalled +} + +type unmarshalled struct { + request proto.Message + requestHeaders http.Header + resource proto.Message + progressData proto.Message +} + +// Wrap validates an operation and returns Operation wrapper. +// +// Deprecated: migrate to common.v1. +func Wrap(operation *v1alpha1.Operation, service v1alpha1.OperationServiceClient) (*Operation, error) { + msgs, err := validateAndUnmarshal(operation) + if err != nil { + return nil, err + } + + return &Operation{ + service: service, + mu: sync.RWMutex{}, + proto: operation, + unmarshalled: msgs, + }, nil +} + +// Done returns true if the operation is completed. +func (o *Operation) Done() bool { + return o.Status() != nil +} + +// Successful returns true if the operation is completed and status code is OK. +func (o *Operation) Successful() bool { + s := o.Status() + return s != nil && s.Code() == codes.OK +} + +// Poll updates the operation from the server. It does nothing if the operation is done. +func (o *Operation) Poll(ctx context.Context, opts ...grpc.CallOption) (*Operation, error) { + if o.Done() { + return o, nil + } + + operation, err := o.service.Get(ctx, &v1alpha1.GetOperationRequest{Id: o.ID()}, opts...) + if err != nil { + return nil, fmt.Errorf("can't get operation: %w", err) + } + + msgs, err := validateAndUnmarshal(operation) + if err != nil { + return nil, err + } + + o.mu.Lock() + o.proto = operation + o.unmarshalled = msgs + o.mu.Unlock() + return o, nil +} + +// Wait calls [Operation.WaitInterval] with [DefaultPollInterval]. +func (o *Operation) Wait(ctx context.Context, opts ...grpc.CallOption) (*Operation, error) { + return o.WaitInterval(ctx, DefaultPollInterval, opts...) +} + +// WaitInterval polls the operation from the server until it's done. +// It returns [*Error] if operation is not successful. +func (o *Operation) WaitInterval( + ctx context.Context, + interval time.Duration, + opts ...grpc.CallOption, +) (*Operation, error) { + if o.Done() { + return o, NewError(o) + } + for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-time.After(interval): + _, err := o.Poll(ctx, opts...) + if err != nil { + return nil, err + } + + if o.Done() { + return o, NewError(o) + } + } + } +} + +// ID returns operation ID. +func (o *Operation) ID() string { + return o.Raw().GetId() +} + +// Description returns a human-readable description of the operation. +func (o *Operation) Description() string { + return o.Raw().GetDescription() +} + +// CreatedAt returns the operation creation timestamp. +func (o *Operation) CreatedAt() time.Time { + return o.Raw().GetCreatedAt().AsTime() +} + +// CreatedBy returns the operation initiator ID. +func (o *Operation) CreatedBy() string { + return o.Raw().GetCreatedBy() +} + +// FinishedAt returns the completion timestamp if the operation is done and nil otherwise. +func (o *Operation) FinishedAt() *time.Time { + finishedAt := o.Raw().GetFinishedAt() + if finishedAt == nil { + return nil + } + asTime := finishedAt.AsTime() + return &asTime +} + +// Request returns the request that generated this operation. +func (o *Operation) Request() proto.Message { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.request +} + +// RequestHeaders returns headers of the request that generated this operation. +func (o *Operation) RequestHeaders() http.Header { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.requestHeaders.Clone() +} + +// ResourceID returns ID of the resource that this operation creates, updates, deletes or otherwise changes. +// It may be empty, see API documentation. +func (o *Operation) ResourceID() string { + return o.Raw().GetResourceId() +} + +// Resource returns the snapshot of the resource at the moment this operation started. +// It returns nil if a proto message is not present or is the google.protobuf.Empty. +// See API documentation for details. +func (o *Operation) Resource() proto.Message { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.resource +} + +// ProgressData returns additional information about the progress of the operation. +// It returns nil if a proto message is not present or is the google.protobuf.Empty. +// Must be nil after operation is done. +func (o *Operation) ProgressData() proto.Message { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.progressData +} + +// Status returns the status of the completed operation and nil otherwise. +// See API documentation for details. +func (o *Operation) Status() *status.Status { + s := o.Raw().GetStatus() + if s == nil { + return nil + } + return status.FromProto(s) +} + +// Raw returns underlying protobuf operation. +func (o *Operation) Raw() *v1alpha1.Operation { + o.mu.RLock() + defer o.mu.RUnlock() + return o.proto +} + +func validateAndUnmarshal(operation *v1alpha1.Operation) (unmarshalled, error) { + var errs error + var msgs unmarshalled + + if operation.GetId() == "" { + errs = errors.Join(errs, errors.New("id: empty operation ID")) + } + + err := operation.GetCreatedAt().CheckValid() + if err != nil { + errs = errors.Join(errs, fmt.Errorf("created_at: %w", err)) + } + + if operation.GetFinishedAt() != nil { + err = operation.GetFinishedAt().CheckValid() + if err != nil { + errs = errors.Join(errs, fmt.Errorf("finished_at: %w", err)) + } + } + + msgs.request, err = unmarshalNotEmpty(operation.GetRequest()) + if err != nil { + errs = errors.Join(errs, fmt.Errorf("request: %w", err)) + } + + msgs.requestHeaders = http.Header{} + for name, header := range operation.GetRequestHeaders() { + msgs.requestHeaders[name] = header.GetValues() + } + + msgs.resource, err = unmarshalNotEmpty(operation.GetResource()) + if err != nil { + errs = errors.Join(errs, fmt.Errorf("resource: %w", err)) + } + + msgs.progressData, err = unmarshalNotEmpty(operation.GetProgressData()) + if err != nil { + errs = errors.Join(errs, fmt.Errorf("progress_data: %w", err)) + } + + return msgs, errs +} + +func unmarshalNotEmpty(operation *anypb.Any) (proto.Message, error) { + if operation == nil || operation.MessageIs(&emptypb.Empty{}) { + return nil, nil //nolint:nilnil // don't want to introduce a sentinel error in private method + } + + return operation.UnmarshalNew() +} diff --git a/operations/error.go b/operations/error.go new file mode 100644 index 0000000..af9cdf4 --- /dev/null +++ b/operations/error.go @@ -0,0 +1,31 @@ +package operations + +import ( + "fmt" + + "google.golang.org/grpc/codes" + + "github.com/nebius/gosdk/serviceerror" +) + +type Error struct { + Operation Operation + Code codes.Code + Message string +} + +func NewError(operation Operation) error { + if operation.Successful() { + return nil + } + s := operation.Status() + return serviceerror.FromErrorAndAny(&Error{ + Operation: operation, + Code: s.Code(), + Message: s.Message(), + }, s.Proto().GetDetails()) +} + +func (e *Error) Error() string { + return fmt.Sprintf("operation failed [id=%s, code=%d]: %s", e.Operation.ID(), e.Code, e.Message) +} diff --git a/operations/operation.go b/operations/operation.go new file mode 100644 index 0000000..d92b74e --- /dev/null +++ b/operations/operation.go @@ -0,0 +1,313 @@ +package operations + +import ( + "context" + "errors" + "fmt" + "net/http" + "sync" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/emptypb" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +const DefaultPollInterval = 1 * time.Second + +// Operation is a wrapper over protobuf operation to simplify some actions. +type Operation interface { + // Done returns true if the operation is completed. + Done() bool + + // Successful returns true if the operation is completed and status code is OK. + Successful() bool + + // Poll updates the operation from the server. It does nothing if the operation is done. + Poll(context.Context, ...grpc.CallOption) (Operation, error) + + // Wait calls [Operation.WaitInterval] with [DefaultPollInterval]. + Wait(context.Context, ...grpc.CallOption) (Operation, error) + + // WaitInterval polls the operation from the server until it's done. + // It returns [*Error] if operation is not successful. + WaitInterval(context.Context, time.Duration, ...grpc.CallOption) (Operation, error) + + // ID returns operation ID. + ID() string + + // Description returns a human-readable description of the operation. + Description() string + + // CreatedAt returns the operation creation timestamp. + CreatedAt() time.Time + + // CreatedBy returns the operation initiator ID. + CreatedBy() string + + // FinishedAt returns the completion timestamp if the operation is done and nil otherwise. + FinishedAt() *time.Time + + // Request returns the request that generated this operation. + Request() proto.Message + + // RequestHeaders returns headers of the request that generated this operation. + RequestHeaders() http.Header + + // ResourceID returns ID of the resource that this operation creates, updates, deletes or otherwise changes. + // It may be empty, see API documentation. + ResourceID() string + + // ProgressData returns additional information about the progress of the operation. + // It returns nil if a proto message is not present or is the google.protobuf.Empty. + // Must be nil after operation is done. + ProgressData() proto.Message + + // Status returns the status of the completed operation and nil otherwise. + // See API documentation for details. + Status() *status.Status + + // Raw returns underlying protobuf operation. + Raw() *common.Operation +} + +type opWrapper struct { + service common.OperationServiceClient + mu sync.RWMutex + proto *common.Operation + unmarshalled unmarshalled +} + +type unmarshalled struct { + request proto.Message + requestHeaders http.Header + progressData proto.Message +} + +// New validates an operation and returns Operation wrapper. +func New(operation *common.Operation, service common.OperationServiceClient) (Operation, error) { + msgs, err := validateAndUnmarshal(operation) + if err != nil { + return nil, err + } + + return &opWrapper{ + service: service, + mu: sync.RWMutex{}, + proto: operation, + unmarshalled: msgs, + }, nil +} + +// NewCompleted accepts completed operation and returns Operation wrapper. +// Unlike [New] it doesn't accept [common.OperationServiceClient] as the operation is done. +// It returns an error if the operation is uncompleted. +func NewCompleted(operation *common.Operation) (Operation, error) { + wrapper, err := New(operation, nil) + if err != nil { + return nil, err + } + + if !wrapper.Done() { + return nil, errors.New("operation is not completed") + } + + return wrapper, nil +} + +// Done returns true if the operation is completed. +func (o *opWrapper) Done() bool { + // if you change this, do not forget to change Stub + return o.Status() != nil +} + +// Successful returns true if the operation is completed and status code is OK. +func (o *opWrapper) Successful() bool { + // if you change this, do not forget to change Stub + s := o.Status() + return s != nil && s.Code() == codes.OK +} + +// Poll updates the operation from the server. It does nothing if the operation is done. +func (o *opWrapper) Poll(ctx context.Context, opts ...grpc.CallOption) (Operation, error) { + // if you change this, do not forget to change Stub + if o.Done() { + return o, nil + } + + operation, err := o.service.Get(ctx, &common.GetOperationRequest{Id: o.ID()}, opts...) + if err != nil { + return nil, fmt.Errorf("can't get operation: %w", err) + } + + msgs, err := validateAndUnmarshal(operation) + if err != nil { + return nil, err + } + + o.mu.Lock() + o.proto = operation + o.unmarshalled = msgs + o.mu.Unlock() + return o, nil +} + +// Wait calls [Operation.WaitInterval] with [DefaultPollInterval]. +func (o *opWrapper) Wait(ctx context.Context, opts ...grpc.CallOption) (Operation, error) { + return o.WaitInterval(ctx, DefaultPollInterval, opts...) +} + +// WaitInterval polls the operation from the server until it's done. +// It returns [*Error] if operation is not successful. +func (o *opWrapper) WaitInterval( + ctx context.Context, + interval time.Duration, + opts ...grpc.CallOption, +) (Operation, error) { + // if you change this, do not forget to change Stub + if o.Done() { + return o, NewError(o) + } + for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-time.After(interval): + _, err := o.Poll(ctx, opts...) + if err != nil { + return nil, err + } + + if o.Done() { + return o, NewError(o) + } + } + } +} + +// ID returns operation ID. +func (o *opWrapper) ID() string { + return o.Raw().GetId() +} + +// Description returns a human-readable description of the operation. +func (o *opWrapper) Description() string { + return o.Raw().GetDescription() +} + +// CreatedAt returns the operation creation timestamp. +func (o *opWrapper) CreatedAt() time.Time { + return o.Raw().GetCreatedAt().AsTime() +} + +// CreatedBy returns the operation initiator ID. +func (o *opWrapper) CreatedBy() string { + return o.Raw().GetCreatedBy() +} + +// FinishedAt returns the completion timestamp if the operation is done and nil otherwise. +func (o *opWrapper) FinishedAt() *time.Time { + finishedAt := o.Raw().GetFinishedAt() + if finishedAt == nil { + return nil + } + asTime := finishedAt.AsTime() + return &asTime +} + +// Request returns the request that generated this operation. +func (o *opWrapper) Request() proto.Message { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.request +} + +// RequestHeaders returns headers of the request that generated this operation. +func (o *opWrapper) RequestHeaders() http.Header { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.requestHeaders.Clone() +} + +// ResourceID returns ID of the resource that this operation creates, updates, deletes or otherwise changes. +// It may be empty, see API documentation. +func (o *opWrapper) ResourceID() string { + return o.Raw().GetResourceId() +} + +// ProgressData returns additional information about the progress of the operation. +// It returns nil if a proto message is not present or is the google.protobuf.Empty. +// Must be nil after operation is done. +func (o *opWrapper) ProgressData() proto.Message { + o.mu.RLock() + defer o.mu.RUnlock() + return o.unmarshalled.progressData +} + +// Status returns the status of the completed operation and nil otherwise. +// See API documentation for details. +func (o *opWrapper) Status() *status.Status { + s := o.Raw().GetStatus() + if s == nil { + return nil + } + return status.FromProto(s) +} + +// Raw returns underlying protobuf operation. +func (o *opWrapper) Raw() *common.Operation { + o.mu.RLock() + defer o.mu.RUnlock() + return o.proto +} + +func validateAndUnmarshal(operation *common.Operation) (unmarshalled, error) { + var errs error + var msgs unmarshalled + + if operation.GetId() == "" { + errs = errors.Join(errs, errors.New("id: empty operation ID")) + } + + err := operation.GetCreatedAt().CheckValid() + if err != nil { + errs = errors.Join(errs, fmt.Errorf("created_at: %w", err)) + } + + if operation.GetFinishedAt() != nil { + err = operation.GetFinishedAt().CheckValid() + if err != nil { + errs = errors.Join(errs, fmt.Errorf("finished_at: %w", err)) + } + } + + msgs.request, err = unmarshalNotEmpty(operation.GetRequest()) + if err != nil { + errs = errors.Join(errs, fmt.Errorf("request: %w", err)) + } + + msgs.requestHeaders = http.Header{} + for name, header := range operation.GetRequestHeaders() { + msgs.requestHeaders[name] = header.GetValues() + } + + msgs.progressData, err = unmarshalNotEmpty(operation.GetProgressData()) + if err != nil { + errs = errors.Join(errs, fmt.Errorf("progress_data: %w", err)) + } + + return msgs, errs +} + +func unmarshalNotEmpty(message *anypb.Any) (proto.Message, error) { + if message == nil || message.MessageIs(&emptypb.Empty{}) { + return nil, nil //nolint:nilnil // don't want to introduce a sentinel error in private method + } + + return message.UnmarshalNew() +} diff --git a/options.go b/options.go new file mode 100644 index 0000000..2c6673e --- /dev/null +++ b/options.go @@ -0,0 +1,136 @@ +package gosdk + +import ( + "context" + "log/slog" + + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.opentelemetry.io/otel/propagation" + "google.golang.org/grpc" + + "github.com/nebius/gosdk/conn" +) + +type Option interface { + option() +} + +// WithCredentials enables client authentication. By default, [NoCredentials] is used. +// +// [Credentials] are applied under the following conditions: +// - The outgoing gRPC metadata does not already include authorization information. +// - The list of gRPC call options does not contain [github.com/nebius/gosdk/auth.DisableAuth]. +// +// If either of these conditions is not met, the provided credentials will not be used. +func WithCredentials(creds Credentials) Option { + return optionCredentials{creds: creds} +} + +// WithLogger enables logging in the SDK. By default [NoopHandler] is used. +func WithLogger(logger *slog.Logger) Option { + return WithLoggerHandler(logger.Handler()) +} + +// WithLoggerHandler enables logging in the SDK. By default [NoopHandler] is used. +func WithLoggerHandler(handler slog.Handler) Option { + return optionLogger{handler: handler} +} + +func WithLoggingOptions(opts ...logging.Option) Option { + return optionLoggingOptions(opts) +} + +func WithTracingOptions(opts ...otelgrpc.Option) Option { + return optionTracingOptions(opts) +} + +func WithDialOptions(opts ...grpc.DialOption) Option { + return optionDialOpts(opts) +} + +func WithResolvers(resolvers ...conn.Resolver) Option { + return optionResolvers(resolvers) +} + +func WithDomain(domain string) Option { + return optionDomain(domain) +} + +func WithAddressTemplate(find string, replace string) Option { + return optionAddressTemplate{ + find: find, + replace: replace, + } +} + +// WithExplicitInit changes the [New] constructor behavior. +// If explicitInit is false (default), [SDK.Init] is called by [New]. +// Otherwise, you must call [SDK.Init] by yourself. +// This option may be useful to separate the [SDK] instantiation from IO operations. +func WithExplicitInit(explicitInit bool) Option { + return optionExplicitInit(explicitInit) +} + +// WithInit adds an extra fn, which will be called on init [SDK]. +func WithInit(fn func(context.Context, *SDK) error) Option { + return optionInit(fn) +} + +type ( + optionCredentials struct{ creds Credentials } + optionLogger struct{ handler slog.Handler } + optionLoggingOptions []logging.Option + optionTracingOptions []otelgrpc.Option + optionDialOpts []grpc.DialOption + optionResolvers []conn.Resolver + optionDomain string + optionAddressTemplate struct { + find string + replace string + } + optionExplicitInit bool + optionInit func(context.Context, *SDK) error +) + +func (optionCredentials) option() {} +func (optionLogger) option() {} +func (optionLoggingOptions) option() {} +func (optionTracingOptions) option() {} +func (optionDialOpts) option() {} +func (optionResolvers) option() {} +func (optionDomain) option() {} +func (optionAddressTemplate) option() {} +func (optionExplicitInit) option() {} +func (optionInit) option() {} + +type NoopHandler struct{} + +func (NoopHandler) Enabled(context.Context, slog.Level) bool { return false } +func (NoopHandler) Handle(context.Context, slog.Record) error { return nil } +func (h NoopHandler) WithAttrs([]slog.Attr) slog.Handler { return h } +func (h NoopHandler) WithGroup(string) slog.Handler { return h } + +func TracingStatsHandler(opts ...otelgrpc.Option) grpc.DialOption { + options := []otelgrpc.Option{ + otelgrpc.WithPropagators(propagation.TraceContext{}), + } + options = append(options, opts...) + return grpc.WithStatsHandler(otelgrpc.NewClientHandler(options...)) +} + +type slogAdapter struct { + log *slog.Logger +} + +func (a slogAdapter) Log(ctx context.Context, level logging.Level, msg string, fields ...any) { + a.log.Log(ctx, slog.Level(level), msg, fields...) +} + +func unaryLoggingInterceptor(log *slog.Logger, opts ...logging.Option) grpc.UnaryClientInterceptor { + return logging.UnaryClientInterceptor(slogAdapter{log: log}, opts...) +} + +func streamLoggingInterceptor(log *slog.Logger, opts ...logging.Option) grpc.StreamClientInterceptor { + return logging.StreamClientInterceptor(slogAdapter{log: log}, opts...) +} diff --git a/proto/nebius/annotations.pb.go b/proto/nebius/annotations.pb.go new file mode 100644 index 0000000..d48a4bc --- /dev/null +++ b/proto/nebius/annotations.pb.go @@ -0,0 +1,569 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/annotations.proto + +package nebius + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ResourceBehavior int32 + +const ( + // The behavior of the resource is unspecified. + // Avoid using this default value. + ResourceBehavior_RESOURCE_BEHAVIOR_UNSPECIFIED ResourceBehavior = 0 + // Indicates that the resource can be moved to another parent, typically an + // IAM container, though not necessarily limited to this. + // This behavior suggests that the `metadata.parent_id` attribute could be modified. + ResourceBehavior_MOVABLE ResourceBehavior = 1 + // Indicates that the resource name can be unspecified or does not follow + // uniqueness requirement within parent_id and resource type. + ResourceBehavior_UNNAMED ResourceBehavior = 2 + // Indicates that the resource is named, and the name cannot be changed after + // it is created. It is strongly recommended to do srvices with renaming + // capability, as the guidelines suggest. + ResourceBehavior_IMMUTABLE_NAME ResourceBehavior = 3 +) + +// Enum value maps for ResourceBehavior. +var ( + ResourceBehavior_name = map[int32]string{ + 0: "RESOURCE_BEHAVIOR_UNSPECIFIED", + 1: "MOVABLE", + 2: "UNNAMED", + 3: "IMMUTABLE_NAME", + } + ResourceBehavior_value = map[string]int32{ + "RESOURCE_BEHAVIOR_UNSPECIFIED": 0, + "MOVABLE": 1, + "UNNAMED": 2, + "IMMUTABLE_NAME": 3, + } +) + +func (x ResourceBehavior) Enum() *ResourceBehavior { + p := new(ResourceBehavior) + *p = x + return p +} + +func (x ResourceBehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResourceBehavior) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_annotations_proto_enumTypes[0].Descriptor() +} + +func (ResourceBehavior) Type() protoreflect.EnumType { + return &file_nebius_annotations_proto_enumTypes[0] +} + +func (x ResourceBehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResourceBehavior.Descriptor instead. +func (ResourceBehavior) EnumDescriptor() ([]byte, []int) { + return file_nebius_annotations_proto_rawDescGZIP(), []int{0} +} + +type FieldBehavior int32 + +const ( + FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 + // This indicates that the field can't be changed during a resource update. + // Changing the field value will cause an `INVALID_ARGUMENT` error. + // Resource recreate requires a change of the field value. + FieldBehavior_IMMUTABLE FieldBehavior = 2 + // Indicates field is a resource ID, so it MUST be present on a resource + // update, but MUST NOT be set on create. + // Otherwise, RPC will fail with the `INVALID_ARGUMENT` error + FieldBehavior_IDENTIFIER FieldBehavior = 3 + // Indicates field is not present in output. + FieldBehavior_INPUT_ONLY FieldBehavior = 4 + // Indicates field can't be set on create or changed on update. + // Otherwise, RPC will fail with the `INVALID_ARGUMENT` error + FieldBehavior_OUTPUT_ONLY FieldBehavior = 5 + // Indicates that an empty message and a null have different semantics. + // Usually, that field is a feature spec message: its empty message enables + // that feature, and null disables it. Such a message is different from `bool` + // because it already has some feature parameters, or they can be added later + // in a backward-compatible way. + // IMPORTANT: if the message itself is recursive, this behavior is forced. + FieldBehavior_MEANINGFUL_EMPTY_VALUE FieldBehavior = 6 + // Indicates that an empty (default) value will be filled by the server. + // Usually, that field is a feature spec value, which by default is computed. + // Values marked with this annotation won't raise error if they are not set + // and the returned value is not equal to protobuf default. + // + // IMPORTANT: + // Updating this value from explicit to default may not lead to Update call in + // some tools (eg Terraform). + // Compound values (messages, lists and maps) may result in unpredictable + // updates (see examples in guidelines). + FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7 +) + +// Enum value maps for FieldBehavior. +var ( + FieldBehavior_name = map[int32]string{ + 0: "FIELD_BEHAVIOR_UNSPECIFIED", + 2: "IMMUTABLE", + 3: "IDENTIFIER", + 4: "INPUT_ONLY", + 5: "OUTPUT_ONLY", + 6: "MEANINGFUL_EMPTY_VALUE", + 7: "NON_EMPTY_DEFAULT", + } + FieldBehavior_value = map[string]int32{ + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "IMMUTABLE": 2, + "IDENTIFIER": 3, + "INPUT_ONLY": 4, + "OUTPUT_ONLY": 5, + "MEANINGFUL_EMPTY_VALUE": 6, + "NON_EMPTY_DEFAULT": 7, + } +) + +func (x FieldBehavior) Enum() *FieldBehavior { + p := new(FieldBehavior) + *p = x + return p +} + +func (x FieldBehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_annotations_proto_enumTypes[1].Descriptor() +} + +func (FieldBehavior) Type() protoreflect.EnumType { + return &file_nebius_annotations_proto_enumTypes[1] +} + +func (x FieldBehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldBehavior.Descriptor instead. +func (FieldBehavior) EnumDescriptor() ([]byte, []int) { + return file_nebius_annotations_proto_rawDescGZIP(), []int{1} +} + +type RegionRouting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of fields to extract the NID from, in order of priority. + // The API Gateway will check each field in sequence and use the first valid NID it finds. + // This overrides the default NID lookup order: `id`, `parent_id`, `metadata.id`, `metadata.parent_id`. + // If the field contains a non-empty list of strings, all NIDs in the array must be valid and have the same routing code. + Nid []string `protobuf:"bytes,1,rep,name=nid,proto3" json:"nid,omitempty"` + // If true, region routing is disabled for the method. + // When this is set, requests will not be forwarded to a different region, even if an NID is present. + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + // In strict mode, the API Gateway returns an INVALID_ARGUMENT error to the user when a routing error occurs, + // rather than forwarding the request to the local region. + Strict bool `protobuf:"varint,3,opt,name=strict,proto3" json:"strict,omitempty"` +} + +func (x *RegionRouting) Reset() { + *x = RegionRouting{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_annotations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegionRouting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegionRouting) ProtoMessage() {} + +func (x *RegionRouting) ProtoReflect() protoreflect.Message { + mi := &file_nebius_annotations_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegionRouting.ProtoReflect.Descriptor instead. +func (*RegionRouting) Descriptor() ([]byte, []int) { + return file_nebius_annotations_proto_rawDescGZIP(), []int{0} +} + +func (x *RegionRouting) GetNid() []string { + if x != nil { + return x.Nid + } + return nil +} + +func (x *RegionRouting) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *RegionRouting) GetStrict() bool { + if x != nil { + return x.Strict + } + return false +} + +var file_nebius_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1191, + Name: "nebius.unstable", + Tag: "varint,1191,opt,name=unstable", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 1191, + Name: "nebius.api_service_name", + Tag: "bytes,1191,opt,name=api_service_name", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*RegionRouting)(nil), + Field: 50003, + Name: "nebius.region_routing", + Tag: "bytes,50003,opt,name=region_routing", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: ([]ResourceBehavior)(nil), + Field: 1191, + Name: "nebius.resource_behavior", + Tag: "varint,1191,rep,packed,name=resource_behavior,enum=nebius.ResourceBehavior", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: ([]FieldBehavior)(nil), + Field: 1191, + Name: "nebius.field_behavior", + Tag: "varint,1191,rep,packed,name=field_behavior,enum=nebius.FieldBehavior", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1192, + Name: "nebius.sensitive", + Tag: "varint,1192,opt,name=sensitive", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1193, + Name: "nebius.credentials", + Tag: "varint,1193,opt,name=credentials", + Filename: "nebius/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: ([]FieldBehavior)(nil), + Field: 1191, + Name: "nebius.oneof_behavior", + Tag: "varint,1191,rep,packed,name=oneof_behavior,enum=nebius.FieldBehavior", + Filename: "nebius/annotations.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // Marks the file as unstable, indicating that it may change in a non-backward compatible way in the future. + // Changes to files marked with this option are ignored by the breaking change detector. + // + // optional bool unstable = 1191; + E_Unstable = &file_nebius_annotations_proto_extTypes[0] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // by default API tools assume that every service is configured with address + // + // in a format: . + // example: nebius.dns.v1alpha1.ZoneService => dns. + // + // this option is used to override the default behavior for private api domains + // + // example for iam access: option (api_service_name) = "access-service.iam"; + // that leads to access-service.iam. + // + // optional string api_service_name = 1191; + E_ApiServiceName = &file_nebius_annotations_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // Defines custom region routing rules for a method. + // + // By default, the API Gateway searches for the NID in the following proto message fields (in order): + // - `id` + // - `parent_id` + // - `metadata.id` + // - `metadata.parent_id` + // + // If a valid NID is found, the request is routed to the associated region by routing code. + // Otherwise, the request is routed to the local region. + // These default rules generally cover most use cases. + // + // To customize the routing behavior, use the `region_routing` option: + // - To specify a custom field path(s) for the NID, use the `nid` field. + // - To return an INVALID_ARGUMENT error instead of forwarding to the local region, set `strict` to `true`. + // - To completely disable region routing, set `disabled` to `true`. + // + // Examples: + // + // service MyService { + // rpc DefaultRouting(Request) returns (Response); + // rpc CustomRoutingField(Request) returns (Response) { + // option (region_routing).nid = "path.to.resource_id"; + // }; + // rpc SeveralFieldsToSearch(Request) returns (Response) { + // option (region_routing).nid = "path.to.resource_id"; + // option (region_routing).nid = "path.to.parent_id"; + // option (region_routing).strict = true; + // }; + // rpc DisabledRouting(Request) returns (Response) { + // option (region_routing).disabled = true; + // }; + // } + // + // optional nebius.RegionRouting region_routing = 50003; + E_RegionRouting = &file_nebius_annotations_proto_extTypes[2] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // repeated nebius.ResourceBehavior resource_behavior = 1191; + E_ResourceBehavior = &file_nebius_annotations_proto_extTypes[3] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Field behavior describes how the field behaves on input or output. + // + // repeated nebius.FieldBehavior field_behavior = 1191; + E_FieldBehavior = &file_nebius_annotations_proto_extTypes[4] + // Sensitive field is masked/removed from the message while logging, storing in DB and + // on all others persistent layers (except specialized storage like PDS). + // + // optional bool sensitive = 1192; + E_Sensitive = &file_nebius_annotations_proto_extTypes[5] + // Credentials field is masked access tokens/jwt/session from the message while logging, storing in DB and + // on all others persistent layers + // + // optional bool credentials = 1193; + E_Credentials = &file_nebius_annotations_proto_extTypes[6] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // Field behavior describes how oneof behaves on input or output. + // + // repeated nebius.FieldBehavior oneof_behavior = 1191; + E_OneofBehavior = &file_nebius_annotations_proto_extTypes[7] +) + +var File_nebius_annotations_proto protoreflect.FileDescriptor + +var file_nebius_annotations_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x55, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2a, 0x63, 0x0a, 0x10, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, + 0x21, 0x0a, 0x1d, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x45, 0x48, 0x41, + 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x56, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4e, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, + 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x03, + 0x2a, 0xa2, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, + 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, + 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, + 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x45, 0x41, 0x4e, 0x49, 0x4e, 0x47, 0x46, 0x55, 0x4c, + 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x06, 0x12, 0x15, + 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x10, 0x07, 0x3a, 0x39, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xa7, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x3a, 0x4a, 0x0a, 0x10, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x70, + 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x5e, 0x0a, 0x0e, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd3, + 0x86, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x67, 0x0a, 0x11, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0xa7, 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x3a, 0x5c, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x15, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x3a, 0x3c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xa8, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x3a, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xa9, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x3a, 0x5c, 0x0a, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x09, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x52, 0x0d, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x42, 0x49, 0x0a, 0x0d, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_annotations_proto_rawDescOnce sync.Once + file_nebius_annotations_proto_rawDescData = file_nebius_annotations_proto_rawDesc +) + +func file_nebius_annotations_proto_rawDescGZIP() []byte { + file_nebius_annotations_proto_rawDescOnce.Do(func() { + file_nebius_annotations_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_annotations_proto_rawDescData) + }) + return file_nebius_annotations_proto_rawDescData +} + +var file_nebius_annotations_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_annotations_proto_goTypes = []any{ + (ResourceBehavior)(0), // 0: nebius.ResourceBehavior + (FieldBehavior)(0), // 1: nebius.FieldBehavior + (*RegionRouting)(nil), // 2: nebius.RegionRouting + (*descriptorpb.FileOptions)(nil), // 3: google.protobuf.FileOptions + (*descriptorpb.ServiceOptions)(nil), // 4: google.protobuf.ServiceOptions + (*descriptorpb.MethodOptions)(nil), // 5: google.protobuf.MethodOptions + (*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions + (*descriptorpb.FieldOptions)(nil), // 7: google.protobuf.FieldOptions + (*descriptorpb.OneofOptions)(nil), // 8: google.protobuf.OneofOptions +} +var file_nebius_annotations_proto_depIdxs = []int32{ + 3, // 0: nebius.unstable:extendee -> google.protobuf.FileOptions + 4, // 1: nebius.api_service_name:extendee -> google.protobuf.ServiceOptions + 5, // 2: nebius.region_routing:extendee -> google.protobuf.MethodOptions + 6, // 3: nebius.resource_behavior:extendee -> google.protobuf.MessageOptions + 7, // 4: nebius.field_behavior:extendee -> google.protobuf.FieldOptions + 7, // 5: nebius.sensitive:extendee -> google.protobuf.FieldOptions + 7, // 6: nebius.credentials:extendee -> google.protobuf.FieldOptions + 8, // 7: nebius.oneof_behavior:extendee -> google.protobuf.OneofOptions + 2, // 8: nebius.region_routing:type_name -> nebius.RegionRouting + 0, // 9: nebius.resource_behavior:type_name -> nebius.ResourceBehavior + 1, // 10: nebius.field_behavior:type_name -> nebius.FieldBehavior + 1, // 11: nebius.oneof_behavior:type_name -> nebius.FieldBehavior + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 8, // [8:12] is the sub-list for extension type_name + 0, // [0:8] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_annotations_proto_init() } +func file_nebius_annotations_proto_init() { + if File_nebius_annotations_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_annotations_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RegionRouting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_annotations_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 8, + NumServices: 0, + }, + GoTypes: file_nebius_annotations_proto_goTypes, + DependencyIndexes: file_nebius_annotations_proto_depIdxs, + EnumInfos: file_nebius_annotations_proto_enumTypes, + MessageInfos: file_nebius_annotations_proto_msgTypes, + ExtensionInfos: file_nebius_annotations_proto_extTypes, + }.Build() + File_nebius_annotations_proto = out.File + file_nebius_annotations_proto_rawDesc = nil + file_nebius_annotations_proto_goTypes = nil + file_nebius_annotations_proto_depIdxs = nil +} diff --git a/proto/nebius/applications/v1alpha1/k8s_release.pb.go b/proto/nebius/applications/v1alpha1/k8s_release.pb.go new file mode 100644 index 0000000..54cc301 --- /dev/null +++ b/proto/nebius/applications/v1alpha1/k8s_release.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/applications/v1alpha1/k8s_release.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type K8SReleaseStatus_State int32 + +const ( + K8SReleaseStatus_UNSPECIFIED K8SReleaseStatus_State = 0 + K8SReleaseStatus_CREATED K8SReleaseStatus_State = 1 + K8SReleaseStatus_RUNNING K8SReleaseStatus_State = 2 + K8SReleaseStatus_DEPLOYED K8SReleaseStatus_State = 3 + K8SReleaseStatus_FAILED K8SReleaseStatus_State = 4 +) + +// Enum value maps for K8SReleaseStatus_State. +var ( + K8SReleaseStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATED", + 2: "RUNNING", + 3: "DEPLOYED", + 4: "FAILED", + } + K8SReleaseStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATED": 1, + "RUNNING": 2, + "DEPLOYED": 3, + "FAILED": 4, + } +) + +func (x K8SReleaseStatus_State) Enum() *K8SReleaseStatus_State { + p := new(K8SReleaseStatus_State) + *p = x + return p +} + +func (x K8SReleaseStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (K8SReleaseStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_applications_v1alpha1_k8s_release_proto_enumTypes[0].Descriptor() +} + +func (K8SReleaseStatus_State) Type() protoreflect.EnumType { + return &file_nebius_applications_v1alpha1_k8s_release_proto_enumTypes[0] +} + +func (x K8SReleaseStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use K8SReleaseStatus_State.Descriptor instead. +func (K8SReleaseStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_proto_rawDescGZIP(), []int{2, 0} +} + +type K8SRelease struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *K8SReleaseSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *K8SReleaseStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *K8SRelease) Reset() { + *x = K8SRelease{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *K8SRelease) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*K8SRelease) ProtoMessage() {} + +func (x *K8SRelease) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use K8SRelease.ProtoReflect.Descriptor instead. +func (*K8SRelease) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_proto_rawDescGZIP(), []int{0} +} + +func (x *K8SRelease) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *K8SRelease) GetSpec() *K8SReleaseSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *K8SRelease) GetStatus() *K8SReleaseStatus { + if x != nil { + return x.Status + } + return nil +} + +type K8SReleaseSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` + ProductSlug string `protobuf:"bytes,2,opt,name=product_slug,json=productSlug,proto3" json:"product_slug,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + ApplicationName string `protobuf:"bytes,4,opt,name=application_name,json=applicationName,proto3" json:"application_name,omitempty"` + Values string `protobuf:"bytes,5,opt,name=values,proto3" json:"values,omitempty"` + Set map[string]string `protobuf:"bytes,6,rep,name=set,proto3" json:"set,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *K8SReleaseSpec) Reset() { + *x = K8SReleaseSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *K8SReleaseSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*K8SReleaseSpec) ProtoMessage() {} + +func (x *K8SReleaseSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use K8SReleaseSpec.ProtoReflect.Descriptor instead. +func (*K8SReleaseSpec) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_proto_rawDescGZIP(), []int{1} +} + +func (x *K8SReleaseSpec) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +func (x *K8SReleaseSpec) GetProductSlug() string { + if x != nil { + return x.ProductSlug + } + return "" +} + +func (x *K8SReleaseSpec) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *K8SReleaseSpec) GetApplicationName() string { + if x != nil { + return x.ApplicationName + } + return "" +} + +func (x *K8SReleaseSpec) GetValues() string { + if x != nil { + return x.Values + } + return "" +} + +func (x *K8SReleaseSpec) GetSet() map[string]string { + if x != nil { + return x.Set + } + return nil +} + +type K8SReleaseStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State K8SReleaseStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.applications.v1alpha1.K8SReleaseStatus_State" json:"state,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` +} + +func (x *K8SReleaseStatus) Reset() { + *x = K8SReleaseStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *K8SReleaseStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*K8SReleaseStatus) ProtoMessage() {} + +func (x *K8SReleaseStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use K8SReleaseStatus.ProtoReflect.Descriptor instead. +func (*K8SReleaseStatus) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_proto_rawDescGZIP(), []int{2} +} + +func (x *K8SReleaseStatus) GetState() K8SReleaseStatus_State { + if x != nil { + return x.State + } + return K8SReleaseStatus_UNSPECIFIED +} + +func (x *K8SReleaseStatus) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_nebius_applications_v1alpha1_k8s_release_proto protoreflect.FileDescriptor + +var file_nebius_applications_v1alpha1_k8s_release_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6b, + 0x38, 0x73, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x01, 0x0a, 0x0a, 0x4b, 0x38, 0x73, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x48, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xf6, 0x02, 0x0a, 0x0e, + 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x29, + 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x5f, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0b, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x53, 0x6c, 0x75, 0x67, 0x12, 0x28, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x35, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x4a, 0x01, 0x04, 0xc0, + 0x4a, 0x01, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x03, 0x73, 0x65, + 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x07, + 0xba, 0x4a, 0x01, 0x04, 0xc0, 0x4a, 0x01, 0x52, 0x03, 0x73, 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, + 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4c, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x42, 0x74, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x0f, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_applications_v1alpha1_k8s_release_proto_rawDescOnce sync.Once + file_nebius_applications_v1alpha1_k8s_release_proto_rawDescData = file_nebius_applications_v1alpha1_k8s_release_proto_rawDesc +) + +func file_nebius_applications_v1alpha1_k8s_release_proto_rawDescGZIP() []byte { + file_nebius_applications_v1alpha1_k8s_release_proto_rawDescOnce.Do(func() { + file_nebius_applications_v1alpha1_k8s_release_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_applications_v1alpha1_k8s_release_proto_rawDescData) + }) + return file_nebius_applications_v1alpha1_k8s_release_proto_rawDescData +} + +var file_nebius_applications_v1alpha1_k8s_release_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_applications_v1alpha1_k8s_release_proto_goTypes = []any{ + (K8SReleaseStatus_State)(0), // 0: nebius.applications.v1alpha1.K8sReleaseStatus.State + (*K8SRelease)(nil), // 1: nebius.applications.v1alpha1.K8sRelease + (*K8SReleaseSpec)(nil), // 2: nebius.applications.v1alpha1.K8sReleaseSpec + (*K8SReleaseStatus)(nil), // 3: nebius.applications.v1alpha1.K8sReleaseStatus + nil, // 4: nebius.applications.v1alpha1.K8sReleaseSpec.SetEntry + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata +} +var file_nebius_applications_v1alpha1_k8s_release_proto_depIdxs = []int32{ + 5, // 0: nebius.applications.v1alpha1.K8sRelease.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.applications.v1alpha1.K8sRelease.spec:type_name -> nebius.applications.v1alpha1.K8sReleaseSpec + 3, // 2: nebius.applications.v1alpha1.K8sRelease.status:type_name -> nebius.applications.v1alpha1.K8sReleaseStatus + 4, // 3: nebius.applications.v1alpha1.K8sReleaseSpec.set:type_name -> nebius.applications.v1alpha1.K8sReleaseSpec.SetEntry + 0, // 4: nebius.applications.v1alpha1.K8sReleaseStatus.state:type_name -> nebius.applications.v1alpha1.K8sReleaseStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_applications_v1alpha1_k8s_release_proto_init() } +func file_nebius_applications_v1alpha1_k8s_release_proto_init() { + if File_nebius_applications_v1alpha1_k8s_release_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*K8SRelease); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*K8SReleaseSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*K8SReleaseStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_applications_v1alpha1_k8s_release_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_applications_v1alpha1_k8s_release_proto_goTypes, + DependencyIndexes: file_nebius_applications_v1alpha1_k8s_release_proto_depIdxs, + EnumInfos: file_nebius_applications_v1alpha1_k8s_release_proto_enumTypes, + MessageInfos: file_nebius_applications_v1alpha1_k8s_release_proto_msgTypes, + }.Build() + File_nebius_applications_v1alpha1_k8s_release_proto = out.File + file_nebius_applications_v1alpha1_k8s_release_proto_rawDesc = nil + file_nebius_applications_v1alpha1_k8s_release_proto_goTypes = nil + file_nebius_applications_v1alpha1_k8s_release_proto_depIdxs = nil +} diff --git a/proto/nebius/applications/v1alpha1/k8s_release.sensitive.pb.go b/proto/nebius/applications/v1alpha1/k8s_release.sensitive.pb.go new file mode 100644 index 0000000..9d15c0c --- /dev/null +++ b/proto/nebius/applications/v1alpha1/k8s_release.sensitive.pb.go @@ -0,0 +1,101 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [K8SRelease] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *K8SRelease) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [K8SRelease]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *K8SRelease +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [K8SRelease], use the following code: +// +// var original *K8SRelease +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*K8SRelease) +func (x *K8SRelease) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*K8SRelease) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperK8SRelease)(c)) +} + +// wrapperK8SRelease is used to return [K8SRelease] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperK8SRelease K8SRelease + +func (w *wrapperK8SRelease) String() string { + return (*K8SRelease)(w).String() +} + +func (*wrapperK8SRelease) ProtoMessage() {} + +func (w *wrapperK8SRelease) ProtoReflect() protoreflect.Message { + return (*K8SRelease)(w).ProtoReflect() +} + +// Sanitize mutates [K8SReleaseSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *K8SReleaseSpec) Sanitize() { + if x == nil { + return + } + x.Values = "***" + x.Set = map[string]string{"***": "***"} +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [K8SReleaseSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *K8SReleaseSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [K8SReleaseSpec], use the following code: +// +// var original *K8SReleaseSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*K8SReleaseSpec) +func (x *K8SReleaseSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*K8SReleaseSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperK8SReleaseSpec)(c)) +} + +// wrapperK8SReleaseSpec is used to return [K8SReleaseSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperK8SReleaseSpec K8SReleaseSpec + +func (w *wrapperK8SReleaseSpec) String() string { + return (*K8SReleaseSpec)(w).String() +} + +func (*wrapperK8SReleaseSpec) ProtoMessage() {} + +func (w *wrapperK8SReleaseSpec) ProtoReflect() protoreflect.Message { + return (*K8SReleaseSpec)(w).ProtoReflect() +} + +// func (x *K8SReleaseStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *K8SReleaseStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/applications/v1alpha1/k8s_release_service.pb.go b/proto/nebius/applications/v1alpha1/k8s_release_service.pb.go new file mode 100644 index 0000000..c350bdd --- /dev/null +++ b/proto/nebius/applications/v1alpha1/k8s_release_service.pb.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/applications/v1alpha1/k8s_release_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetK8SReleaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetK8SReleaseRequest) Reset() { + *x = GetK8SReleaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetK8SReleaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetK8SReleaseRequest) ProtoMessage() {} + +func (x *GetK8SReleaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetK8SReleaseRequest.ProtoReflect.Descriptor instead. +func (*GetK8SReleaseRequest) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetK8SReleaseRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListK8SReleasesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + ClusterId string `protobuf:"bytes,5,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` +} + +func (x *ListK8SReleasesRequest) Reset() { + *x = ListK8SReleasesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListK8SReleasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListK8SReleasesRequest) ProtoMessage() {} + +func (x *ListK8SReleasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListK8SReleasesRequest.ProtoReflect.Descriptor instead. +func (*ListK8SReleasesRequest) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListK8SReleasesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListK8SReleasesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListK8SReleasesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListK8SReleasesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListK8SReleasesRequest) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + +type CreateK8SReleaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *K8SReleaseSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateK8SReleaseRequest) Reset() { + *x = CreateK8SReleaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateK8SReleaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateK8SReleaseRequest) ProtoMessage() {} + +func (x *CreateK8SReleaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateK8SReleaseRequest.ProtoReflect.Descriptor instead. +func (*CreateK8SReleaseRequest) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateK8SReleaseRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateK8SReleaseRequest) GetSpec() *K8SReleaseSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteK8SReleaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteK8SReleaseRequest) Reset() { + *x = DeleteK8SReleaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteK8SReleaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteK8SReleaseRequest) ProtoMessage() {} + +func (x *DeleteK8SReleaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteK8SReleaseRequest.ProtoReflect.Descriptor instead. +func (*DeleteK8SReleaseRequest) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteK8SReleaseRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListK8SReleasesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*K8SRelease `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListK8SReleasesResponse) Reset() { + *x = ListK8SReleasesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListK8SReleasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListK8SReleasesResponse) ProtoMessage() {} + +func (x *ListK8SReleasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListK8SReleasesResponse.ProtoReflect.Descriptor instead. +func (*ListK8SReleasesResponse) Descriptor() ([]byte, []int) { + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListK8SReleasesResponse) GetItems() []*K8SRelease { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListK8SReleasesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_applications_v1alpha1_k8s_release_service_proto protoreflect.FileDescriptor + +var file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6b, + 0x38, 0x73, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6b, 0x38, 0x73, 0x5f, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0xb8, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, + 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x17, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x81, 0x01, 0x0a, + 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x32, 0xc4, 0x03, 0x0a, 0x11, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x32, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x38, 0x73, + 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5c, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4b, 0x38, 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x38, + 0x73, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x19, 0xba, 0x4a, + 0x16, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x6d, 0x6b, 0x74, 0x42, 0x7b, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x16, + 0x4b, 0x38, 0x53, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescOnce sync.Once + file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescData = file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDesc +) + +func file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescGZIP() []byte { + file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescOnce.Do(func() { + file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescData) + }) + return file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDescData +} + +var file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_applications_v1alpha1_k8s_release_service_proto_goTypes = []any{ + (*GetK8SReleaseRequest)(nil), // 0: nebius.applications.v1alpha1.GetK8sReleaseRequest + (*ListK8SReleasesRequest)(nil), // 1: nebius.applications.v1alpha1.ListK8sReleasesRequest + (*CreateK8SReleaseRequest)(nil), // 2: nebius.applications.v1alpha1.CreateK8sReleaseRequest + (*DeleteK8SReleaseRequest)(nil), // 3: nebius.applications.v1alpha1.DeleteK8sReleaseRequest + (*ListK8SReleasesResponse)(nil), // 4: nebius.applications.v1alpha1.ListK8sReleasesResponse + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata + (*K8SReleaseSpec)(nil), // 6: nebius.applications.v1alpha1.K8sReleaseSpec + (*K8SRelease)(nil), // 7: nebius.applications.v1alpha1.K8sRelease + (*v1.Operation)(nil), // 8: nebius.common.v1.Operation +} +var file_nebius_applications_v1alpha1_k8s_release_service_proto_depIdxs = []int32{ + 5, // 0: nebius.applications.v1alpha1.CreateK8sReleaseRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 6, // 1: nebius.applications.v1alpha1.CreateK8sReleaseRequest.spec:type_name -> nebius.applications.v1alpha1.K8sReleaseSpec + 7, // 2: nebius.applications.v1alpha1.ListK8sReleasesResponse.items:type_name -> nebius.applications.v1alpha1.K8sRelease + 0, // 3: nebius.applications.v1alpha1.K8sReleaseService.Get:input_type -> nebius.applications.v1alpha1.GetK8sReleaseRequest + 1, // 4: nebius.applications.v1alpha1.K8sReleaseService.List:input_type -> nebius.applications.v1alpha1.ListK8sReleasesRequest + 2, // 5: nebius.applications.v1alpha1.K8sReleaseService.Create:input_type -> nebius.applications.v1alpha1.CreateK8sReleaseRequest + 3, // 6: nebius.applications.v1alpha1.K8sReleaseService.Delete:input_type -> nebius.applications.v1alpha1.DeleteK8sReleaseRequest + 7, // 7: nebius.applications.v1alpha1.K8sReleaseService.Get:output_type -> nebius.applications.v1alpha1.K8sRelease + 4, // 8: nebius.applications.v1alpha1.K8sReleaseService.List:output_type -> nebius.applications.v1alpha1.ListK8sReleasesResponse + 8, // 9: nebius.applications.v1alpha1.K8sReleaseService.Create:output_type -> nebius.common.v1.Operation + 8, // 10: nebius.applications.v1alpha1.K8sReleaseService.Delete:output_type -> nebius.common.v1.Operation + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_applications_v1alpha1_k8s_release_service_proto_init() } +func file_nebius_applications_v1alpha1_k8s_release_service_proto_init() { + if File_nebius_applications_v1alpha1_k8s_release_service_proto != nil { + return + } + file_nebius_applications_v1alpha1_k8s_release_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetK8SReleaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListK8SReleasesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateK8SReleaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DeleteK8SReleaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListK8SReleasesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_applications_v1alpha1_k8s_release_service_proto_goTypes, + DependencyIndexes: file_nebius_applications_v1alpha1_k8s_release_service_proto_depIdxs, + MessageInfos: file_nebius_applications_v1alpha1_k8s_release_service_proto_msgTypes, + }.Build() + File_nebius_applications_v1alpha1_k8s_release_service_proto = out.File + file_nebius_applications_v1alpha1_k8s_release_service_proto_rawDesc = nil + file_nebius_applications_v1alpha1_k8s_release_service_proto_goTypes = nil + file_nebius_applications_v1alpha1_k8s_release_service_proto_depIdxs = nil +} diff --git a/proto/nebius/applications/v1alpha1/k8s_release_service.sensitive.pb.go b/proto/nebius/applications/v1alpha1/k8s_release_service.sensitive.pb.go new file mode 100644 index 0000000..e58c91f --- /dev/null +++ b/proto/nebius/applications/v1alpha1/k8s_release_service.sensitive.pb.go @@ -0,0 +1,108 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetK8SReleaseRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetK8SReleaseRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListK8SReleasesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListK8SReleasesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [CreateK8SReleaseRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateK8SReleaseRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateK8SReleaseRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateK8SReleaseRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateK8SReleaseRequest], use the following code: +// +// var original *CreateK8SReleaseRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateK8SReleaseRequest) +func (x *CreateK8SReleaseRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateK8SReleaseRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateK8SReleaseRequest)(c)) +} + +// wrapperCreateK8SReleaseRequest is used to return [CreateK8SReleaseRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateK8SReleaseRequest CreateK8SReleaseRequest + +func (w *wrapperCreateK8SReleaseRequest) String() string { + return (*CreateK8SReleaseRequest)(w).String() +} + +func (*wrapperCreateK8SReleaseRequest) ProtoMessage() {} + +func (w *wrapperCreateK8SReleaseRequest) ProtoReflect() protoreflect.Message { + return (*CreateK8SReleaseRequest)(w).ProtoReflect() +} + +// func (x *DeleteK8SReleaseRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteK8SReleaseRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListK8SReleasesResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListK8SReleasesResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListK8SReleasesResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListK8SReleasesResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListK8SReleasesResponse], use the following code: +// +// var original *ListK8SReleasesResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListK8SReleasesResponse) +func (x *ListK8SReleasesResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListK8SReleasesResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListK8SReleasesResponse)(c)) +} + +// wrapperListK8SReleasesResponse is used to return [ListK8SReleasesResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListK8SReleasesResponse ListK8SReleasesResponse + +func (w *wrapperListK8SReleasesResponse) String() string { + return (*ListK8SReleasesResponse)(w).String() +} + +func (*wrapperListK8SReleasesResponse) ProtoMessage() {} + +func (w *wrapperListK8SReleasesResponse) ProtoReflect() protoreflect.Message { + return (*ListK8SReleasesResponse)(w).ProtoReflect() +} diff --git a/proto/nebius/applications/v1alpha1/k8s_release_service_grpc.pb.go b/proto/nebius/applications/v1alpha1/k8s_release_service_grpc.pb.go new file mode 100644 index 0000000..9c7c6c7 --- /dev/null +++ b/proto/nebius/applications/v1alpha1/k8s_release_service_grpc.pb.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/applications/v1alpha1/k8s_release_service.proto + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + K8SReleaseService_Get_FullMethodName = "/nebius.applications.v1alpha1.K8sReleaseService/Get" + K8SReleaseService_List_FullMethodName = "/nebius.applications.v1alpha1.K8sReleaseService/List" + K8SReleaseService_Create_FullMethodName = "/nebius.applications.v1alpha1.K8sReleaseService/Create" + K8SReleaseService_Delete_FullMethodName = "/nebius.applications.v1alpha1.K8sReleaseService/Delete" +) + +// K8SReleaseServiceClient is the client API for K8SReleaseService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type K8SReleaseServiceClient interface { + Get(ctx context.Context, in *GetK8SReleaseRequest, opts ...grpc.CallOption) (*K8SRelease, error) + List(ctx context.Context, in *ListK8SReleasesRequest, opts ...grpc.CallOption) (*ListK8SReleasesResponse, error) + Create(ctx context.Context, in *CreateK8SReleaseRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteK8SReleaseRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type k8SReleaseServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewK8SReleaseServiceClient(cc grpc.ClientConnInterface) K8SReleaseServiceClient { + return &k8SReleaseServiceClient{cc} +} + +func (c *k8SReleaseServiceClient) Get(ctx context.Context, in *GetK8SReleaseRequest, opts ...grpc.CallOption) (*K8SRelease, error) { + out := new(K8SRelease) + err := c.cc.Invoke(ctx, K8SReleaseService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *k8SReleaseServiceClient) List(ctx context.Context, in *ListK8SReleasesRequest, opts ...grpc.CallOption) (*ListK8SReleasesResponse, error) { + out := new(ListK8SReleasesResponse) + err := c.cc.Invoke(ctx, K8SReleaseService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *k8SReleaseServiceClient) Create(ctx context.Context, in *CreateK8SReleaseRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, K8SReleaseService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *k8SReleaseServiceClient) Delete(ctx context.Context, in *DeleteK8SReleaseRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, K8SReleaseService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// K8SReleaseServiceServer is the server API for K8SReleaseService service. +// All implementations should embed UnimplementedK8SReleaseServiceServer +// for forward compatibility +type K8SReleaseServiceServer interface { + Get(context.Context, *GetK8SReleaseRequest) (*K8SRelease, error) + List(context.Context, *ListK8SReleasesRequest) (*ListK8SReleasesResponse, error) + Create(context.Context, *CreateK8SReleaseRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteK8SReleaseRequest) (*v1.Operation, error) +} + +// UnimplementedK8SReleaseServiceServer should be embedded to have forward compatible implementations. +type UnimplementedK8SReleaseServiceServer struct { +} + +func (UnimplementedK8SReleaseServiceServer) Get(context.Context, *GetK8SReleaseRequest) (*K8SRelease, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedK8SReleaseServiceServer) List(context.Context, *ListK8SReleasesRequest) (*ListK8SReleasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedK8SReleaseServiceServer) Create(context.Context, *CreateK8SReleaseRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedK8SReleaseServiceServer) Delete(context.Context, *DeleteK8SReleaseRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeK8SReleaseServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to K8SReleaseServiceServer will +// result in compilation errors. +type UnsafeK8SReleaseServiceServer interface { + mustEmbedUnimplementedK8SReleaseServiceServer() +} + +func RegisterK8SReleaseServiceServer(s grpc.ServiceRegistrar, srv K8SReleaseServiceServer) { + s.RegisterService(&K8SReleaseService_ServiceDesc, srv) +} + +func _K8SReleaseService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetK8SReleaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(K8SReleaseServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: K8SReleaseService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(K8SReleaseServiceServer).Get(ctx, req.(*GetK8SReleaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _K8SReleaseService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListK8SReleasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(K8SReleaseServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: K8SReleaseService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(K8SReleaseServiceServer).List(ctx, req.(*ListK8SReleasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _K8SReleaseService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateK8SReleaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(K8SReleaseServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: K8SReleaseService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(K8SReleaseServiceServer).Create(ctx, req.(*CreateK8SReleaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _K8SReleaseService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteK8SReleaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(K8SReleaseServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: K8SReleaseService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(K8SReleaseServiceServer).Delete(ctx, req.(*DeleteK8SReleaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// K8SReleaseService_ServiceDesc is the grpc.ServiceDesc for K8SReleaseService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var K8SReleaseService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.applications.v1alpha1.K8sReleaseService", + HandlerType: (*K8SReleaseServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _K8SReleaseService_Get_Handler, + }, + { + MethodName: "List", + Handler: _K8SReleaseService_List_Handler, + }, + { + MethodName: "Create", + Handler: _K8SReleaseService_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _K8SReleaseService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/applications/v1alpha1/k8s_release_service.proto", +} diff --git a/proto/nebius/common/error/v1alpha1/common_errors.pb.go b/proto/nebius/common/error/v1alpha1/common_errors.pb.go new file mode 100644 index 0000000..e291fd9 --- /dev/null +++ b/proto/nebius/common/error/v1alpha1/common_errors.pb.go @@ -0,0 +1,1143 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/common/error/v1alpha1/common_errors.proto is a deprecated file. + +package v1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The request is invalid. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type BadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all violations. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Violations []*BadRequest_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` +} + +func (x *BadRequest) Reset() { + *x = BadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadRequest) ProtoMessage() {} + +func (x *BadRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadRequest.ProtoReflect.Descriptor instead. +func (*BadRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *BadRequest) GetViolations() []*BadRequest_Violation { + if x != nil { + return x.Violations + } + return nil +} + +// The resource we are trying to use, create, change or delete is in a bad state and cannot be used. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type BadResourceState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the resource which is bad. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // The reason why this state is bad and cannot be used. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *BadResourceState) Reset() { + *x = BadResourceState{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadResourceState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadResourceState) ProtoMessage() {} + +func (x *BadResourceState) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadResourceState.ProtoReflect.Descriptor instead. +func (*BadResourceState) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *BadResourceState) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *BadResourceState) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Resource we are trying to interact with does not exist. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type ResourceNotFound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the requested resource. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *ResourceNotFound) Reset() { + *x = ResourceNotFound{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceNotFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceNotFound) ProtoMessage() {} + +func (x *ResourceNotFound) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceNotFound.ProtoReflect.Descriptor instead. +func (*ResourceNotFound) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *ResourceNotFound) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Resource we are trying to create already exists. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type ResourceAlreadyExists struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the existing resource. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *ResourceAlreadyExists) Reset() { + *x = ResourceAlreadyExists{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceAlreadyExists) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceAlreadyExists) ProtoMessage() {} + +func (x *ResourceAlreadyExists) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceAlreadyExists.ProtoReflect.Descriptor instead. +func (*ResourceAlreadyExists) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *ResourceAlreadyExists) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// There is a difference between the actual resource state and the expected one. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type ResourceConflict struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of conflicting resource. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Detailed info about conflict. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ResourceConflict) Reset() { + *x = ResourceConflict{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceConflict) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceConflict) ProtoMessage() {} + +func (x *ResourceConflict) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceConflict.ProtoReflect.Descriptor instead. +func (*ResourceConflict) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *ResourceConflict) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *ResourceConflict) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Operation on the resource has been aborted by a subsequent operation. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type OperationAborted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the aborted operation + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // ID of the subsequent operation + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + AbortedByOperationId string `protobuf:"bytes,2,opt,name=aborted_by_operation_id,json=abortedByOperationId,proto3" json:"aborted_by_operation_id,omitempty"` + // Resource ID corresponding to both of the operations + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *OperationAborted) Reset() { + *x = OperationAborted{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationAborted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationAborted) ProtoMessage() {} + +func (x *OperationAborted) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationAborted.ProtoReflect.Descriptor instead. +func (*OperationAborted) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *OperationAborted) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *OperationAborted) GetAbortedByOperationId() string { + if x != nil { + return x.AbortedByOperationId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *OperationAborted) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Indicates that element with requested parameters is exceeding the particular range. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type OutOfRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Requested value. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Requested string `protobuf:"bytes,1,opt,name=requested,proto3" json:"requested,omitempty"` + // Available limit. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Limit string `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *OutOfRange) Reset() { + *x = OutOfRange{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutOfRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutOfRange) ProtoMessage() {} + +func (x *OutOfRange) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutOfRange.ProtoReflect.Descriptor instead. +func (*OutOfRange) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{6} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *OutOfRange) GetRequested() string { + if x != nil { + return x.Requested + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *OutOfRange) GetLimit() string { + if x != nil { + return x.Limit + } + return "" +} + +// Indicates that the action cannot be performed because there are insufficient access rights to a resource. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type PermissionDenied struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the resource that cannot be accessed. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *PermissionDenied) Reset() { + *x = PermissionDenied{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionDenied) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionDenied) ProtoMessage() {} + +func (x *PermissionDenied) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionDenied.ProtoReflect.Descriptor instead. +func (*PermissionDenied) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{7} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *PermissionDenied) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Generic internal error. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type InternalError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Error request ID. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Trace ID for the failing request. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` +} + +func (x *InternalError) Reset() { + *x = InternalError{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalError) ProtoMessage() {} + +func (x *InternalError) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalError.ProtoReflect.Descriptor instead. +func (*InternalError) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{8} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *InternalError) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *InternalError) GetTraceId() string { + if x != nil { + return x.TraceId + } + return "" +} + +// You initiated too many requests to the service at once. Enhance your calm. +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type TooManyRequests struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // What request limit is exceeded (service-dependent). + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Violation string `protobuf:"bytes,1,opt,name=violation,proto3" json:"violation,omitempty"` +} + +func (x *TooManyRequests) Reset() { + *x = TooManyRequests{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TooManyRequests) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TooManyRequests) ProtoMessage() {} + +func (x *TooManyRequests) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TooManyRequests.ProtoReflect.Descriptor instead. +func (*TooManyRequests) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{9} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *TooManyRequests) GetViolation() string { + if x != nil { + return x.Violation + } + return "" +} + +// Indicates a failure due to exceeding specified limits or allocations in a system or service +// +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type QuotaFailure struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all quota violations + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Violations []*QuotaFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` +} + +func (x *QuotaFailure) Reset() { + *x = QuotaFailure{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuotaFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaFailure) ProtoMessage() {} + +func (x *QuotaFailure) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaFailure.ProtoReflect.Descriptor instead. +func (*QuotaFailure) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{10} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *QuotaFailure) GetViolations() []*QuotaFailure_Violation { + if x != nil { + return x.Violations + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type BadRequest_Violation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // What field value is invalid. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + // Description why the value is invalid, in English. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *BadRequest_Violation) Reset() { + *x = BadRequest_Violation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadRequest_Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadRequest_Violation) ProtoMessage() {} + +func (x *BadRequest_Violation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadRequest_Violation.ProtoReflect.Descriptor instead. +func (*BadRequest_Violation) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{0, 0} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *BadRequest_Violation) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *BadRequest_Violation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +type QuotaFailure_Violation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Which quota check failed. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Quota string `protobuf:"bytes,1,opt,name=quota,proto3" json:"quota,omitempty"` + // A description of how the quota check failed. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // Maximum permissible value. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Limit string `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` + // Requested value. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. + Requested string `protobuf:"bytes,4,opt,name=requested,proto3" json:"requested,omitempty"` +} + +func (x *QuotaFailure_Violation) Reset() { + *x = QuotaFailure_Violation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuotaFailure_Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaFailure_Violation) ProtoMessage() {} + +func (x *QuotaFailure_Violation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaFailure_Violation.ProtoReflect.Descriptor instead. +func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP(), []int{10, 0} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *QuotaFailure_Violation) GetQuota() string { + if x != nil { + return x.Quota + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *QuotaFailure_Violation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *QuotaFailure_Violation) GetLimit() string { + if x != nil { + return x.Limit + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/common_errors.proto is marked as deprecated. +func (x *QuotaFailure_Violation) GetRequested() string { + if x != nil { + return x.Requested + } + return "" +} + +var File_nebius_common_error_v1alpha1_common_errors_proto protoreflect.FileDescriptor + +var file_nebius_common_error_v1alpha1_common_errors_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x22, 0x9d, 0x01, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x52, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x69, + 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x3b, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x4d, 0x0a, 0x10, 0x42, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x33, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, + 0x75, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x4d, + 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x8d, 0x01, + 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, + 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x40, 0x0a, + 0x0a, 0x4f, 0x75, 0x74, 0x4f, 0x66, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, + 0x33, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, + 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, + 0x2f, 0x0a, 0x0f, 0x54, 0x6f, 0x6f, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xd5, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6f, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x79, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x11, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_error_v1alpha1_common_errors_proto_rawDescOnce sync.Once + file_nebius_common_error_v1alpha1_common_errors_proto_rawDescData = file_nebius_common_error_v1alpha1_common_errors_proto_rawDesc +) + +func file_nebius_common_error_v1alpha1_common_errors_proto_rawDescGZIP() []byte { + file_nebius_common_error_v1alpha1_common_errors_proto_rawDescOnce.Do(func() { + file_nebius_common_error_v1alpha1_common_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_error_v1alpha1_common_errors_proto_rawDescData) + }) + return file_nebius_common_error_v1alpha1_common_errors_proto_rawDescData +} + +var file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_nebius_common_error_v1alpha1_common_errors_proto_goTypes = []any{ + (*BadRequest)(nil), // 0: nebius.common.error.v1alpha1.BadRequest + (*BadResourceState)(nil), // 1: nebius.common.error.v1alpha1.BadResourceState + (*ResourceNotFound)(nil), // 2: nebius.common.error.v1alpha1.ResourceNotFound + (*ResourceAlreadyExists)(nil), // 3: nebius.common.error.v1alpha1.ResourceAlreadyExists + (*ResourceConflict)(nil), // 4: nebius.common.error.v1alpha1.ResourceConflict + (*OperationAborted)(nil), // 5: nebius.common.error.v1alpha1.OperationAborted + (*OutOfRange)(nil), // 6: nebius.common.error.v1alpha1.OutOfRange + (*PermissionDenied)(nil), // 7: nebius.common.error.v1alpha1.PermissionDenied + (*InternalError)(nil), // 8: nebius.common.error.v1alpha1.InternalError + (*TooManyRequests)(nil), // 9: nebius.common.error.v1alpha1.TooManyRequests + (*QuotaFailure)(nil), // 10: nebius.common.error.v1alpha1.QuotaFailure + (*BadRequest_Violation)(nil), // 11: nebius.common.error.v1alpha1.BadRequest.Violation + (*QuotaFailure_Violation)(nil), // 12: nebius.common.error.v1alpha1.QuotaFailure.Violation +} +var file_nebius_common_error_v1alpha1_common_errors_proto_depIdxs = []int32{ + 11, // 0: nebius.common.error.v1alpha1.BadRequest.violations:type_name -> nebius.common.error.v1alpha1.BadRequest.Violation + 12, // 1: nebius.common.error.v1alpha1.QuotaFailure.violations:type_name -> nebius.common.error.v1alpha1.QuotaFailure.Violation + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_nebius_common_error_v1alpha1_common_errors_proto_init() } +func file_nebius_common_error_v1alpha1_common_errors_proto_init() { + if File_nebius_common_error_v1alpha1_common_errors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*BadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*BadResourceState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ResourceNotFound); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ResourceAlreadyExists); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ResourceConflict); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*OperationAborted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*OutOfRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*PermissionDenied); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*InternalError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*TooManyRequests); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*QuotaFailure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*BadRequest_Violation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*QuotaFailure_Violation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_error_v1alpha1_common_errors_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_error_v1alpha1_common_errors_proto_goTypes, + DependencyIndexes: file_nebius_common_error_v1alpha1_common_errors_proto_depIdxs, + MessageInfos: file_nebius_common_error_v1alpha1_common_errors_proto_msgTypes, + }.Build() + File_nebius_common_error_v1alpha1_common_errors_proto = out.File + file_nebius_common_error_v1alpha1_common_errors_proto_rawDesc = nil + file_nebius_common_error_v1alpha1_common_errors_proto_goTypes = nil + file_nebius_common_error_v1alpha1_common_errors_proto_depIdxs = nil +} diff --git a/proto/nebius/common/error/v1alpha1/common_errors.sensitive.pb.go b/proto/nebius/common/error/v1alpha1/common_errors.sensitive.pb.go new file mode 100644 index 0000000..9780c15 --- /dev/null +++ b/proto/nebius/common/error/v1alpha1/common_errors.sensitive.pb.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *BadRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *BadRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BadResourceState) Sanitize() // is not generated as no sensitive fields found +// func (x *BadResourceState) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceNotFound) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceNotFound) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceAlreadyExists) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceAlreadyExists) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceConflict) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceConflict) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *OperationAborted) Sanitize() // is not generated as no sensitive fields found +// func (x *OperationAborted) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *OutOfRange) Sanitize() // is not generated as no sensitive fields found +// func (x *OutOfRange) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PermissionDenied) Sanitize() // is not generated as no sensitive fields found +// func (x *PermissionDenied) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InternalError) Sanitize() // is not generated as no sensitive fields found +// func (x *InternalError) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *TooManyRequests) Sanitize() // is not generated as no sensitive fields found +// func (x *TooManyRequests) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *QuotaFailure) Sanitize() // is not generated as no sensitive fields found +// func (x *QuotaFailure) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/error/v1alpha1/error.pb.go b/proto/nebius/common/error/v1alpha1/error.pb.go new file mode 100644 index 0000000..944a920 --- /dev/null +++ b/proto/nebius/common/error/v1alpha1/error.pb.go @@ -0,0 +1,556 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/common/error/v1alpha1/error.proto is a deprecated file. + +package v1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +type ServiceError_RetryType int32 + +const ( + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ServiceError_UNSPECIFIED ServiceError_RetryType = 0 + // Just retry the failed call. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ServiceError_CALL ServiceError_RetryType = 1 + // Retry whole logic before call and make a new one. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ServiceError_UNIT_OF_WORK ServiceError_RetryType = 2 + // Do not retry, this is a fatal error. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ServiceError_NOTHING ServiceError_RetryType = 3 +) + +// Enum value maps for ServiceError_RetryType. +var ( + ServiceError_RetryType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CALL", + 2: "UNIT_OF_WORK", + 3: "NOTHING", + } + ServiceError_RetryType_value = map[string]int32{ + "UNSPECIFIED": 0, + "CALL": 1, + "UNIT_OF_WORK": 2, + "NOTHING": 3, + } +) + +func (x ServiceError_RetryType) Enum() *ServiceError_RetryType { + p := new(ServiceError_RetryType) + *p = x + return p +} + +func (x ServiceError_RetryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServiceError_RetryType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_common_error_v1alpha1_error_proto_enumTypes[0].Descriptor() +} + +func (ServiceError_RetryType) Type() protoreflect.EnumType { + return &file_nebius_common_error_v1alpha1_error_proto_enumTypes[0] +} + +func (x ServiceError_RetryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServiceError_RetryType.Descriptor instead. +func (ServiceError_RetryType) EnumDescriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_error_proto_rawDescGZIP(), []int{0, 0} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +type ServiceError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of Service which the error originated in. E.g. "dns". + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // Detailed error code, service-specific. E.g. "DnsZoneNotEmpty". + // Name of the exception, without Exception suffix if not set + // Example: for PermissionDeniedException -> code == PermissionDenied + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Additional message describing the error, if any. + // + // Types that are assignable to Details: + // + // *ServiceError_BadRequest + // *ServiceError_BadResourceState + // *ServiceError_ResourceNotFound + // *ServiceError_ResourceAlreadyExists + // *ServiceError_OutOfRange + // *ServiceError_PermissionDenied + // *ServiceError_ResourceConflict + // *ServiceError_OperationAborted + // *ServiceError_TooManyRequests + // *ServiceError_QuotaFailure + // *ServiceError_InternalError + Details isServiceError_Details `protobuf_oneof:"details"` + // Retry type tells how to provide retry, e.g.: just a single call or the whole logic before it. + // + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + RetryType ServiceError_RetryType `protobuf:"varint,30,opt,name=retry_type,json=retryType,proto3,enum=nebius.common.error.v1alpha1.ServiceError_RetryType" json:"retry_type,omitempty"` +} + +func (x *ServiceError) Reset() { + *x = ServiceError{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_error_v1alpha1_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceError) ProtoMessage() {} + +func (x *ServiceError) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_error_v1alpha1_error_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceError.ProtoReflect.Descriptor instead. +func (*ServiceError) Descriptor() ([]byte, []int) { + return file_nebius_common_error_v1alpha1_error_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (m *ServiceError) GetDetails() isServiceError_Details { + if m != nil { + return m.Details + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetBadRequest() *BadRequest { + if x, ok := x.GetDetails().(*ServiceError_BadRequest); ok { + return x.BadRequest + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetBadResourceState() *BadResourceState { + if x, ok := x.GetDetails().(*ServiceError_BadResourceState); ok { + return x.BadResourceState + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetResourceNotFound() *ResourceNotFound { + if x, ok := x.GetDetails().(*ServiceError_ResourceNotFound); ok { + return x.ResourceNotFound + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetResourceAlreadyExists() *ResourceAlreadyExists { + if x, ok := x.GetDetails().(*ServiceError_ResourceAlreadyExists); ok { + return x.ResourceAlreadyExists + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetOutOfRange() *OutOfRange { + if x, ok := x.GetDetails().(*ServiceError_OutOfRange); ok { + return x.OutOfRange + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetPermissionDenied() *PermissionDenied { + if x, ok := x.GetDetails().(*ServiceError_PermissionDenied); ok { + return x.PermissionDenied + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetResourceConflict() *ResourceConflict { + if x, ok := x.GetDetails().(*ServiceError_ResourceConflict); ok { + return x.ResourceConflict + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetOperationAborted() *OperationAborted { + if x, ok := x.GetDetails().(*ServiceError_OperationAborted); ok { + return x.OperationAborted + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetTooManyRequests() *TooManyRequests { + if x, ok := x.GetDetails().(*ServiceError_TooManyRequests); ok { + return x.TooManyRequests + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetQuotaFailure() *QuotaFailure { + if x, ok := x.GetDetails().(*ServiceError_QuotaFailure); ok { + return x.QuotaFailure + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetInternalError() *InternalError { + if x, ok := x.GetDetails().(*ServiceError_InternalError); ok { + return x.InternalError + } + return nil +} + +// Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. +func (x *ServiceError) GetRetryType() ServiceError_RetryType { + if x != nil { + return x.RetryType + } + return ServiceError_UNSPECIFIED +} + +type isServiceError_Details interface { + isServiceError_Details() +} + +type ServiceError_BadRequest struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + BadRequest *BadRequest `protobuf:"bytes,100,opt,name=bad_request,json=badRequest,proto3,oneof"` +} + +type ServiceError_BadResourceState struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + BadResourceState *BadResourceState `protobuf:"bytes,110,opt,name=bad_resource_state,json=badResourceState,proto3,oneof"` +} + +type ServiceError_ResourceNotFound struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ResourceNotFound *ResourceNotFound `protobuf:"bytes,111,opt,name=resource_not_found,json=resourceNotFound,proto3,oneof"` +} + +type ServiceError_ResourceAlreadyExists struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ResourceAlreadyExists *ResourceAlreadyExists `protobuf:"bytes,112,opt,name=resource_already_exists,json=resourceAlreadyExists,proto3,oneof"` +} + +type ServiceError_OutOfRange struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + OutOfRange *OutOfRange `protobuf:"bytes,113,opt,name=out_of_range,json=outOfRange,proto3,oneof"` +} + +type ServiceError_PermissionDenied struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + PermissionDenied *PermissionDenied `protobuf:"bytes,120,opt,name=permission_denied,json=permissionDenied,proto3,oneof"` +} + +type ServiceError_ResourceConflict struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + ResourceConflict *ResourceConflict `protobuf:"bytes,130,opt,name=resource_conflict,json=resourceConflict,proto3,oneof"` +} + +type ServiceError_OperationAborted struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + OperationAborted *OperationAborted `protobuf:"bytes,131,opt,name=operation_aborted,json=operationAborted,proto3,oneof"` +} + +type ServiceError_TooManyRequests struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + TooManyRequests *TooManyRequests `protobuf:"bytes,140,opt,name=too_many_requests,json=tooManyRequests,proto3,oneof"` +} + +type ServiceError_QuotaFailure struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + QuotaFailure *QuotaFailure `protobuf:"bytes,141,opt,name=quota_failure,json=quotaFailure,proto3,oneof"` +} + +type ServiceError_InternalError struct { + // Deprecated: The entire proto file nebius/common/error/v1alpha1/error.proto is marked as deprecated. + InternalError *InternalError `protobuf:"bytes,999,opt,name=internal_error,json=internalError,proto3,oneof"` +} + +func (*ServiceError_BadRequest) isServiceError_Details() {} + +func (*ServiceError_BadResourceState) isServiceError_Details() {} + +func (*ServiceError_ResourceNotFound) isServiceError_Details() {} + +func (*ServiceError_ResourceAlreadyExists) isServiceError_Details() {} + +func (*ServiceError_OutOfRange) isServiceError_Details() {} + +func (*ServiceError_PermissionDenied) isServiceError_Details() {} + +func (*ServiceError_ResourceConflict) isServiceError_Details() {} + +func (*ServiceError_OperationAborted) isServiceError_Details() {} + +func (*ServiceError_TooManyRequests) isServiceError_Details() {} + +func (*ServiceError_QuotaFailure) isServiceError_Details() {} + +func (*ServiceError_InternalError) isServiceError_Details() {} + +var File_nebius_common_error_v1alpha1_error_proto protoreflect.FileDescriptor + +var file_nebius_common_error_v1alpha1_error_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x30, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x09, 0x0a, 0x0c, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x62, 0x61, 0x64, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5e, 0x0a, 0x12, 0x62, 0x61, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x6e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x10, 0x62, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x6f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, + 0x6e, 0x64, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x6d, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, + 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, 0x15, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x4f, 0x66, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, + 0x52, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x69, + 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x18, 0x82, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x48, 0x00, + 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x12, 0x5e, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x83, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, + 0x52, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x12, 0x5c, 0x0a, 0x11, 0x74, 0x6f, 0x6f, 0x5f, 0x6d, 0x61, 0x6e, 0x79, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x8c, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, + 0x6f, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, + 0x0f, 0x74, 0x6f, 0x6f, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x12, 0x52, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x18, 0x8d, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x12, 0x55, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x53, 0x0a, 0x0a, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x74, 0x72, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x45, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x43, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x49, 0x54, + 0x5f, 0x4f, 0x46, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, + 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x3a, 0x02, 0x18, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x72, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, + 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_nebius_common_error_v1alpha1_error_proto_rawDescOnce sync.Once + file_nebius_common_error_v1alpha1_error_proto_rawDescData = file_nebius_common_error_v1alpha1_error_proto_rawDesc +) + +func file_nebius_common_error_v1alpha1_error_proto_rawDescGZIP() []byte { + file_nebius_common_error_v1alpha1_error_proto_rawDescOnce.Do(func() { + file_nebius_common_error_v1alpha1_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_error_v1alpha1_error_proto_rawDescData) + }) + return file_nebius_common_error_v1alpha1_error_proto_rawDescData +} + +var file_nebius_common_error_v1alpha1_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_common_error_v1alpha1_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_common_error_v1alpha1_error_proto_goTypes = []any{ + (ServiceError_RetryType)(0), // 0: nebius.common.error.v1alpha1.ServiceError.RetryType + (*ServiceError)(nil), // 1: nebius.common.error.v1alpha1.ServiceError + (*BadRequest)(nil), // 2: nebius.common.error.v1alpha1.BadRequest + (*BadResourceState)(nil), // 3: nebius.common.error.v1alpha1.BadResourceState + (*ResourceNotFound)(nil), // 4: nebius.common.error.v1alpha1.ResourceNotFound + (*ResourceAlreadyExists)(nil), // 5: nebius.common.error.v1alpha1.ResourceAlreadyExists + (*OutOfRange)(nil), // 6: nebius.common.error.v1alpha1.OutOfRange + (*PermissionDenied)(nil), // 7: nebius.common.error.v1alpha1.PermissionDenied + (*ResourceConflict)(nil), // 8: nebius.common.error.v1alpha1.ResourceConflict + (*OperationAborted)(nil), // 9: nebius.common.error.v1alpha1.OperationAborted + (*TooManyRequests)(nil), // 10: nebius.common.error.v1alpha1.TooManyRequests + (*QuotaFailure)(nil), // 11: nebius.common.error.v1alpha1.QuotaFailure + (*InternalError)(nil), // 12: nebius.common.error.v1alpha1.InternalError +} +var file_nebius_common_error_v1alpha1_error_proto_depIdxs = []int32{ + 2, // 0: nebius.common.error.v1alpha1.ServiceError.bad_request:type_name -> nebius.common.error.v1alpha1.BadRequest + 3, // 1: nebius.common.error.v1alpha1.ServiceError.bad_resource_state:type_name -> nebius.common.error.v1alpha1.BadResourceState + 4, // 2: nebius.common.error.v1alpha1.ServiceError.resource_not_found:type_name -> nebius.common.error.v1alpha1.ResourceNotFound + 5, // 3: nebius.common.error.v1alpha1.ServiceError.resource_already_exists:type_name -> nebius.common.error.v1alpha1.ResourceAlreadyExists + 6, // 4: nebius.common.error.v1alpha1.ServiceError.out_of_range:type_name -> nebius.common.error.v1alpha1.OutOfRange + 7, // 5: nebius.common.error.v1alpha1.ServiceError.permission_denied:type_name -> nebius.common.error.v1alpha1.PermissionDenied + 8, // 6: nebius.common.error.v1alpha1.ServiceError.resource_conflict:type_name -> nebius.common.error.v1alpha1.ResourceConflict + 9, // 7: nebius.common.error.v1alpha1.ServiceError.operation_aborted:type_name -> nebius.common.error.v1alpha1.OperationAborted + 10, // 8: nebius.common.error.v1alpha1.ServiceError.too_many_requests:type_name -> nebius.common.error.v1alpha1.TooManyRequests + 11, // 9: nebius.common.error.v1alpha1.ServiceError.quota_failure:type_name -> nebius.common.error.v1alpha1.QuotaFailure + 12, // 10: nebius.common.error.v1alpha1.ServiceError.internal_error:type_name -> nebius.common.error.v1alpha1.InternalError + 0, // 11: nebius.common.error.v1alpha1.ServiceError.retry_type:type_name -> nebius.common.error.v1alpha1.ServiceError.RetryType + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_nebius_common_error_v1alpha1_error_proto_init() } +func file_nebius_common_error_v1alpha1_error_proto_init() { + if File_nebius_common_error_v1alpha1_error_proto != nil { + return + } + file_nebius_common_error_v1alpha1_common_errors_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_common_error_v1alpha1_error_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ServiceError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_common_error_v1alpha1_error_proto_msgTypes[0].OneofWrappers = []any{ + (*ServiceError_BadRequest)(nil), + (*ServiceError_BadResourceState)(nil), + (*ServiceError_ResourceNotFound)(nil), + (*ServiceError_ResourceAlreadyExists)(nil), + (*ServiceError_OutOfRange)(nil), + (*ServiceError_PermissionDenied)(nil), + (*ServiceError_ResourceConflict)(nil), + (*ServiceError_OperationAborted)(nil), + (*ServiceError_TooManyRequests)(nil), + (*ServiceError_QuotaFailure)(nil), + (*ServiceError_InternalError)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_error_v1alpha1_error_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_error_v1alpha1_error_proto_goTypes, + DependencyIndexes: file_nebius_common_error_v1alpha1_error_proto_depIdxs, + EnumInfos: file_nebius_common_error_v1alpha1_error_proto_enumTypes, + MessageInfos: file_nebius_common_error_v1alpha1_error_proto_msgTypes, + }.Build() + File_nebius_common_error_v1alpha1_error_proto = out.File + file_nebius_common_error_v1alpha1_error_proto_rawDesc = nil + file_nebius_common_error_v1alpha1_error_proto_goTypes = nil + file_nebius_common_error_v1alpha1_error_proto_depIdxs = nil +} diff --git a/proto/nebius/common/error/v1alpha1/error.sensitive.pb.go b/proto/nebius/common/error/v1alpha1/error.sensitive.pb.go new file mode 100644 index 0000000..4136074 --- /dev/null +++ b/proto/nebius/common/error/v1alpha1/error.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *ServiceError) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceError) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1/error.pb.go b/proto/nebius/common/v1/error.pb.go new file mode 100644 index 0000000..d840194 --- /dev/null +++ b/proto/nebius/common/v1/error.pb.go @@ -0,0 +1,1626 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/common/v1/error.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ServiceError_RetryType int32 + +const ( + ServiceError_UNSPECIFIED ServiceError_RetryType = 0 + // Just retry the failed call. + ServiceError_CALL ServiceError_RetryType = 1 + // Retry whole logic before call and make a new one. + ServiceError_UNIT_OF_WORK ServiceError_RetryType = 2 + // Do not retry, this is a fatal error. + ServiceError_NOTHING ServiceError_RetryType = 3 +) + +// Enum value maps for ServiceError_RetryType. +var ( + ServiceError_RetryType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CALL", + 2: "UNIT_OF_WORK", + 3: "NOTHING", + } + ServiceError_RetryType_value = map[string]int32{ + "UNSPECIFIED": 0, + "CALL": 1, + "UNIT_OF_WORK": 2, + "NOTHING": 3, + } +) + +func (x ServiceError_RetryType) Enum() *ServiceError_RetryType { + p := new(ServiceError_RetryType) + *p = x + return p +} + +func (x ServiceError_RetryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServiceError_RetryType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_common_v1_error_proto_enumTypes[0].Descriptor() +} + +func (ServiceError_RetryType) Type() protoreflect.EnumType { + return &file_nebius_common_v1_error_proto_enumTypes[0] +} + +func (x ServiceError_RetryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServiceError_RetryType.Descriptor instead. +func (ServiceError_RetryType) EnumDescriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{0, 0} +} + +type ServiceError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of Service which the error originated in. E.g. "dns". + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // Detailed error code, service-specific. E.g. "DnsZoneNotEmpty". + // Name of the exception, without Exception suffix if not set. + // Example: for PermissionDeniedException -> code == PermissionDenied. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // Additional message describing the error, if any. + // + // Types that are assignable to Details: + // + // *ServiceError_BadRequest + // *ServiceError_BadResourceState + // *ServiceError_ResourceNotFound + // *ServiceError_ResourceAlreadyExists + // *ServiceError_OutOfRange + // *ServiceError_PermissionDenied + // *ServiceError_ResourceConflict + // *ServiceError_OperationAborted + // *ServiceError_TooManyRequests + // *ServiceError_QuotaFailure + // *ServiceError_NotEnoughResources + // *ServiceError_InternalError + Details isServiceError_Details `protobuf_oneof:"details"` + // Retry type tells how to provide retry, e.g.: just a single call or the whole logic before it. + RetryType ServiceError_RetryType `protobuf:"varint,30,opt,name=retry_type,json=retryType,proto3,enum=nebius.common.v1.ServiceError_RetryType" json:"retry_type,omitempty"` +} + +func (x *ServiceError) Reset() { + *x = ServiceError{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceError) ProtoMessage() {} + +func (x *ServiceError) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceError.ProtoReflect.Descriptor instead. +func (*ServiceError) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceError) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *ServiceError) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (m *ServiceError) GetDetails() isServiceError_Details { + if m != nil { + return m.Details + } + return nil +} + +func (x *ServiceError) GetBadRequest() *BadRequest { + if x, ok := x.GetDetails().(*ServiceError_BadRequest); ok { + return x.BadRequest + } + return nil +} + +func (x *ServiceError) GetBadResourceState() *BadResourceState { + if x, ok := x.GetDetails().(*ServiceError_BadResourceState); ok { + return x.BadResourceState + } + return nil +} + +func (x *ServiceError) GetResourceNotFound() *ResourceNotFound { + if x, ok := x.GetDetails().(*ServiceError_ResourceNotFound); ok { + return x.ResourceNotFound + } + return nil +} + +func (x *ServiceError) GetResourceAlreadyExists() *ResourceAlreadyExists { + if x, ok := x.GetDetails().(*ServiceError_ResourceAlreadyExists); ok { + return x.ResourceAlreadyExists + } + return nil +} + +func (x *ServiceError) GetOutOfRange() *OutOfRange { + if x, ok := x.GetDetails().(*ServiceError_OutOfRange); ok { + return x.OutOfRange + } + return nil +} + +func (x *ServiceError) GetPermissionDenied() *PermissionDenied { + if x, ok := x.GetDetails().(*ServiceError_PermissionDenied); ok { + return x.PermissionDenied + } + return nil +} + +func (x *ServiceError) GetResourceConflict() *ResourceConflict { + if x, ok := x.GetDetails().(*ServiceError_ResourceConflict); ok { + return x.ResourceConflict + } + return nil +} + +func (x *ServiceError) GetOperationAborted() *OperationAborted { + if x, ok := x.GetDetails().(*ServiceError_OperationAborted); ok { + return x.OperationAborted + } + return nil +} + +func (x *ServiceError) GetTooManyRequests() *TooManyRequests { + if x, ok := x.GetDetails().(*ServiceError_TooManyRequests); ok { + return x.TooManyRequests + } + return nil +} + +func (x *ServiceError) GetQuotaFailure() *QuotaFailure { + if x, ok := x.GetDetails().(*ServiceError_QuotaFailure); ok { + return x.QuotaFailure + } + return nil +} + +func (x *ServiceError) GetNotEnoughResources() *NotEnoughResources { + if x, ok := x.GetDetails().(*ServiceError_NotEnoughResources); ok { + return x.NotEnoughResources + } + return nil +} + +func (x *ServiceError) GetInternalError() *InternalError { + if x, ok := x.GetDetails().(*ServiceError_InternalError); ok { + return x.InternalError + } + return nil +} + +func (x *ServiceError) GetRetryType() ServiceError_RetryType { + if x != nil { + return x.RetryType + } + return ServiceError_UNSPECIFIED +} + +type isServiceError_Details interface { + isServiceError_Details() +} + +type ServiceError_BadRequest struct { + BadRequest *BadRequest `protobuf:"bytes,100,opt,name=bad_request,json=badRequest,proto3,oneof"` +} + +type ServiceError_BadResourceState struct { + BadResourceState *BadResourceState `protobuf:"bytes,110,opt,name=bad_resource_state,json=badResourceState,proto3,oneof"` +} + +type ServiceError_ResourceNotFound struct { + ResourceNotFound *ResourceNotFound `protobuf:"bytes,111,opt,name=resource_not_found,json=resourceNotFound,proto3,oneof"` +} + +type ServiceError_ResourceAlreadyExists struct { + ResourceAlreadyExists *ResourceAlreadyExists `protobuf:"bytes,112,opt,name=resource_already_exists,json=resourceAlreadyExists,proto3,oneof"` +} + +type ServiceError_OutOfRange struct { + OutOfRange *OutOfRange `protobuf:"bytes,113,opt,name=out_of_range,json=outOfRange,proto3,oneof"` +} + +type ServiceError_PermissionDenied struct { + PermissionDenied *PermissionDenied `protobuf:"bytes,120,opt,name=permission_denied,json=permissionDenied,proto3,oneof"` +} + +type ServiceError_ResourceConflict struct { + ResourceConflict *ResourceConflict `protobuf:"bytes,130,opt,name=resource_conflict,json=resourceConflict,proto3,oneof"` +} + +type ServiceError_OperationAborted struct { + OperationAborted *OperationAborted `protobuf:"bytes,131,opt,name=operation_aborted,json=operationAborted,proto3,oneof"` +} + +type ServiceError_TooManyRequests struct { + TooManyRequests *TooManyRequests `protobuf:"bytes,140,opt,name=too_many_requests,json=tooManyRequests,proto3,oneof"` +} + +type ServiceError_QuotaFailure struct { + QuotaFailure *QuotaFailure `protobuf:"bytes,141,opt,name=quota_failure,json=quotaFailure,proto3,oneof"` +} + +type ServiceError_NotEnoughResources struct { + NotEnoughResources *NotEnoughResources `protobuf:"bytes,142,opt,name=not_enough_resources,json=notEnoughResources,proto3,oneof"` +} + +type ServiceError_InternalError struct { + InternalError *InternalError `protobuf:"bytes,999,opt,name=internal_error,json=internalError,proto3,oneof"` +} + +func (*ServiceError_BadRequest) isServiceError_Details() {} + +func (*ServiceError_BadResourceState) isServiceError_Details() {} + +func (*ServiceError_ResourceNotFound) isServiceError_Details() {} + +func (*ServiceError_ResourceAlreadyExists) isServiceError_Details() {} + +func (*ServiceError_OutOfRange) isServiceError_Details() {} + +func (*ServiceError_PermissionDenied) isServiceError_Details() {} + +func (*ServiceError_ResourceConflict) isServiceError_Details() {} + +func (*ServiceError_OperationAborted) isServiceError_Details() {} + +func (*ServiceError_TooManyRequests) isServiceError_Details() {} + +func (*ServiceError_QuotaFailure) isServiceError_Details() {} + +func (*ServiceError_NotEnoughResources) isServiceError_Details() {} + +func (*ServiceError_InternalError) isServiceError_Details() {} + +// The request is invalid. +type BadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all violations. + Violations []*BadRequest_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` +} + +func (x *BadRequest) Reset() { + *x = BadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadRequest) ProtoMessage() {} + +func (x *BadRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadRequest.ProtoReflect.Descriptor instead. +func (*BadRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{1} +} + +func (x *BadRequest) GetViolations() []*BadRequest_Violation { + if x != nil { + return x.Violations + } + return nil +} + +// The resource we are trying to use, create, change or delete is in a bad state and cannot be used. +type BadResourceState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the resource which is bad. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // The reason why this state is bad and cannot be used. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *BadResourceState) Reset() { + *x = BadResourceState{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadResourceState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadResourceState) ProtoMessage() {} + +func (x *BadResourceState) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadResourceState.ProtoReflect.Descriptor instead. +func (*BadResourceState) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{2} +} + +func (x *BadResourceState) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *BadResourceState) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Resource we are trying to interact with does not exist. +type ResourceNotFound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the requested resource. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *ResourceNotFound) Reset() { + *x = ResourceNotFound{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceNotFound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceNotFound) ProtoMessage() {} + +func (x *ResourceNotFound) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceNotFound.ProtoReflect.Descriptor instead. +func (*ResourceNotFound) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{3} +} + +func (x *ResourceNotFound) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Resource we are trying to create already exists. +type ResourceAlreadyExists struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the existing resource. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *ResourceAlreadyExists) Reset() { + *x = ResourceAlreadyExists{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceAlreadyExists) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceAlreadyExists) ProtoMessage() {} + +func (x *ResourceAlreadyExists) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceAlreadyExists.ProtoReflect.Descriptor instead. +func (*ResourceAlreadyExists) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{4} +} + +func (x *ResourceAlreadyExists) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// There is a difference between the actual resource state and the expected one. +type ResourceConflict struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of conflicting resource. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Detailed info about conflict. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *ResourceConflict) Reset() { + *x = ResourceConflict{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceConflict) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceConflict) ProtoMessage() {} + +func (x *ResourceConflict) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceConflict.ProtoReflect.Descriptor instead. +func (*ResourceConflict) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{5} +} + +func (x *ResourceConflict) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *ResourceConflict) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Operation on the resource has been aborted by a subsequent operation. +type OperationAborted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the aborted operation. + OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // ID of the subsequent operation. + AbortedByOperationId string `protobuf:"bytes,2,opt,name=aborted_by_operation_id,json=abortedByOperationId,proto3" json:"aborted_by_operation_id,omitempty"` + // Resource ID corresponding to both of the operations. + ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *OperationAborted) Reset() { + *x = OperationAborted{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationAborted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationAborted) ProtoMessage() {} + +func (x *OperationAborted) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationAborted.ProtoReflect.Descriptor instead. +func (*OperationAborted) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{6} +} + +func (x *OperationAborted) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +func (x *OperationAborted) GetAbortedByOperationId() string { + if x != nil { + return x.AbortedByOperationId + } + return "" +} + +func (x *OperationAborted) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Indicates that element with requested parameters is exceeding the particular range. +type OutOfRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Requested value. + Requested string `protobuf:"bytes,1,opt,name=requested,proto3" json:"requested,omitempty"` + // Available limit. + Limit string `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *OutOfRange) Reset() { + *x = OutOfRange{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutOfRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutOfRange) ProtoMessage() {} + +func (x *OutOfRange) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutOfRange.ProtoReflect.Descriptor instead. +func (*OutOfRange) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{7} +} + +func (x *OutOfRange) GetRequested() string { + if x != nil { + return x.Requested + } + return "" +} + +func (x *OutOfRange) GetLimit() string { + if x != nil { + return x.Limit + } + return "" +} + +// Indicates that the action cannot be performed because there are insufficient access rights to a resource. +type PermissionDenied struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the resource that cannot be accessed. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` +} + +func (x *PermissionDenied) Reset() { + *x = PermissionDenied{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionDenied) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionDenied) ProtoMessage() {} + +func (x *PermissionDenied) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionDenied.ProtoReflect.Descriptor instead. +func (*PermissionDenied) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{8} +} + +func (x *PermissionDenied) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Generic internal error. +type InternalError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Error request ID. + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Trace ID for the failing request. + TraceId string `protobuf:"bytes,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` +} + +func (x *InternalError) Reset() { + *x = InternalError{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalError) ProtoMessage() {} + +func (x *InternalError) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalError.ProtoReflect.Descriptor instead. +func (*InternalError) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{9} +} + +func (x *InternalError) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *InternalError) GetTraceId() string { + if x != nil { + return x.TraceId + } + return "" +} + +// You initiated too many requests to the service at once. Enhance your calm. +type TooManyRequests struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // What request limit is exceeded (service-dependent). + Violation string `protobuf:"bytes,1,opt,name=violation,proto3" json:"violation,omitempty"` +} + +func (x *TooManyRequests) Reset() { + *x = TooManyRequests{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TooManyRequests) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TooManyRequests) ProtoMessage() {} + +func (x *TooManyRequests) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TooManyRequests.ProtoReflect.Descriptor instead. +func (*TooManyRequests) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{10} +} + +func (x *TooManyRequests) GetViolation() string { + if x != nil { + return x.Violation + } + return "" +} + +// Indicates a failure due to exceeding specified limits or allocations in a system or service. +type QuotaFailure struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all quota violations. + Violations []*QuotaFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` +} + +func (x *QuotaFailure) Reset() { + *x = QuotaFailure{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuotaFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaFailure) ProtoMessage() {} + +func (x *QuotaFailure) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaFailure.ProtoReflect.Descriptor instead. +func (*QuotaFailure) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{11} +} + +func (x *QuotaFailure) GetViolations() []*QuotaFailure_Violation { + if x != nil { + return x.Violations + } + return nil +} + +// Indicates that there are not enough resources available to perform the requested action. +type NotEnoughResources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all resource violations. + Violations []*NotEnoughResources_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"` +} + +func (x *NotEnoughResources) Reset() { + *x = NotEnoughResources{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotEnoughResources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotEnoughResources) ProtoMessage() {} + +func (x *NotEnoughResources) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotEnoughResources.ProtoReflect.Descriptor instead. +func (*NotEnoughResources) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{12} +} + +func (x *NotEnoughResources) GetViolations() []*NotEnoughResources_Violation { + if x != nil { + return x.Violations + } + return nil +} + +type BadRequest_Violation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // What field value is invalid. + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + // Description why the value is invalid, in English. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *BadRequest_Violation) Reset() { + *x = BadRequest_Violation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BadRequest_Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadRequest_Violation) ProtoMessage() {} + +func (x *BadRequest_Violation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadRequest_Violation.ProtoReflect.Descriptor instead. +func (*BadRequest_Violation) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *BadRequest_Violation) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +func (x *BadRequest_Violation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type QuotaFailure_Violation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Which quota check failed. + Quota string `protobuf:"bytes,1,opt,name=quota,proto3" json:"quota,omitempty"` + // A description of how the quota check failed. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // Maximum permissible value. + Limit string `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` + // Requested value. + Requested string `protobuf:"bytes,4,opt,name=requested,proto3" json:"requested,omitempty"` +} + +func (x *QuotaFailure_Violation) Reset() { + *x = QuotaFailure_Violation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuotaFailure_Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuotaFailure_Violation) ProtoMessage() {} + +func (x *QuotaFailure_Violation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuotaFailure_Violation.ProtoReflect.Descriptor instead. +func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *QuotaFailure_Violation) GetQuota() string { + if x != nil { + return x.Quota + } + return "" +} + +func (x *QuotaFailure_Violation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *QuotaFailure_Violation) GetLimit() string { + if x != nil { + return x.Limit + } + return "" +} + +func (x *QuotaFailure_Violation) GetRequested() string { + if x != nil { + return x.Requested + } + return "" +} + +type NotEnoughResources_Violation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of resource that is insufficient. + // This field is populated when it is possible to determine the lacking resource type. + // **Not for programmatic use.** + ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + // A description of how the resource is insufficient. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // Requested value. + Requested string `protobuf:"bytes,3,opt,name=requested,proto3" json:"requested,omitempty"` +} + +func (x *NotEnoughResources_Violation) Reset() { + *x = NotEnoughResources_Violation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_error_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotEnoughResources_Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotEnoughResources_Violation) ProtoMessage() {} + +func (x *NotEnoughResources_Violation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_error_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotEnoughResources_Violation.ProtoReflect.Descriptor instead. +func (*NotEnoughResources_Violation) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_error_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *NotEnoughResources_Violation) GetResourceType() string { + if x != nil { + return x.ResourceType + } + return "" +} + +func (x *NotEnoughResources_Violation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *NotEnoughResources_Violation) GetRequested() string { + if x != nil { + return x.Requested + } + return "" +} + +var File_nebius_common_v1_error_proto protoreflect.FileDescriptor + +var file_nebius_common_v1_error_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x22, 0xa0, 0x09, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x3f, 0x0a, 0x0b, 0x62, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x64, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x52, 0x0a, 0x12, 0x62, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x10, 0x62, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, + 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x61, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x48, 0x00, 0x52, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6c, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x6f, + 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x71, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x4f, 0x66, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, + 0x00, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x51, 0x0a, + 0x11, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x69, + 0x65, 0x64, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, + 0x12, 0x52, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x18, 0x82, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x12, 0x52, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x83, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x62, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x74, 0x6f, 0x6f, 0x5f, + 0x6d, 0x61, 0x6e, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x8c, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6f, 0x4d, 0x61, 0x6e, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x6f, 0x6f, 0x4d, 0x61, + 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x8d, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x8e, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x12, 0x6e, 0x6f, 0x74, 0x45, 0x6e, + 0x6f, 0x75, 0x67, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, + 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0xe7, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x47, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x72, + 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x74, + 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x65, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x45, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, + 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x43, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x49, + 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x4e, + 0x4f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3b, 0x0a, 0x09, 0x56, 0x69, + 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4d, 0x0a, 0x10, 0x42, 0x61, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x33, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x45, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, + 0x61, 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x61, + 0x62, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x4f, 0x66, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x33, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x0d, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x0f, 0x54, 0x6f, 0x6f, 0x4d, 0x61, 0x6e, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x69, + 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0x6f, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x22, 0xce, 0x01, 0x0a, 0x12, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, + 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0a, 0x76, 0x69, + 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x68, 0x0a, 0x09, 0x56, 0x69, + 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x42, 0x57, 0x0a, 0x17, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, + 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_v1_error_proto_rawDescOnce sync.Once + file_nebius_common_v1_error_proto_rawDescData = file_nebius_common_v1_error_proto_rawDesc +) + +func file_nebius_common_v1_error_proto_rawDescGZIP() []byte { + file_nebius_common_v1_error_proto_rawDescOnce.Do(func() { + file_nebius_common_v1_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1_error_proto_rawDescData) + }) + return file_nebius_common_v1_error_proto_rawDescData +} + +var file_nebius_common_v1_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_common_v1_error_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_nebius_common_v1_error_proto_goTypes = []any{ + (ServiceError_RetryType)(0), // 0: nebius.common.v1.ServiceError.RetryType + (*ServiceError)(nil), // 1: nebius.common.v1.ServiceError + (*BadRequest)(nil), // 2: nebius.common.v1.BadRequest + (*BadResourceState)(nil), // 3: nebius.common.v1.BadResourceState + (*ResourceNotFound)(nil), // 4: nebius.common.v1.ResourceNotFound + (*ResourceAlreadyExists)(nil), // 5: nebius.common.v1.ResourceAlreadyExists + (*ResourceConflict)(nil), // 6: nebius.common.v1.ResourceConflict + (*OperationAborted)(nil), // 7: nebius.common.v1.OperationAborted + (*OutOfRange)(nil), // 8: nebius.common.v1.OutOfRange + (*PermissionDenied)(nil), // 9: nebius.common.v1.PermissionDenied + (*InternalError)(nil), // 10: nebius.common.v1.InternalError + (*TooManyRequests)(nil), // 11: nebius.common.v1.TooManyRequests + (*QuotaFailure)(nil), // 12: nebius.common.v1.QuotaFailure + (*NotEnoughResources)(nil), // 13: nebius.common.v1.NotEnoughResources + (*BadRequest_Violation)(nil), // 14: nebius.common.v1.BadRequest.Violation + (*QuotaFailure_Violation)(nil), // 15: nebius.common.v1.QuotaFailure.Violation + (*NotEnoughResources_Violation)(nil), // 16: nebius.common.v1.NotEnoughResources.Violation +} +var file_nebius_common_v1_error_proto_depIdxs = []int32{ + 2, // 0: nebius.common.v1.ServiceError.bad_request:type_name -> nebius.common.v1.BadRequest + 3, // 1: nebius.common.v1.ServiceError.bad_resource_state:type_name -> nebius.common.v1.BadResourceState + 4, // 2: nebius.common.v1.ServiceError.resource_not_found:type_name -> nebius.common.v1.ResourceNotFound + 5, // 3: nebius.common.v1.ServiceError.resource_already_exists:type_name -> nebius.common.v1.ResourceAlreadyExists + 8, // 4: nebius.common.v1.ServiceError.out_of_range:type_name -> nebius.common.v1.OutOfRange + 9, // 5: nebius.common.v1.ServiceError.permission_denied:type_name -> nebius.common.v1.PermissionDenied + 6, // 6: nebius.common.v1.ServiceError.resource_conflict:type_name -> nebius.common.v1.ResourceConflict + 7, // 7: nebius.common.v1.ServiceError.operation_aborted:type_name -> nebius.common.v1.OperationAborted + 11, // 8: nebius.common.v1.ServiceError.too_many_requests:type_name -> nebius.common.v1.TooManyRequests + 12, // 9: nebius.common.v1.ServiceError.quota_failure:type_name -> nebius.common.v1.QuotaFailure + 13, // 10: nebius.common.v1.ServiceError.not_enough_resources:type_name -> nebius.common.v1.NotEnoughResources + 10, // 11: nebius.common.v1.ServiceError.internal_error:type_name -> nebius.common.v1.InternalError + 0, // 12: nebius.common.v1.ServiceError.retry_type:type_name -> nebius.common.v1.ServiceError.RetryType + 14, // 13: nebius.common.v1.BadRequest.violations:type_name -> nebius.common.v1.BadRequest.Violation + 15, // 14: nebius.common.v1.QuotaFailure.violations:type_name -> nebius.common.v1.QuotaFailure.Violation + 16, // 15: nebius.common.v1.NotEnoughResources.violations:type_name -> nebius.common.v1.NotEnoughResources.Violation + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1_error_proto_init() } +func file_nebius_common_v1_error_proto_init() { + if File_nebius_common_v1_error_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1_error_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ServiceError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*BadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*BadResourceState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ResourceNotFound); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ResourceAlreadyExists); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ResourceConflict); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*OperationAborted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*OutOfRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*PermissionDenied); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*InternalError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*TooManyRequests); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*QuotaFailure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*NotEnoughResources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*BadRequest_Violation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*QuotaFailure_Violation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_error_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*NotEnoughResources_Violation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_common_v1_error_proto_msgTypes[0].OneofWrappers = []any{ + (*ServiceError_BadRequest)(nil), + (*ServiceError_BadResourceState)(nil), + (*ServiceError_ResourceNotFound)(nil), + (*ServiceError_ResourceAlreadyExists)(nil), + (*ServiceError_OutOfRange)(nil), + (*ServiceError_PermissionDenied)(nil), + (*ServiceError_ResourceConflict)(nil), + (*ServiceError_OperationAborted)(nil), + (*ServiceError_TooManyRequests)(nil), + (*ServiceError_QuotaFailure)(nil), + (*ServiceError_NotEnoughResources)(nil), + (*ServiceError_InternalError)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1_error_proto_rawDesc, + NumEnums: 1, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_v1_error_proto_goTypes, + DependencyIndexes: file_nebius_common_v1_error_proto_depIdxs, + EnumInfos: file_nebius_common_v1_error_proto_enumTypes, + MessageInfos: file_nebius_common_v1_error_proto_msgTypes, + }.Build() + File_nebius_common_v1_error_proto = out.File + file_nebius_common_v1_error_proto_rawDesc = nil + file_nebius_common_v1_error_proto_goTypes = nil + file_nebius_common_v1_error_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1/error.sensitive.pb.go b/proto/nebius/common/v1/error.sensitive.pb.go new file mode 100644 index 0000000..07a2c34 --- /dev/null +++ b/proto/nebius/common/v1/error.sensitive.pb.go @@ -0,0 +1,42 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *ServiceError) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceError) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BadRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *BadRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BadResourceState) Sanitize() // is not generated as no sensitive fields found +// func (x *BadResourceState) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceNotFound) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceNotFound) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceAlreadyExists) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceAlreadyExists) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourceConflict) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceConflict) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *OperationAborted) Sanitize() // is not generated as no sensitive fields found +// func (x *OperationAborted) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *OutOfRange) Sanitize() // is not generated as no sensitive fields found +// func (x *OutOfRange) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PermissionDenied) Sanitize() // is not generated as no sensitive fields found +// func (x *PermissionDenied) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InternalError) Sanitize() // is not generated as no sensitive fields found +// func (x *InternalError) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *TooManyRequests) Sanitize() // is not generated as no sensitive fields found +// func (x *TooManyRequests) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *QuotaFailure) Sanitize() // is not generated as no sensitive fields found +// func (x *QuotaFailure) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NotEnoughResources) Sanitize() // is not generated as no sensitive fields found +// func (x *NotEnoughResources) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1/metadata.pb.go b/proto/nebius/common/v1/metadata.pb.go new file mode 100644 index 0000000..fb9c91b --- /dev/null +++ b/proto/nebius/common/v1/metadata.pb.go @@ -0,0 +1,319 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/common/v1/metadata.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Common resource metadata. +type ResourceMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier for the resource, unique for its resource type. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Identifier of the parent resource to which the resource belongs. + ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Human readable name for the resource. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Version of the resource for safe concurrent modifications and consistent reads. + // Positive and monotonically increases on each resource spec change (but *not* on each change of the + // resource's container(s) or status). + // Service allows zero value or current. + ResourceVersion int64 `protobuf:"varint,4,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // Timestamp indicating when the resource was created. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Timestamp indicating when the resource was last updated. + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // Labels associated with the resource. + Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ResourceMetadata) Reset() { + *x = ResourceMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceMetadata) ProtoMessage() {} + +func (x *ResourceMetadata) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceMetadata.ProtoReflect.Descriptor instead. +func (*ResourceMetadata) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *ResourceMetadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ResourceMetadata) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ResourceMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ResourceMetadata) GetResourceVersion() int64 { + if x != nil { + return x.ResourceVersion + } + return 0 +} + +func (x *ResourceMetadata) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ResourceMetadata) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *ResourceMetadata) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +// if service supports uniqueness of ResourceMetadata.name within tuple (scope) +// it also must have grpc method GetByName +type GetByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetByNameRequest) Reset() { + *x = GetByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetByNameRequest) ProtoMessage() {} + +func (x *GetByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_metadata_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetByNameRequest.ProtoReflect.Descriptor instead. +func (*GetByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_metadata_proto_rawDescGZIP(), []int{1} +} + +func (x *GetByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_nebius_common_v1_metadata_proto protoreflect.FileDescriptor + +var file_nebius_common_v1_metadata_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x03, 0x0a, 0x10, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x32, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, + 0x28, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x43, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x5a, 0x0a, + 0x17, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_common_v1_metadata_proto_rawDescOnce sync.Once + file_nebius_common_v1_metadata_proto_rawDescData = file_nebius_common_v1_metadata_proto_rawDesc +) + +func file_nebius_common_v1_metadata_proto_rawDescGZIP() []byte { + file_nebius_common_v1_metadata_proto_rawDescOnce.Do(func() { + file_nebius_common_v1_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1_metadata_proto_rawDescData) + }) + return file_nebius_common_v1_metadata_proto_rawDescData +} + +var file_nebius_common_v1_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_common_v1_metadata_proto_goTypes = []any{ + (*ResourceMetadata)(nil), // 0: nebius.common.v1.ResourceMetadata + (*GetByNameRequest)(nil), // 1: nebius.common.v1.GetByNameRequest + nil, // 2: nebius.common.v1.ResourceMetadata.LabelsEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_nebius_common_v1_metadata_proto_depIdxs = []int32{ + 3, // 0: nebius.common.v1.ResourceMetadata.created_at:type_name -> google.protobuf.Timestamp + 3, // 1: nebius.common.v1.ResourceMetadata.updated_at:type_name -> google.protobuf.Timestamp + 2, // 2: nebius.common.v1.ResourceMetadata.labels:type_name -> nebius.common.v1.ResourceMetadata.LabelsEntry + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1_metadata_proto_init() } +func file_nebius_common_v1_metadata_proto_init() { + if File_nebius_common_v1_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ResourceMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_v1_metadata_proto_goTypes, + DependencyIndexes: file_nebius_common_v1_metadata_proto_depIdxs, + MessageInfos: file_nebius_common_v1_metadata_proto_msgTypes, + }.Build() + File_nebius_common_v1_metadata_proto = out.File + file_nebius_common_v1_metadata_proto_rawDesc = nil + file_nebius_common_v1_metadata_proto_goTypes = nil + file_nebius_common_v1_metadata_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1/metadata.sensitive.pb.go b/proto/nebius/common/v1/metadata.sensitive.pb.go new file mode 100644 index 0000000..699652e --- /dev/null +++ b/proto/nebius/common/v1/metadata.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *ResourceMetadata) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourceMetadata) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1/operation.pb.go b/proto/nebius/common/v1/operation.pb.go new file mode 100644 index 0000000..ab41740 --- /dev/null +++ b/proto/nebius/common/v1/operation.pb.go @@ -0,0 +1,377 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/common/v1/operation.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the operation. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Human-readable description of the operation. 0-256 characters long. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Creation timestamp. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // ID of the user or service account who initiated the operation. + CreatedBy string `protobuf:"bytes,4,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + // The time when the operation has finished. + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // The request that generated this operation. + Request *anypb.Any `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"` + // The request headers that are essential for the request that generated the operation. + // For instance, `x-resetmask`. Without these headers the request might have been processed + // differently if repeated. + // All the header names *must* be converted to lower case. + // Validator is based on: + // https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names + RequestHeaders map[string]*Operation_RequestHeader `protobuf:"bytes,11,rep,name=request_headers,json=requestHeaders,proto3" json:"request_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // ID of the resource that this operation creates, updates, deletes or otherwise changes. + // + // If the operation affects multiple resources or does not affect any API resources at all + // (e.g. a routine maintenance operation visible to the user), the [resource_id] must be empty. + ResourceId string `protobuf:"bytes,7,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Additional information about the progress of an operation, e.g., a progress percentage. + // MAY be absent while the operation is running, MUST be absent after the operation has completed. + // + // Format of message inside [progress_data] is service-dependent and MUST be documented by the + // service, IF it is used. + ProgressData *anypb.Any `protobuf:"bytes,9,opt,name=progress_data,json=progressData,proto3" json:"progress_data,omitempty"` + // The status of this operation. Set when this operation is completed. + // See https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto. + // + // [status.code] is https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto: + // - If [status.code] == OK, the operation has completed successfully. + // - If [status.code] != OK, the operation has failed or has been cancelled. + // - [status.message] will contain a user-readable and actionable error message. + // - [status.details] will contain additional diagnostic information in the form of + // [ServiceError] from nebius/common/v1/error.proto + // - [status.code] must belong to an Operation-compatible subset of GRPC codes: + // OK, CANCELLED, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, INTERNAL + Status *status.Status `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_operation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_operation_proto_rawDescGZIP(), []int{0} +} + +func (x *Operation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operation) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Operation) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + +func (x *Operation) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +func (x *Operation) GetRequest() *anypb.Any { + if x != nil { + return x.Request + } + return nil +} + +func (x *Operation) GetRequestHeaders() map[string]*Operation_RequestHeader { + if x != nil { + return x.RequestHeaders + } + return nil +} + +func (x *Operation) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *Operation) GetProgressData() *anypb.Any { + if x != nil { + return x.ProgressData + } + return nil +} + +func (x *Operation) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// Request header is a container for all the values of a particular header of a request +// as there is no such thing as map +type Operation_RequestHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The values of a particular header from a request + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *Operation_RequestHeader) Reset() { + *x = Operation_RequestHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation_RequestHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation_RequestHeader) ProtoMessage() {} + +func (x *Operation_RequestHeader) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_operation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation_RequestHeader.ProtoReflect.Descriptor instead. +func (*Operation_RequestHeader) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_operation_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Operation_RequestHeader) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +var File_nebius_common_v1_operation_proto protoreflect.FileDescriptor + +var file_nebius_common_v1_operation_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x05, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, + 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x76, 0x0a, + 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x1c, 0xba, 0x48, 0x19, 0x9a, 0x01, 0x16, 0x22, + 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x2d, 0x61, 0x2d, 0x7a, + 0x5c, 0x2e, 0x5d, 0x2a, 0x24, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x27, 0x0a, + 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x6c, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5b, 0x0a, 0x17, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, + 0x0e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_v1_operation_proto_rawDescOnce sync.Once + file_nebius_common_v1_operation_proto_rawDescData = file_nebius_common_v1_operation_proto_rawDesc +) + +func file_nebius_common_v1_operation_proto_rawDescGZIP() []byte { + file_nebius_common_v1_operation_proto_rawDescOnce.Do(func() { + file_nebius_common_v1_operation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1_operation_proto_rawDescData) + }) + return file_nebius_common_v1_operation_proto_rawDescData +} + +var file_nebius_common_v1_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_common_v1_operation_proto_goTypes = []any{ + (*Operation)(nil), // 0: nebius.common.v1.Operation + (*Operation_RequestHeader)(nil), // 1: nebius.common.v1.Operation.RequestHeader + nil, // 2: nebius.common.v1.Operation.RequestHeadersEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*anypb.Any)(nil), // 4: google.protobuf.Any + (*status.Status)(nil), // 5: google.rpc.Status +} +var file_nebius_common_v1_operation_proto_depIdxs = []int32{ + 3, // 0: nebius.common.v1.Operation.created_at:type_name -> google.protobuf.Timestamp + 3, // 1: nebius.common.v1.Operation.finished_at:type_name -> google.protobuf.Timestamp + 4, // 2: nebius.common.v1.Operation.request:type_name -> google.protobuf.Any + 2, // 3: nebius.common.v1.Operation.request_headers:type_name -> nebius.common.v1.Operation.RequestHeadersEntry + 4, // 4: nebius.common.v1.Operation.progress_data:type_name -> google.protobuf.Any + 5, // 5: nebius.common.v1.Operation.status:type_name -> google.rpc.Status + 1, // 6: nebius.common.v1.Operation.RequestHeadersEntry.value:type_name -> nebius.common.v1.Operation.RequestHeader + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1_operation_proto_init() } +func file_nebius_common_v1_operation_proto_init() { + if File_nebius_common_v1_operation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Operation_RequestHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1_operation_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_v1_operation_proto_goTypes, + DependencyIndexes: file_nebius_common_v1_operation_proto_depIdxs, + MessageInfos: file_nebius_common_v1_operation_proto_msgTypes, + }.Build() + File_nebius_common_v1_operation_proto = out.File + file_nebius_common_v1_operation_proto_rawDesc = nil + file_nebius_common_v1_operation_proto_goTypes = nil + file_nebius_common_v1_operation_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1/operation.sensitive.pb.go b/proto/nebius/common/v1/operation.sensitive.pb.go new file mode 100644 index 0000000..f17546d --- /dev/null +++ b/proto/nebius/common/v1/operation.sensitive.pb.go @@ -0,0 +1,88 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + anypb "google.golang.org/protobuf/types/known/anypb" + slog "log/slog" +) + +// Sanitize mutates [Operation] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +func (x *Operation) Sanitize() { + if x == nil { + return + } + sanitizeAny := func(a *anypb.Any) { + if a == nil { + return + } + p, err := anypb.UnmarshalNew(a, proto.UnmarshalOptions{DiscardUnknown: true}) + if err != nil { + a.TypeUrl = "type.googleapis.com/google.protobuf.Empty" + a.Value = nil + return + } + if s, ok := p.(interface{ Sanitize() }); ok { + s.Sanitize() + } + err = a.MarshalFrom(p) + if err != nil { + a.TypeUrl = "type.googleapis.com/google.protobuf.Empty" + a.Value = nil + } + } + sanitizeAny(x.Request) + sanitizeAny(x.ProgressData) + for _, y := range x.Status.GetDetails() { + sanitizeAny(y) + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Operation]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Operation +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Operation], use the following code: +// +// var original *Operation +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Operation) +func (x *Operation) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Operation) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperOperation)(c)) +} + +// wrapperOperation is used to return [Operation] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperOperation Operation + +func (w *wrapperOperation) String() string { + return (*Operation)(w).String() +} + +func (*wrapperOperation) ProtoMessage() {} + +func (w *wrapperOperation) ProtoReflect() protoreflect.Message { + return (*Operation)(w).ProtoReflect() +} + +// func (x *Operation_RequestHeader) Sanitize() // is not generated as no sensitive fields found +// func (x *Operation_RequestHeader) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1/operation_service.pb.go b/proto/nebius/common/v1/operation_service.pb.go new file mode 100644 index 0000000..351e372 --- /dev/null +++ b/proto/nebius/common/v1/operation_service.pb.go @@ -0,0 +1,340 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/common/v1/operation_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetOperationRequest) Reset() { + *x = GetOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperationRequest) ProtoMessage() {} + +func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead. +func (*GetOperationRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_operation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Resource to list operations for. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Page size. [1...1000]. Optional, if not specified, a reasonable default will be chosen by the service. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Listing continuation token. Empty to start listing from the first page. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListOperationsRequest) Reset() { + *x = ListOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsRequest) ProtoMessage() {} + +func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_operation_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListOperationsRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *ListOperationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListOperationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListOperationsResponse) Reset() { + *x = ListOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsResponse) ProtoMessage() {} + +func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1_operation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead. +func (*ListOperationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_common_v1_operation_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListOperationsResponse) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +func (x *ListOperationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_common_v1_operation_service_proto protoreflect.FileDescriptor + +var file_nebius_common_v1_operation_service_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x7c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x7d, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x32, 0xcb, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x25, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x6c, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x9a, 0xb5, + 0x18, 0x0d, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, + 0x62, 0x0a, 0x17, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_v1_operation_service_proto_rawDescOnce sync.Once + file_nebius_common_v1_operation_service_proto_rawDescData = file_nebius_common_v1_operation_service_proto_rawDesc +) + +func file_nebius_common_v1_operation_service_proto_rawDescGZIP() []byte { + file_nebius_common_v1_operation_service_proto_rawDescOnce.Do(func() { + file_nebius_common_v1_operation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1_operation_service_proto_rawDescData) + }) + return file_nebius_common_v1_operation_service_proto_rawDescData +} + +var file_nebius_common_v1_operation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_common_v1_operation_service_proto_goTypes = []any{ + (*GetOperationRequest)(nil), // 0: nebius.common.v1.GetOperationRequest + (*ListOperationsRequest)(nil), // 1: nebius.common.v1.ListOperationsRequest + (*ListOperationsResponse)(nil), // 2: nebius.common.v1.ListOperationsResponse + (*Operation)(nil), // 3: nebius.common.v1.Operation +} +var file_nebius_common_v1_operation_service_proto_depIdxs = []int32{ + 3, // 0: nebius.common.v1.ListOperationsResponse.operations:type_name -> nebius.common.v1.Operation + 0, // 1: nebius.common.v1.OperationService.Get:input_type -> nebius.common.v1.GetOperationRequest + 1, // 2: nebius.common.v1.OperationService.List:input_type -> nebius.common.v1.ListOperationsRequest + 3, // 3: nebius.common.v1.OperationService.Get:output_type -> nebius.common.v1.Operation + 2, // 4: nebius.common.v1.OperationService.List:output_type -> nebius.common.v1.ListOperationsResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1_operation_service_proto_init() } +func file_nebius_common_v1_operation_service_proto_init() { + if File_nebius_common_v1_operation_service_proto != nil { + return + } + file_nebius_common_v1_operation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1_operation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_operation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1_operation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1_operation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_common_v1_operation_service_proto_goTypes, + DependencyIndexes: file_nebius_common_v1_operation_service_proto_depIdxs, + MessageInfos: file_nebius_common_v1_operation_service_proto_msgTypes, + }.Build() + File_nebius_common_v1_operation_service_proto = out.File + file_nebius_common_v1_operation_service_proto_rawDesc = nil + file_nebius_common_v1_operation_service_proto_goTypes = nil + file_nebius_common_v1_operation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1/operation_service.sensitive.pb.go b/proto/nebius/common/v1/operation_service.sensitive.pb.go new file mode 100644 index 0000000..f36b0d9 --- /dev/null +++ b/proto/nebius/common/v1/operation_service.sensitive.pb.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetOperationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetOperationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListOperationsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListOperationsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListOperationsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +func (x *ListOperationsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Operations { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListOperationsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListOperationsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListOperationsResponse], use the following code: +// +// var original *ListOperationsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListOperationsResponse) +func (x *ListOperationsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListOperationsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListOperationsResponse)(c)) +} + +// wrapperListOperationsResponse is used to return [ListOperationsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListOperationsResponse ListOperationsResponse + +func (w *wrapperListOperationsResponse) String() string { + return (*ListOperationsResponse)(w).String() +} + +func (*wrapperListOperationsResponse) ProtoMessage() {} + +func (w *wrapperListOperationsResponse) ProtoReflect() protoreflect.Message { + return (*ListOperationsResponse)(w).ProtoReflect() +} diff --git a/proto/nebius/common/v1/operation_service_grpc.pb.go b/proto/nebius/common/v1/operation_service_grpc.pb.go new file mode 100644 index 0000000..f9f4d85 --- /dev/null +++ b/proto/nebius/common/v1/operation_service_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/common/v1/operation_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OperationService_Get_FullMethodName = "/nebius.common.v1.OperationService/Get" + OperationService_List_FullMethodName = "/nebius.common.v1.OperationService/List" +) + +// OperationServiceClient is the client API for OperationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OperationServiceClient interface { + Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) + List(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) +} + +type operationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewOperationServiceClient(cc grpc.ClientConnInterface) OperationServiceClient { + return &operationServiceClient{cc} +} + +func (c *operationServiceClient) Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, OperationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationServiceClient) List(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { + out := new(ListOperationsResponse) + err := c.cc.Invoke(ctx, OperationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperationServiceServer is the server API for OperationService service. +// All implementations should embed UnimplementedOperationServiceServer +// for forward compatibility +type OperationServiceServer interface { + Get(context.Context, *GetOperationRequest) (*Operation, error) + List(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) +} + +// UnimplementedOperationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedOperationServiceServer struct { +} + +func (UnimplementedOperationServiceServer) Get(context.Context, *GetOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedOperationServiceServer) List(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeOperationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperationServiceServer will +// result in compilation errors. +type UnsafeOperationServiceServer interface { + mustEmbedUnimplementedOperationServiceServer() +} + +func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer) { + s.RegisterService(&OperationService_ServiceDesc, srv) +} + +func _OperationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationServiceServer).Get(ctx, req.(*GetOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OperationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationServiceServer).List(ctx, req.(*ListOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OperationService_ServiceDesc is the grpc.ServiceDesc for OperationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OperationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.common.v1.OperationService", + HandlerType: (*OperationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _OperationService_Get_Handler, + }, + { + MethodName: "List", + Handler: _OperationService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/common/v1/operation_service.proto", +} diff --git a/proto/nebius/common/v1alpha1/operation.pb.go b/proto/nebius/common/v1alpha1/operation.pb.go new file mode 100644 index 0000000..67ee6f8 --- /dev/null +++ b/proto/nebius/common/v1alpha1/operation.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/common/v1alpha1/operation.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the operation. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Human readable description of the operation. 0-256 characters long. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Creation timestamp. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // ID of the user or service account who initiated the operation. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + CreatedBy string `protobuf:"bytes,4,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` + // The time when the operation finished. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // The request that generated this operation. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Request *anypb.Any `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"` + // The request headers that are essential for the request that generated the operation. + // For instance, `x-resetmask`. Without these headers the request might have been processed + // differently if repeated. + // All the header names *must* be converted to lower case. + // Validator is based on: + // https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + RequestHeaders map[string]*OperationRequestHeader `protobuf:"bytes,11,rep,name=request_headers,json=requestHeaders,proto3" json:"request_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // ID of the resource that this operation creates, updates, deletes or otherwise changes. + // + // If the operation affects multiple resources or does not affect any API resources at all + // (e.g. a routine maintenance operation visible to the user), the [resource_id] must be empty. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,7,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Snapshot of the resource at the moment this operation started. + // - [resource.spec] and [resource.metadata] reflect the desired resource state at the moment + // this operation started. + // E.g., in an Update operation it will be the *updated* resource spec and metadata, + // in a Create operation it will be the spec and metadata *of the resource being created*, + // and so on. + // - [resource.status] reflects the status of the resource at the moment this operation started. + // This is a snapshot, call the Service/Get to get current status of the resource. + // + // The [resource] field MUST never be updated *after* this operation has started. + // + // In a Delete operation, an operation affecting multiple resources or an operation that doesn't + // affect any API resources at all (e.g. a routine maintenance operation visible to the user), + // the [resource] inside MUST be a [google.protobuf.Empty]. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Resource *anypb.Any `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` + // Additional information about the progress of an operation, e.g., a progress percentage. + // MAY be absent while the operation is running, MUST be absent after the operation has completed. + // + // Format of message inside [progress_data] is service-dependent and MUST be documented by the + // service, IF it is used. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + ProgressData *anypb.Any `protobuf:"bytes,9,opt,name=progress_data,json=progressData,proto3" json:"progress_data,omitempty"` + // The status of this operation. Set when this operation is completed. + // See https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto. + // + // [status.code] is https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto: + // - If [status.code] == OK, the operation has completed successfully. + // - If [status.code] != OK, the operation has failed or has been cancelled. + // - [status.message] will contain a user-readable and actionable error message. + // - [status.details] will contain additional diagnostic information in the form of + // [ServiceError] from ../error/v1alpha1/error.proto + // - [status.code] must belong to an Operation-compatible subset of GRPC codes: + // OK, CANCELLED, PERMISSION_DENIED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, INTERNAL + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Status *status.Status `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetFinishedAt() *timestamppb.Timestamp { + if x != nil { + return x.FinishedAt + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetRequest() *anypb.Any { + if x != nil { + return x.Request + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetRequestHeaders() map[string]*OperationRequestHeader { + if x != nil { + return x.RequestHeaders + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetResource() *anypb.Any { + if x != nil { + return x.Resource + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetProgressData() *anypb.Any { + if x != nil { + return x.ProgressData + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *Operation) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// Request header is a container for all the values of a particular header of a request +// as there is no such thing as map +// +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +type OperationRequestHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The values of a particular header from a request + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *OperationRequestHeader) Reset() { + *x = OperationRequestHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationRequestHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationRequestHeader) ProtoMessage() {} + +func (x *OperationRequestHeader) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationRequestHeader.ProtoReflect.Descriptor instead. +func (*OperationRequestHeader) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_proto_rawDescGZIP(), []int{0, 0} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation.proto is marked as deprecated. +func (x *OperationRequestHeader) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +var File_nebius_common_v1alpha1_operation_proto protoreflect.FileDescriptor + +var file_nebius_common_v1alpha1_operation_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xdf, 0x05, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x3b, 0x0a, 0x0b, + 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7c, 0x0a, 0x0f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x1c, 0xba, 0x48, 0x19, 0x9a, 0x01, + 0x16, 0x22, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x2d, 0x61, + 0x2d, 0x7a, 0x5c, 0x2e, 0x5d, 0x2a, 0x24, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x1a, 0x28, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x73, 0x0a, 0x13, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x3a, 0x02, 0x18, 0x01, 0x42, 0x6a, 0x0a, 0x1d, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_v1alpha1_operation_proto_rawDescOnce sync.Once + file_nebius_common_v1alpha1_operation_proto_rawDescData = file_nebius_common_v1alpha1_operation_proto_rawDesc +) + +func file_nebius_common_v1alpha1_operation_proto_rawDescGZIP() []byte { + file_nebius_common_v1alpha1_operation_proto_rawDescOnce.Do(func() { + file_nebius_common_v1alpha1_operation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1alpha1_operation_proto_rawDescData) + }) + return file_nebius_common_v1alpha1_operation_proto_rawDescData +} + +var file_nebius_common_v1alpha1_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_common_v1alpha1_operation_proto_goTypes = []any{ + (*Operation)(nil), // 0: nebius.common.v1alpha1.Operation + (*OperationRequestHeader)(nil), // 1: nebius.common.v1alpha1.Operation.request_header + nil, // 2: nebius.common.v1alpha1.Operation.RequestHeadersEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*anypb.Any)(nil), // 4: google.protobuf.Any + (*status.Status)(nil), // 5: google.rpc.Status +} +var file_nebius_common_v1alpha1_operation_proto_depIdxs = []int32{ + 3, // 0: nebius.common.v1alpha1.Operation.created_at:type_name -> google.protobuf.Timestamp + 3, // 1: nebius.common.v1alpha1.Operation.finished_at:type_name -> google.protobuf.Timestamp + 4, // 2: nebius.common.v1alpha1.Operation.request:type_name -> google.protobuf.Any + 2, // 3: nebius.common.v1alpha1.Operation.request_headers:type_name -> nebius.common.v1alpha1.Operation.RequestHeadersEntry + 4, // 4: nebius.common.v1alpha1.Operation.resource:type_name -> google.protobuf.Any + 4, // 5: nebius.common.v1alpha1.Operation.progress_data:type_name -> google.protobuf.Any + 5, // 6: nebius.common.v1alpha1.Operation.status:type_name -> google.rpc.Status + 1, // 7: nebius.common.v1alpha1.Operation.RequestHeadersEntry.value:type_name -> nebius.common.v1alpha1.Operation.request_header + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1alpha1_operation_proto_init() } +func file_nebius_common_v1alpha1_operation_proto_init() { + if File_nebius_common_v1alpha1_operation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1alpha1_operation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1alpha1_operation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*OperationRequestHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1alpha1_operation_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_common_v1alpha1_operation_proto_goTypes, + DependencyIndexes: file_nebius_common_v1alpha1_operation_proto_depIdxs, + MessageInfos: file_nebius_common_v1alpha1_operation_proto_msgTypes, + }.Build() + File_nebius_common_v1alpha1_operation_proto = out.File + file_nebius_common_v1alpha1_operation_proto_rawDesc = nil + file_nebius_common_v1alpha1_operation_proto_goTypes = nil + file_nebius_common_v1alpha1_operation_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1alpha1/operation.sensitive.pb.go b/proto/nebius/common/v1alpha1/operation.sensitive.pb.go new file mode 100644 index 0000000..7498413 --- /dev/null +++ b/proto/nebius/common/v1alpha1/operation.sensitive.pb.go @@ -0,0 +1,89 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + anypb "google.golang.org/protobuf/types/known/anypb" + slog "log/slog" +) + +// Sanitize mutates [Operation] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +func (x *Operation) Sanitize() { + if x == nil { + return + } + sanitizeAny := func(a *anypb.Any) { + if a == nil { + return + } + p, err := anypb.UnmarshalNew(a, proto.UnmarshalOptions{DiscardUnknown: true}) + if err != nil { + a.TypeUrl = "type.googleapis.com/google.protobuf.Empty" + a.Value = nil + return + } + if s, ok := p.(interface{ Sanitize() }); ok { + s.Sanitize() + } + err = a.MarshalFrom(p) + if err != nil { + a.TypeUrl = "type.googleapis.com/google.protobuf.Empty" + a.Value = nil + } + } + sanitizeAny(x.Request) + sanitizeAny(x.Resource) + sanitizeAny(x.ProgressData) + for _, y := range x.Status.GetDetails() { + sanitizeAny(y) + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Operation]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Operation +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Operation], use the following code: +// +// var original *Operation +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Operation) +func (x *Operation) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Operation) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperOperation)(c)) +} + +// wrapperOperation is used to return [Operation] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperOperation Operation + +func (w *wrapperOperation) String() string { + return (*Operation)(w).String() +} + +func (*wrapperOperation) ProtoMessage() {} + +func (w *wrapperOperation) ProtoReflect() protoreflect.Message { + return (*Operation)(w).ProtoReflect() +} + +// func (x *OperationRequestHeader) Sanitize() // is not generated as no sensitive fields found +// func (x *OperationRequestHeader) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1alpha1/operation_service.pb.go b/proto/nebius/common/v1alpha1/operation_service.pb.go new file mode 100644 index 0000000..9312b0a --- /dev/null +++ b/proto/nebius/common/v1alpha1/operation_service.pb.go @@ -0,0 +1,496 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/common/v1alpha1/operation_service.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +type GetOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation ID. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetOperationRequest) Reset() { + *x = GetOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperationRequest) ProtoMessage() {} + +func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead. +func (*GetOperationRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *GetOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +type ListOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Resource to list operations for. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Page size. [1...1000]. Optional, if not specified, a reasonable default will be chosen by the service. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Listing continuation token. Empty to start listing from the first page. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter expression for the listing results. Optional. + // Filter expression format: TBD. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListOperationsRequest) Reset() { + *x = ListOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsRequest) ProtoMessage() {} + +func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +type ListOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of operations on this result page. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` + // Listing continuation token for the next page of results. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListOperationsResponse) Reset() { + *x = ListOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsResponse) ProtoMessage() {} + +func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead. +func (*ListOperationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsResponse) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +type ListOperationsByParentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the parent to list operations for resource type at. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Page size. [1...1000]. Optional, if not specified, a reasonable default will be chosen by the service. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Listing continuation token. Empty to start listing from the first page. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter expression for the listing results. Optional. + // Filter expression format: TBD. + // + // Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListOperationsByParentRequest) Reset() { + *x = ListOperationsByParentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsByParentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsByParentRequest) ProtoMessage() {} + +func (x *ListOperationsByParentRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_common_v1alpha1_operation_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsByParentRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsByParentRequest) Descriptor() ([]byte, []int) { + return file_nebius_common_v1alpha1_operation_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsByParentRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsByParentRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsByParentRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/common/v1alpha1/operation_service.proto is marked as deprecated. +func (x *ListOperationsByParentRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +var File_nebius_common_v1alpha1_operation_service_proto protoreflect.FileDescriptor + +var file_nebius_common_v1alpha1_operation_service_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x16, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x98, 0x01, 0x0a, 0x15, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x87, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, + 0x9c, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x02, 0x18, 0x01, 0x32, 0xe8, + 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x11, 0x9a, 0xb5, 0x18, 0x0d, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x1a, 0x03, 0x88, 0x02, 0x01, 0x42, 0x71, 0x0a, 0x1d, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_common_v1alpha1_operation_service_proto_rawDescOnce sync.Once + file_nebius_common_v1alpha1_operation_service_proto_rawDescData = file_nebius_common_v1alpha1_operation_service_proto_rawDesc +) + +func file_nebius_common_v1alpha1_operation_service_proto_rawDescGZIP() []byte { + file_nebius_common_v1alpha1_operation_service_proto_rawDescOnce.Do(func() { + file_nebius_common_v1alpha1_operation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_common_v1alpha1_operation_service_proto_rawDescData) + }) + return file_nebius_common_v1alpha1_operation_service_proto_rawDescData +} + +var file_nebius_common_v1alpha1_operation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_common_v1alpha1_operation_service_proto_goTypes = []any{ + (*GetOperationRequest)(nil), // 0: nebius.common.v1alpha1.GetOperationRequest + (*ListOperationsRequest)(nil), // 1: nebius.common.v1alpha1.ListOperationsRequest + (*ListOperationsResponse)(nil), // 2: nebius.common.v1alpha1.ListOperationsResponse + (*ListOperationsByParentRequest)(nil), // 3: nebius.common.v1alpha1.ListOperationsByParentRequest + (*Operation)(nil), // 4: nebius.common.v1alpha1.Operation +} +var file_nebius_common_v1alpha1_operation_service_proto_depIdxs = []int32{ + 4, // 0: nebius.common.v1alpha1.ListOperationsResponse.operations:type_name -> nebius.common.v1alpha1.Operation + 0, // 1: nebius.common.v1alpha1.OperationService.Get:input_type -> nebius.common.v1alpha1.GetOperationRequest + 1, // 2: nebius.common.v1alpha1.OperationService.List:input_type -> nebius.common.v1alpha1.ListOperationsRequest + 4, // 3: nebius.common.v1alpha1.OperationService.Get:output_type -> nebius.common.v1alpha1.Operation + 2, // 4: nebius.common.v1alpha1.OperationService.List:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_common_v1alpha1_operation_service_proto_init() } +func file_nebius_common_v1alpha1_operation_service_proto_init() { + if File_nebius_common_v1alpha1_operation_service_proto != nil { + return + } + file_nebius_common_v1alpha1_operation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_common_v1alpha1_operation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1alpha1_operation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1alpha1_operation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_common_v1alpha1_operation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsByParentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_common_v1alpha1_operation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_common_v1alpha1_operation_service_proto_goTypes, + DependencyIndexes: file_nebius_common_v1alpha1_operation_service_proto_depIdxs, + MessageInfos: file_nebius_common_v1alpha1_operation_service_proto_msgTypes, + }.Build() + File_nebius_common_v1alpha1_operation_service_proto = out.File + file_nebius_common_v1alpha1_operation_service_proto_rawDesc = nil + file_nebius_common_v1alpha1_operation_service_proto_goTypes = nil + file_nebius_common_v1alpha1_operation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/common/v1alpha1/operation_service.sensitive.pb.go b/proto/nebius/common/v1alpha1/operation_service.sensitive.pb.go new file mode 100644 index 0000000..73a9ba7 --- /dev/null +++ b/proto/nebius/common/v1alpha1/operation_service.sensitive.pb.go @@ -0,0 +1,72 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetOperationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetOperationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListOperationsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListOperationsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListOperationsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +func (x *ListOperationsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Operations { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListOperationsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// It also sanitizes the content of google.protobuf.Any, i.e. performs unmarshal, sanitize, marshal cycle. +// Important: [proto.UnmarshalOptions.DiscardUnknown] = true is used. +// In case of an error, the content of Any is replaced with google.protobuf.Empty. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListOperationsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListOperationsResponse], use the following code: +// +// var original *ListOperationsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListOperationsResponse) +func (x *ListOperationsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListOperationsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListOperationsResponse)(c)) +} + +// wrapperListOperationsResponse is used to return [ListOperationsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListOperationsResponse ListOperationsResponse + +func (w *wrapperListOperationsResponse) String() string { + return (*ListOperationsResponse)(w).String() +} + +func (*wrapperListOperationsResponse) ProtoMessage() {} + +func (w *wrapperListOperationsResponse) ProtoReflect() protoreflect.Message { + return (*ListOperationsResponse)(w).ProtoReflect() +} + +// func (x *ListOperationsByParentRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListOperationsByParentRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/common/v1alpha1/operation_service_grpc.pb.go b/proto/nebius/common/v1alpha1/operation_service_grpc.pb.go new file mode 100644 index 0000000..f21d660 --- /dev/null +++ b/proto/nebius/common/v1alpha1/operation_service_grpc.pb.go @@ -0,0 +1,154 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/common/v1alpha1/operation_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OperationService_Get_FullMethodName = "/nebius.common.v1alpha1.OperationService/Get" + OperationService_List_FullMethodName = "/nebius.common.v1alpha1.OperationService/List" +) + +// OperationServiceClient is the client API for OperationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type OperationServiceClient interface { + // Returns the latest state of the specified operation. + Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) + // Lists operations for the specified resource. + List(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) +} + +type operationServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewOperationServiceClient(cc grpc.ClientConnInterface) OperationServiceClient { + return &operationServiceClient{cc} +} + +func (c *operationServiceClient) Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, OperationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationServiceClient) List(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { + out := new(ListOperationsResponse) + err := c.cc.Invoke(ctx, OperationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperationServiceServer is the server API for OperationService service. +// All implementations should embed UnimplementedOperationServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type OperationServiceServer interface { + // Returns the latest state of the specified operation. + Get(context.Context, *GetOperationRequest) (*Operation, error) + // Lists operations for the specified resource. + List(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) +} + +// UnimplementedOperationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedOperationServiceServer struct { +} + +func (UnimplementedOperationServiceServer) Get(context.Context, *GetOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedOperationServiceServer) List(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeOperationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperationServiceServer will +// result in compilation errors. +type UnsafeOperationServiceServer interface { + mustEmbedUnimplementedOperationServiceServer() +} + +// Deprecated: Do not use. +func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer) { + s.RegisterService(&OperationService_ServiceDesc, srv) +} + +func _OperationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationServiceServer).Get(ctx, req.(*GetOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OperationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OperationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationServiceServer).List(ctx, req.(*ListOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// OperationService_ServiceDesc is the grpc.ServiceDesc for OperationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OperationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.common.v1alpha1.OperationService", + HandlerType: (*OperationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _OperationService_Get_Handler, + }, + { + MethodName: "List", + Handler: _OperationService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/common/v1alpha1/operation_service.proto", +} diff --git a/proto/nebius/compute/v1/disk.pb.go b/proto/nebius/compute/v1/disk.pb.go new file mode 100644 index 0000000..bcdd47f --- /dev/null +++ b/proto/nebius/compute/v1/disk.pb.go @@ -0,0 +1,831 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/disk.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// the list of available types will be clarified later, it is not final version +type DiskSpec_DiskType int32 + +const ( + DiskSpec_UNSPECIFIED DiskSpec_DiskType = 0 + DiskSpec_NETWORK_SSD DiskSpec_DiskType = 1 + DiskSpec_NETWORK_HDD DiskSpec_DiskType = 2 + DiskSpec_NETWORK_SSD_NON_REPLICATED DiskSpec_DiskType = 3 + DiskSpec_NETWORK_SSD_IO_M3 DiskSpec_DiskType = 4 +) + +// Enum value maps for DiskSpec_DiskType. +var ( + DiskSpec_DiskType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + 3: "NETWORK_SSD_NON_REPLICATED", + 4: "NETWORK_SSD_IO_M3", + } + DiskSpec_DiskType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + "NETWORK_SSD_NON_REPLICATED": 3, + "NETWORK_SSD_IO_M3": 4, + } +) + +func (x DiskSpec_DiskType) Enum() *DiskSpec_DiskType { + p := new(DiskSpec_DiskType) + *p = x + return p +} + +func (x DiskSpec_DiskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskSpec_DiskType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_disk_proto_enumTypes[0].Descriptor() +} + +func (DiskSpec_DiskType) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_disk_proto_enumTypes[0] +} + +func (x DiskSpec_DiskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskSpec_DiskType.Descriptor instead. +func (DiskSpec_DiskType) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{1, 0} +} + +type DiskStatus_State int32 + +const ( + DiskStatus_UNSPECIFIED DiskStatus_State = 0 + DiskStatus_CREATING DiskStatus_State = 1 + DiskStatus_READY DiskStatus_State = 2 + DiskStatus_UPDATING DiskStatus_State = 3 + DiskStatus_DELETING DiskStatus_State = 4 + DiskStatus_ERROR DiskStatus_State = 5 +) + +// Enum value maps for DiskStatus_State. +var ( + DiskStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + DiskStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x DiskStatus_State) Enum() *DiskStatus_State { + p := new(DiskStatus_State) + *p = x + return p +} + +func (x DiskStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_disk_proto_enumTypes[1].Descriptor() +} + +func (DiskStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_disk_proto_enumTypes[1] +} + +func (x DiskStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskStatus_State.Descriptor instead. +func (DiskStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{4, 0} +} + +type Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *DiskStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Disk) Reset() { + *x = Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disk) ProtoMessage() {} + +func (x *Disk) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Disk.ProtoReflect.Descriptor instead. +func (*Disk) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{0} +} + +func (x *Disk) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Disk) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Disk) GetStatus() *DiskStatus { + if x != nil { + return x.Status + } + return nil +} + +type DiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *DiskSpec_SizeBytes + // *DiskSpec_SizeKibibytes + // *DiskSpec_SizeMebibytes + // *DiskSpec_SizeGibibytes + Size isDiskSpec_Size `protobuf_oneof:"size"` + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + Type DiskSpec_DiskType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.compute.v1.DiskSpec_DiskType" json:"type,omitempty"` + PlacementPolicy *DiskPlacementPolicy `protobuf:"bytes,7,opt,name=placement_policy,json=placementPolicy,proto3" json:"placement_policy,omitempty"` + // Types that are assignable to Source: + // + // *DiskSpec_SourceImageId + // *DiskSpec_SourceImageFamily + Source isDiskSpec_Source `protobuf_oneof:"source"` +} + +func (x *DiskSpec) Reset() { + *x = DiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskSpec) ProtoMessage() {} + +func (x *DiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskSpec.ProtoReflect.Descriptor instead. +func (*DiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{1} +} + +func (m *DiskSpec) GetSize() isDiskSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *DiskSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +func (x *DiskSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +func (x *DiskSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +func (x *DiskSpec) GetType() DiskSpec_DiskType { + if x != nil { + return x.Type + } + return DiskSpec_UNSPECIFIED +} + +func (x *DiskSpec) GetPlacementPolicy() *DiskPlacementPolicy { + if x != nil { + return x.PlacementPolicy + } + return nil +} + +func (m *DiskSpec) GetSource() isDiskSpec_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *DiskSpec) GetSourceImageId() string { + if x, ok := x.GetSource().(*DiskSpec_SourceImageId); ok { + return x.SourceImageId + } + return "" +} + +func (x *DiskSpec) GetSourceImageFamily() *SourceImageFamily { + if x, ok := x.GetSource().(*DiskSpec_SourceImageFamily); ok { + return x.SourceImageFamily + } + return nil +} + +type isDiskSpec_Size interface { + isDiskSpec_Size() +} + +type DiskSpec_SizeBytes struct { + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type DiskSpec_SizeKibibytes struct { + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type DiskSpec_SizeMebibytes struct { + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type DiskSpec_SizeGibibytes struct { + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*DiskSpec_SizeBytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeKibibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeMebibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeGibibytes) isDiskSpec_Size() {} + +type isDiskSpec_Source interface { + isDiskSpec_Source() +} + +type DiskSpec_SourceImageId struct { + SourceImageId string `protobuf:"bytes,8,opt,name=source_image_id,json=sourceImageId,proto3,oneof"` +} + +type DiskSpec_SourceImageFamily struct { + SourceImageFamily *SourceImageFamily `protobuf:"bytes,10,opt,name=source_image_family,json=sourceImageFamily,proto3,oneof"` +} + +func (*DiskSpec_SourceImageId) isDiskSpec_Source() {} + +func (*DiskSpec_SourceImageFamily) isDiskSpec_Source() {} + +type SourceImageFamily struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ImageFamily string `protobuf:"bytes,1,opt,name=image_family,json=imageFamily,proto3" json:"image_family,omitempty"` + ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` +} + +func (x *SourceImageFamily) Reset() { + *x = SourceImageFamily{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceImageFamily) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceImageFamily) ProtoMessage() {} + +func (x *SourceImageFamily) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceImageFamily.ProtoReflect.Descriptor instead. +func (*SourceImageFamily) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{2} +} + +func (x *SourceImageFamily) GetImageFamily() string { + if x != nil { + return x.ImageFamily + } + return "" +} + +func (x *SourceImageFamily) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +type DiskPlacementPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlacementGroupId string `protobuf:"bytes,1,opt,name=placement_group_id,json=placementGroupId,proto3" json:"placement_group_id,omitempty"` + PlacementGroupPartition int64 `protobuf:"varint,2,opt,name=placement_group_partition,json=placementGroupPartition,proto3" json:"placement_group_partition,omitempty"` +} + +func (x *DiskPlacementPolicy) Reset() { + *x = DiskPlacementPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskPlacementPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskPlacementPolicy) ProtoMessage() {} + +func (x *DiskPlacementPolicy) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskPlacementPolicy.ProtoReflect.Descriptor instead. +func (*DiskPlacementPolicy) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{3} +} + +func (x *DiskPlacementPolicy) GetPlacementGroupId() string { + if x != nil { + return x.PlacementGroupId + } + return "" +} + +func (x *DiskPlacementPolicy) GetPlacementGroupPartition() int64 { + if x != nil { + return x.PlacementGroupPartition + } + return 0 +} + +type DiskStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State DiskStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1.DiskStatus_State" json:"state,omitempty"` + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + ReadWriteAttachment string `protobuf:"bytes,3,opt,name=read_write_attachment,json=readWriteAttachment,proto3" json:"read_write_attachment,omitempty"` + ReadOnlyAttachments []string `protobuf:"bytes,4,rep,name=read_only_attachments,json=readOnlyAttachments,proto3" json:"read_only_attachments,omitempty"` + SourceImageId string `protobuf:"bytes,5,opt,name=source_image_id,json=sourceImageId,proto3" json:"source_image_id,omitempty"` + SizeBytes int64 `protobuf:"varint,6,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + Reconciling bool `protobuf:"varint,7,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *DiskStatus) Reset() { + *x = DiskStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskStatus) ProtoMessage() {} + +func (x *DiskStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskStatus.ProtoReflect.Descriptor instead. +func (*DiskStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_proto_rawDescGZIP(), []int{4} +} + +func (x *DiskStatus) GetState() DiskStatus_State { + if x != nil { + return x.State + } + return DiskStatus_UNSPECIFIED +} + +func (x *DiskStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +func (x *DiskStatus) GetReadWriteAttachment() string { + if x != nil { + return x.ReadWriteAttachment + } + return "" +} + +func (x *DiskStatus) GetReadOnlyAttachments() []string { + if x != nil { + return x.ReadOnlyAttachments + } + return nil +} + +func (x *DiskStatus) GetSourceImageId() string { + if x != nil { + return x.SourceImageId + } + return "" +} + +func (x *DiskStatus) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *DiskStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1_disk_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_disk_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x04, 0x44, 0x69, + 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb0, 0x05, 0x0a, 0x08, 0x44, + 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x02, 0x48, 0x00, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, + 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, + 0x73, 0x69, 0x7a, 0x65, 0x4b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, + 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, + 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, + 0x7a, 0x65, 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x57, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x13, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x48, 0x01, 0x52, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x74, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, + 0x5f, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, + 0x4b, 0x5f, 0x48, 0x44, 0x44, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x45, 0x54, 0x57, 0x4f, + 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, + 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, + 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x49, 0x4f, 0x5f, 0x4d, 0x33, 0x10, 0x04, 0x42, 0x0d, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x5b, 0x0a, + 0x11, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x44, 0x69, + 0x73, 0x6b, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, + 0x3a, 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x17, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9f, 0x03, 0x0a, 0x0a, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, + 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x58, 0x0a, + 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x44, 0x69, 0x73, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_disk_proto_rawDescOnce sync.Once + file_nebius_compute_v1_disk_proto_rawDescData = file_nebius_compute_v1_disk_proto_rawDesc +) + +func file_nebius_compute_v1_disk_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_disk_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_disk_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_disk_proto_rawDescData) + }) + return file_nebius_compute_v1_disk_proto_rawDescData +} + +var file_nebius_compute_v1_disk_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_compute_v1_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_compute_v1_disk_proto_goTypes = []any{ + (DiskSpec_DiskType)(0), // 0: nebius.compute.v1.DiskSpec.DiskType + (DiskStatus_State)(0), // 1: nebius.compute.v1.DiskStatus.State + (*Disk)(nil), // 2: nebius.compute.v1.Disk + (*DiskSpec)(nil), // 3: nebius.compute.v1.DiskSpec + (*SourceImageFamily)(nil), // 4: nebius.compute.v1.SourceImageFamily + (*DiskPlacementPolicy)(nil), // 5: nebius.compute.v1.DiskPlacementPolicy + (*DiskStatus)(nil), // 6: nebius.compute.v1.DiskStatus + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1_disk_proto_depIdxs = []int32{ + 7, // 0: nebius.compute.v1.Disk.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.compute.v1.Disk.spec:type_name -> nebius.compute.v1.DiskSpec + 6, // 2: nebius.compute.v1.Disk.status:type_name -> nebius.compute.v1.DiskStatus + 0, // 3: nebius.compute.v1.DiskSpec.type:type_name -> nebius.compute.v1.DiskSpec.DiskType + 5, // 4: nebius.compute.v1.DiskSpec.placement_policy:type_name -> nebius.compute.v1.DiskPlacementPolicy + 4, // 5: nebius.compute.v1.DiskSpec.source_image_family:type_name -> nebius.compute.v1.SourceImageFamily + 1, // 6: nebius.compute.v1.DiskStatus.state:type_name -> nebius.compute.v1.DiskStatus.State + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_disk_proto_init() } +func file_nebius_compute_v1_disk_proto_init() { + if File_nebius_compute_v1_disk_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_disk_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*SourceImageFamily); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DiskPlacementPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DiskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1_disk_proto_msgTypes[1].OneofWrappers = []any{ + (*DiskSpec_SizeBytes)(nil), + (*DiskSpec_SizeKibibytes)(nil), + (*DiskSpec_SizeMebibytes)(nil), + (*DiskSpec_SizeGibibytes)(nil), + (*DiskSpec_SourceImageId)(nil), + (*DiskSpec_SourceImageFamily)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_disk_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_disk_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_disk_proto_depIdxs, + EnumInfos: file_nebius_compute_v1_disk_proto_enumTypes, + MessageInfos: file_nebius_compute_v1_disk_proto_msgTypes, + }.Build() + File_nebius_compute_v1_disk_proto = out.File + file_nebius_compute_v1_disk_proto_rawDesc = nil + file_nebius_compute_v1_disk_proto_goTypes = nil + file_nebius_compute_v1_disk_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/disk.sensitive.pb.go b/proto/nebius/compute/v1/disk.sensitive.pb.go new file mode 100644 index 0000000..1cd1c72 --- /dev/null +++ b/proto/nebius/compute/v1/disk.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Disk) Sanitize() // is not generated as no sensitive fields found +// func (x *Disk) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SourceImageFamily) Sanitize() // is not generated as no sensitive fields found +// func (x *SourceImageFamily) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskPlacementPolicy) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskPlacementPolicy) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/disk_service.pb.go b/proto/nebius/compute/v1/disk_service.pb.go new file mode 100644 index 0000000..75ff520 --- /dev/null +++ b/proto/nebius/compute/v1/disk_service.pb.go @@ -0,0 +1,608 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/disk_service.proto + +package v1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetDiskRequest) Reset() { + *x = GetDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskRequest) ProtoMessage() {} + +func (x *GetDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskRequest.ProtoReflect.Descriptor instead. +func (*GetDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetDiskRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListDisksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListDisksRequest) Reset() { + *x = ListDisksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisksRequest) ProtoMessage() {} + +func (x *ListDisksRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisksRequest.ProtoReflect.Descriptor instead. +func (*ListDisksRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListDisksRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListDisksRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDisksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListDisksRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type CreateDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateDiskRequest) Reset() { + *x = CreateDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDiskRequest) ProtoMessage() {} + +func (x *CreateDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDiskRequest.ProtoReflect.Descriptor instead. +func (*CreateDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateDiskRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateDiskRequest) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateDiskRequest) Reset() { + *x = UpdateDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDiskRequest) ProtoMessage() {} + +func (x *UpdateDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDiskRequest.ProtoReflect.Descriptor instead. +func (*UpdateDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateDiskRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateDiskRequest) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteDiskRequest) Reset() { + *x = DeleteDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDiskRequest) ProtoMessage() {} + +func (x *DeleteDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDiskRequest.ProtoReflect.Descriptor instead. +func (*DeleteDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteDiskRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListDisksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Disk `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDisksResponse) Reset() { + *x = ListDisksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisksResponse) ProtoMessage() {} + +func (x *ListDisksResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_disk_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisksResponse.ProtoReflect.Descriptor instead. +func (*ListDisksResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_disk_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListDisksResponse) GetItems() []*Disk { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListDisksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1_disk_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_disk_service_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x84, + 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, + 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xca, 0x04, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x48, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x6b, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, + 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x5f, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x10, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_disk_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_disk_service_proto_rawDescData = file_nebius_compute_v1_disk_service_proto_rawDesc +) + +func file_nebius_compute_v1_disk_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_disk_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_disk_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_disk_service_proto_rawDescData) + }) + return file_nebius_compute_v1_disk_service_proto_rawDescData +} + +var file_nebius_compute_v1_disk_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1_disk_service_proto_goTypes = []any{ + (*GetDiskRequest)(nil), // 0: nebius.compute.v1.GetDiskRequest + (*ListDisksRequest)(nil), // 1: nebius.compute.v1.ListDisksRequest + (*CreateDiskRequest)(nil), // 2: nebius.compute.v1.CreateDiskRequest + (*UpdateDiskRequest)(nil), // 3: nebius.compute.v1.UpdateDiskRequest + (*DeleteDiskRequest)(nil), // 4: nebius.compute.v1.DeleteDiskRequest + (*ListDisksResponse)(nil), // 5: nebius.compute.v1.ListDisksResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*DiskSpec)(nil), // 7: nebius.compute.v1.DiskSpec + (*Disk)(nil), // 8: nebius.compute.v1.Disk + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*ListOperationsByParentRequest)(nil), // 10: nebius.compute.v1.ListOperationsByParentRequest + (*v1.Operation)(nil), // 11: nebius.common.v1.Operation + (*v1.ListOperationsResponse)(nil), // 12: nebius.common.v1.ListOperationsResponse +} +var file_nebius_compute_v1_disk_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1.CreateDiskRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1.CreateDiskRequest.spec:type_name -> nebius.compute.v1.DiskSpec + 6, // 2: nebius.compute.v1.UpdateDiskRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1.UpdateDiskRequest.spec:type_name -> nebius.compute.v1.DiskSpec + 8, // 4: nebius.compute.v1.ListDisksResponse.items:type_name -> nebius.compute.v1.Disk + 0, // 5: nebius.compute.v1.DiskService.Get:input_type -> nebius.compute.v1.GetDiskRequest + 9, // 6: nebius.compute.v1.DiskService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1.DiskService.List:input_type -> nebius.compute.v1.ListDisksRequest + 2, // 8: nebius.compute.v1.DiskService.Create:input_type -> nebius.compute.v1.CreateDiskRequest + 3, // 9: nebius.compute.v1.DiskService.Update:input_type -> nebius.compute.v1.UpdateDiskRequest + 4, // 10: nebius.compute.v1.DiskService.Delete:input_type -> nebius.compute.v1.DeleteDiskRequest + 10, // 11: nebius.compute.v1.DiskService.ListOperationsByParent:input_type -> nebius.compute.v1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1.DiskService.Get:output_type -> nebius.compute.v1.Disk + 8, // 13: nebius.compute.v1.DiskService.GetByName:output_type -> nebius.compute.v1.Disk + 5, // 14: nebius.compute.v1.DiskService.List:output_type -> nebius.compute.v1.ListDisksResponse + 11, // 15: nebius.compute.v1.DiskService.Create:output_type -> nebius.common.v1.Operation + 11, // 16: nebius.compute.v1.DiskService.Update:output_type -> nebius.common.v1.Operation + 11, // 17: nebius.compute.v1.DiskService.Delete:output_type -> nebius.common.v1.Operation + 12, // 18: nebius.compute.v1.DiskService.ListOperationsByParent:output_type -> nebius.common.v1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_disk_service_proto_init() } +func file_nebius_compute_v1_disk_service_proto_init() { + if File_nebius_compute_v1_disk_service_proto != nil { + return + } + file_nebius_compute_v1_disk_proto_init() + file_nebius_compute_v1_operation_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_disk_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListDisksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_disk_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListDisksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_disk_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1_disk_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_disk_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_disk_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_disk_service_proto = out.File + file_nebius_compute_v1_disk_service_proto_rawDesc = nil + file_nebius_compute_v1_disk_service_proto_goTypes = nil + file_nebius_compute_v1_disk_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/disk_service.sensitive.pb.go b/proto/nebius/compute/v1/disk_service.sensitive.pb.go new file mode 100644 index 0000000..2d33e29 --- /dev/null +++ b/proto/nebius/compute/v1/disk_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListDisksRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListDisksRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListDisksResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListDisksResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/disk_service_grpc.pb.go b/proto/nebius/compute/v1/disk_service_grpc.pb.go new file mode 100644 index 0000000..2152ce8 --- /dev/null +++ b/proto/nebius/compute/v1/disk_service_grpc.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/compute/v1/disk_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + DiskService_Get_FullMethodName = "/nebius.compute.v1.DiskService/Get" + DiskService_GetByName_FullMethodName = "/nebius.compute.v1.DiskService/GetByName" + DiskService_List_FullMethodName = "/nebius.compute.v1.DiskService/List" + DiskService_Create_FullMethodName = "/nebius.compute.v1.DiskService/Create" + DiskService_Update_FullMethodName = "/nebius.compute.v1.DiskService/Update" + DiskService_Delete_FullMethodName = "/nebius.compute.v1.DiskService/Delete" + DiskService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1.DiskService/ListOperationsByParent" +) + +// DiskServiceClient is the client API for DiskService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DiskServiceClient interface { + Get(ctx context.Context, in *GetDiskRequest, opts ...grpc.CallOption) (*Disk, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Disk, error) + List(ctx context.Context, in *ListDisksRequest, opts ...grpc.CallOption) (*ListDisksResponse, error) + Create(ctx context.Context, in *CreateDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) + ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type diskServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDiskServiceClient(cc grpc.ClientConnInterface) DiskServiceClient { + return &diskServiceClient{cc} +} + +func (c *diskServiceClient) Get(ctx context.Context, in *GetDiskRequest, opts ...grpc.CallOption) (*Disk, error) { + out := new(Disk) + err := c.cc.Invoke(ctx, DiskService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Disk, error) { + out := new(Disk) + err := c.cc.Invoke(ctx, DiskService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) List(ctx context.Context, in *ListDisksRequest, opts ...grpc.CallOption) (*ListDisksResponse, error) { + out := new(ListDisksResponse) + err := c.cc.Invoke(ctx, DiskService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Create(ctx context.Context, in *CreateDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, DiskService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Update(ctx context.Context, in *UpdateDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, DiskService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Delete(ctx context.Context, in *DeleteDiskRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, DiskService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + out := new(v1.ListOperationsResponse) + err := c.cc.Invoke(ctx, DiskService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DiskServiceServer is the server API for DiskService service. +// All implementations should embed UnimplementedDiskServiceServer +// for forward compatibility +type DiskServiceServer interface { + Get(context.Context, *GetDiskRequest) (*Disk, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Disk, error) + List(context.Context, *ListDisksRequest) (*ListDisksResponse, error) + Create(context.Context, *CreateDiskRequest) (*v1.Operation, error) + Update(context.Context, *UpdateDiskRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteDiskRequest) (*v1.Operation, error) + ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) +} + +// UnimplementedDiskServiceServer should be embedded to have forward compatible implementations. +type UnimplementedDiskServiceServer struct { +} + +func (UnimplementedDiskServiceServer) Get(context.Context, *GetDiskRequest) (*Disk, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedDiskServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Disk, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedDiskServiceServer) List(context.Context, *ListDisksRequest) (*ListDisksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedDiskServiceServer) Create(context.Context, *CreateDiskRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedDiskServiceServer) Update(context.Context, *UpdateDiskRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedDiskServiceServer) Delete(context.Context, *DeleteDiskRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedDiskServiceServer) ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeDiskServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DiskServiceServer will +// result in compilation errors. +type UnsafeDiskServiceServer interface { + mustEmbedUnimplementedDiskServiceServer() +} + +func RegisterDiskServiceServer(s grpc.ServiceRegistrar, srv DiskServiceServer) { + s.RegisterService(&DiskService_ServiceDesc, srv) +} + +func _DiskService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Get(ctx, req.(*GetDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDisksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).List(ctx, req.(*ListDisksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Create(ctx, req.(*CreateDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Update(ctx, req.(*UpdateDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Delete(ctx, req.(*DeleteDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).ListOperationsByParent(ctx, req.(*ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DiskService_ServiceDesc is the grpc.ServiceDesc for DiskService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DiskService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1.DiskService", + HandlerType: (*DiskServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _DiskService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _DiskService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _DiskService_List_Handler, + }, + { + MethodName: "Create", + Handler: _DiskService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _DiskService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _DiskService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _DiskService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1/disk_service.proto", +} diff --git a/proto/nebius/compute/v1/filesystem.pb.go b/proto/nebius/compute/v1/filesystem.pb.go new file mode 100644 index 0000000..2384fbb --- /dev/null +++ b/proto/nebius/compute/v1/filesystem.pb.go @@ -0,0 +1,596 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/filesystem.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FilesystemSpec_FilesystemType int32 + +const ( + FilesystemSpec_UNSPECIFIED FilesystemSpec_FilesystemType = 0 + // the list of available types will be clarified later, it is not final version + FilesystemSpec_NETWORK_SSD FilesystemSpec_FilesystemType = 1 + FilesystemSpec_NETWORK_HDD FilesystemSpec_FilesystemType = 2 +) + +// Enum value maps for FilesystemSpec_FilesystemType. +var ( + FilesystemSpec_FilesystemType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + } + FilesystemSpec_FilesystemType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + } +) + +func (x FilesystemSpec_FilesystemType) Enum() *FilesystemSpec_FilesystemType { + p := new(FilesystemSpec_FilesystemType) + *p = x + return p +} + +func (x FilesystemSpec_FilesystemType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FilesystemSpec_FilesystemType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_filesystem_proto_enumTypes[0].Descriptor() +} + +func (FilesystemSpec_FilesystemType) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_filesystem_proto_enumTypes[0] +} + +func (x FilesystemSpec_FilesystemType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FilesystemSpec_FilesystemType.Descriptor instead. +func (FilesystemSpec_FilesystemType) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_proto_rawDescGZIP(), []int{1, 0} +} + +type FilesystemStatus_State int32 + +const ( + FilesystemStatus_UNSPECIFIED FilesystemStatus_State = 0 + FilesystemStatus_CREATING FilesystemStatus_State = 1 + FilesystemStatus_READY FilesystemStatus_State = 2 + FilesystemStatus_UPDATING FilesystemStatus_State = 3 + FilesystemStatus_DELETING FilesystemStatus_State = 4 + FilesystemStatus_ERROR FilesystemStatus_State = 5 +) + +// Enum value maps for FilesystemStatus_State. +var ( + FilesystemStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + FilesystemStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x FilesystemStatus_State) Enum() *FilesystemStatus_State { + p := new(FilesystemStatus_State) + *p = x + return p +} + +func (x FilesystemStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FilesystemStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_filesystem_proto_enumTypes[1].Descriptor() +} + +func (FilesystemStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_filesystem_proto_enumTypes[1] +} + +func (x FilesystemStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FilesystemStatus_State.Descriptor instead. +func (FilesystemStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_proto_rawDescGZIP(), []int{2, 0} +} + +type Filesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *FilesystemStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Filesystem) Reset() { + *x = Filesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filesystem) ProtoMessage() {} + +func (x *Filesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filesystem.ProtoReflect.Descriptor instead. +func (*Filesystem) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_proto_rawDescGZIP(), []int{0} +} + +func (x *Filesystem) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Filesystem) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Filesystem) GetStatus() *FilesystemStatus { + if x != nil { + return x.Status + } + return nil +} + +type FilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *FilesystemSpec_SizeBytes + // *FilesystemSpec_SizeKibibytes + // *FilesystemSpec_SizeMebibytes + // *FilesystemSpec_SizeGibibytes + Size isFilesystemSpec_Size `protobuf_oneof:"size"` + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + Type FilesystemSpec_FilesystemType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.compute.v1.FilesystemSpec_FilesystemType" json:"type,omitempty"` +} + +func (x *FilesystemSpec) Reset() { + *x = FilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilesystemSpec) ProtoMessage() {} + +func (x *FilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilesystemSpec.ProtoReflect.Descriptor instead. +func (*FilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_proto_rawDescGZIP(), []int{1} +} + +func (m *FilesystemSpec) GetSize() isFilesystemSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *FilesystemSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +func (x *FilesystemSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +func (x *FilesystemSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +func (x *FilesystemSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +func (x *FilesystemSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +func (x *FilesystemSpec) GetType() FilesystemSpec_FilesystemType { + if x != nil { + return x.Type + } + return FilesystemSpec_UNSPECIFIED +} + +type isFilesystemSpec_Size interface { + isFilesystemSpec_Size() +} + +type FilesystemSpec_SizeBytes struct { + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type FilesystemSpec_SizeKibibytes struct { + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type FilesystemSpec_SizeMebibytes struct { + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type FilesystemSpec_SizeGibibytes struct { + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*FilesystemSpec_SizeBytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeKibibytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeMebibytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeGibibytes) isFilesystemSpec_Size() {} + +type FilesystemStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State FilesystemStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1.FilesystemStatus_State" json:"state,omitempty"` + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + ReadWriteAttachments []string `protobuf:"bytes,3,rep,name=read_write_attachments,json=readWriteAttachments,proto3" json:"read_write_attachments,omitempty"` + ReadOnlyAttachments []string `protobuf:"bytes,4,rep,name=read_only_attachments,json=readOnlyAttachments,proto3" json:"read_only_attachments,omitempty"` + SizeBytes int64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + Reconciling bool `protobuf:"varint,6,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *FilesystemStatus) Reset() { + *x = FilesystemStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilesystemStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilesystemStatus) ProtoMessage() {} + +func (x *FilesystemStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilesystemStatus.ProtoReflect.Descriptor instead. +func (*FilesystemStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_proto_rawDescGZIP(), []int{2} +} + +func (x *FilesystemStatus) GetState() FilesystemStatus_State { + if x != nil { + return x.State + } + return FilesystemStatus_UNSPECIFIED +} + +func (x *FilesystemStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +func (x *FilesystemStatus) GetReadWriteAttachments() []string { + if x != nil { + return x.ReadWriteAttachments + } + return nil +} + +func (x *FilesystemStatus) GetReadOnlyAttachments() []string { + if x != nil { + return x.ReadOnlyAttachments + } + return nil +} + +func (x *FilesystemStatus) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *FilesystemStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1_filesystem_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_filesystem_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xc0, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x9a, 0x03, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, + 0x00, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, + 0x7a, 0x65, 0x4b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, + 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, + 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, + 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, + 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x43, 0x0a, 0x0e, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, + 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x48, 0x44, 0x44, 0x10, 0x02, + 0x42, 0x0d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, + 0x85, 0x03, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, + 0x79, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, + 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, + 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x5e, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_filesystem_proto_rawDescOnce sync.Once + file_nebius_compute_v1_filesystem_proto_rawDescData = file_nebius_compute_v1_filesystem_proto_rawDesc +) + +func file_nebius_compute_v1_filesystem_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_filesystem_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_filesystem_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_filesystem_proto_rawDescData) + }) + return file_nebius_compute_v1_filesystem_proto_rawDescData +} + +var file_nebius_compute_v1_filesystem_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_compute_v1_filesystem_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1_filesystem_proto_goTypes = []any{ + (FilesystemSpec_FilesystemType)(0), // 0: nebius.compute.v1.FilesystemSpec.FilesystemType + (FilesystemStatus_State)(0), // 1: nebius.compute.v1.FilesystemStatus.State + (*Filesystem)(nil), // 2: nebius.compute.v1.Filesystem + (*FilesystemSpec)(nil), // 3: nebius.compute.v1.FilesystemSpec + (*FilesystemStatus)(nil), // 4: nebius.compute.v1.FilesystemStatus + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1_filesystem_proto_depIdxs = []int32{ + 5, // 0: nebius.compute.v1.Filesystem.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.compute.v1.Filesystem.spec:type_name -> nebius.compute.v1.FilesystemSpec + 4, // 2: nebius.compute.v1.Filesystem.status:type_name -> nebius.compute.v1.FilesystemStatus + 0, // 3: nebius.compute.v1.FilesystemSpec.type:type_name -> nebius.compute.v1.FilesystemSpec.FilesystemType + 1, // 4: nebius.compute.v1.FilesystemStatus.state:type_name -> nebius.compute.v1.FilesystemStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_filesystem_proto_init() } +func file_nebius_compute_v1_filesystem_proto_init() { + if File_nebius_compute_v1_filesystem_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_filesystem_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Filesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FilesystemStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1_filesystem_proto_msgTypes[1].OneofWrappers = []any{ + (*FilesystemSpec_SizeBytes)(nil), + (*FilesystemSpec_SizeKibibytes)(nil), + (*FilesystemSpec_SizeMebibytes)(nil), + (*FilesystemSpec_SizeGibibytes)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_filesystem_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_filesystem_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_filesystem_proto_depIdxs, + EnumInfos: file_nebius_compute_v1_filesystem_proto_enumTypes, + MessageInfos: file_nebius_compute_v1_filesystem_proto_msgTypes, + }.Build() + File_nebius_compute_v1_filesystem_proto = out.File + file_nebius_compute_v1_filesystem_proto_rawDesc = nil + file_nebius_compute_v1_filesystem_proto_goTypes = nil + file_nebius_compute_v1_filesystem_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/filesystem.sensitive.pb.go b/proto/nebius/compute/v1/filesystem.sensitive.pb.go new file mode 100644 index 0000000..5bc4e00 --- /dev/null +++ b/proto/nebius/compute/v1/filesystem.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Filesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *Filesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *FilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FilesystemStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *FilesystemStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/filesystem_service.pb.go b/proto/nebius/compute/v1/filesystem_service.pb.go new file mode 100644 index 0000000..0712992 --- /dev/null +++ b/proto/nebius/compute/v1/filesystem_service.pb.go @@ -0,0 +1,616 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/filesystem_service.proto + +package v1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetFilesystemRequest) Reset() { + *x = GetFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFilesystemRequest) ProtoMessage() {} + +func (x *GetFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFilesystemRequest.ProtoReflect.Descriptor instead. +func (*GetFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetFilesystemRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListFilesystemsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListFilesystemsRequest) Reset() { + *x = ListFilesystemsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesystemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesystemsRequest) ProtoMessage() {} + +func (x *ListFilesystemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesystemsRequest.ProtoReflect.Descriptor instead. +func (*ListFilesystemsRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListFilesystemsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListFilesystemsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFilesystemsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListFilesystemsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type CreateFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateFilesystemRequest) Reset() { + *x = CreateFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFilesystemRequest) ProtoMessage() {} + +func (x *CreateFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFilesystemRequest.ProtoReflect.Descriptor instead. +func (*CreateFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateFilesystemRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateFilesystemRequest) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateFilesystemRequest) Reset() { + *x = UpdateFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFilesystemRequest) ProtoMessage() {} + +func (x *UpdateFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFilesystemRequest.ProtoReflect.Descriptor instead. +func (*UpdateFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateFilesystemRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateFilesystemRequest) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteFilesystemRequest) Reset() { + *x = DeleteFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFilesystemRequest) ProtoMessage() {} + +func (x *DeleteFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFilesystemRequest.ProtoReflect.Descriptor instead. +func (*DeleteFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteFilesystemRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListFilesystemsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Filesystem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFilesystemsResponse) Reset() { + *x = ListFilesystemsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesystemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesystemsResponse) ProtoMessage() {} + +func (x *ListFilesystemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_filesystem_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesystemsResponse.ProtoReflect.Descriptor instead. +func (*ListFilesystemsResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListFilesystemsResponse) GetItems() []*Filesystem { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListFilesystemsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1_filesystem_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_filesystem_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0x90, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x76, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x80, 0x05, 0x0a, 0x11, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x4e, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x5d, 0x0a, + 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x51, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x65, 0x0a, 0x18, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_filesystem_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_filesystem_service_proto_rawDescData = file_nebius_compute_v1_filesystem_service_proto_rawDesc +) + +func file_nebius_compute_v1_filesystem_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_filesystem_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_filesystem_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_filesystem_service_proto_rawDescData) + }) + return file_nebius_compute_v1_filesystem_service_proto_rawDescData +} + +var file_nebius_compute_v1_filesystem_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1_filesystem_service_proto_goTypes = []any{ + (*GetFilesystemRequest)(nil), // 0: nebius.compute.v1.GetFilesystemRequest + (*ListFilesystemsRequest)(nil), // 1: nebius.compute.v1.ListFilesystemsRequest + (*CreateFilesystemRequest)(nil), // 2: nebius.compute.v1.CreateFilesystemRequest + (*UpdateFilesystemRequest)(nil), // 3: nebius.compute.v1.UpdateFilesystemRequest + (*DeleteFilesystemRequest)(nil), // 4: nebius.compute.v1.DeleteFilesystemRequest + (*ListFilesystemsResponse)(nil), // 5: nebius.compute.v1.ListFilesystemsResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*FilesystemSpec)(nil), // 7: nebius.compute.v1.FilesystemSpec + (*Filesystem)(nil), // 8: nebius.compute.v1.Filesystem + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*ListOperationsByParentRequest)(nil), // 10: nebius.compute.v1.ListOperationsByParentRequest + (*v1.Operation)(nil), // 11: nebius.common.v1.Operation + (*v1.ListOperationsResponse)(nil), // 12: nebius.common.v1.ListOperationsResponse +} +var file_nebius_compute_v1_filesystem_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1.CreateFilesystemRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1.CreateFilesystemRequest.spec:type_name -> nebius.compute.v1.FilesystemSpec + 6, // 2: nebius.compute.v1.UpdateFilesystemRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1.UpdateFilesystemRequest.spec:type_name -> nebius.compute.v1.FilesystemSpec + 8, // 4: nebius.compute.v1.ListFilesystemsResponse.items:type_name -> nebius.compute.v1.Filesystem + 0, // 5: nebius.compute.v1.FilesystemService.Get:input_type -> nebius.compute.v1.GetFilesystemRequest + 9, // 6: nebius.compute.v1.FilesystemService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1.FilesystemService.List:input_type -> nebius.compute.v1.ListFilesystemsRequest + 2, // 8: nebius.compute.v1.FilesystemService.Create:input_type -> nebius.compute.v1.CreateFilesystemRequest + 3, // 9: nebius.compute.v1.FilesystemService.Update:input_type -> nebius.compute.v1.UpdateFilesystemRequest + 4, // 10: nebius.compute.v1.FilesystemService.Delete:input_type -> nebius.compute.v1.DeleteFilesystemRequest + 10, // 11: nebius.compute.v1.FilesystemService.ListOperationsByParent:input_type -> nebius.compute.v1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1.FilesystemService.Get:output_type -> nebius.compute.v1.Filesystem + 8, // 13: nebius.compute.v1.FilesystemService.GetByName:output_type -> nebius.compute.v1.Filesystem + 5, // 14: nebius.compute.v1.FilesystemService.List:output_type -> nebius.compute.v1.ListFilesystemsResponse + 11, // 15: nebius.compute.v1.FilesystemService.Create:output_type -> nebius.common.v1.Operation + 11, // 16: nebius.compute.v1.FilesystemService.Update:output_type -> nebius.common.v1.Operation + 11, // 17: nebius.compute.v1.FilesystemService.Delete:output_type -> nebius.common.v1.Operation + 12, // 18: nebius.compute.v1.FilesystemService.ListOperationsByParent:output_type -> nebius.common.v1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_filesystem_service_proto_init() } +func file_nebius_compute_v1_filesystem_service_proto_init() { + if File_nebius_compute_v1_filesystem_service_proto != nil { + return + } + file_nebius_compute_v1_filesystem_proto_init() + file_nebius_compute_v1_operation_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_filesystem_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListFilesystemsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_filesystem_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListFilesystemsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_filesystem_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1_filesystem_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_filesystem_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_filesystem_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_filesystem_service_proto = out.File + file_nebius_compute_v1_filesystem_service_proto_rawDesc = nil + file_nebius_compute_v1_filesystem_service_proto_goTypes = nil + file_nebius_compute_v1_filesystem_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/filesystem_service.sensitive.pb.go b/proto/nebius/compute/v1/filesystem_service.sensitive.pb.go new file mode 100644 index 0000000..85a6b08 --- /dev/null +++ b/proto/nebius/compute/v1/filesystem_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFilesystemsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFilesystemsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFilesystemsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFilesystemsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/filesystem_service_grpc.pb.go b/proto/nebius/compute/v1/filesystem_service_grpc.pb.go new file mode 100644 index 0000000..601645b --- /dev/null +++ b/proto/nebius/compute/v1/filesystem_service_grpc.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/compute/v1/filesystem_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + FilesystemService_Get_FullMethodName = "/nebius.compute.v1.FilesystemService/Get" + FilesystemService_GetByName_FullMethodName = "/nebius.compute.v1.FilesystemService/GetByName" + FilesystemService_List_FullMethodName = "/nebius.compute.v1.FilesystemService/List" + FilesystemService_Create_FullMethodName = "/nebius.compute.v1.FilesystemService/Create" + FilesystemService_Update_FullMethodName = "/nebius.compute.v1.FilesystemService/Update" + FilesystemService_Delete_FullMethodName = "/nebius.compute.v1.FilesystemService/Delete" + FilesystemService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1.FilesystemService/ListOperationsByParent" +) + +// FilesystemServiceClient is the client API for FilesystemService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FilesystemServiceClient interface { + Get(ctx context.Context, in *GetFilesystemRequest, opts ...grpc.CallOption) (*Filesystem, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Filesystem, error) + List(ctx context.Context, in *ListFilesystemsRequest, opts ...grpc.CallOption) (*ListFilesystemsResponse, error) + Create(ctx context.Context, in *CreateFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) + ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type filesystemServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFilesystemServiceClient(cc grpc.ClientConnInterface) FilesystemServiceClient { + return &filesystemServiceClient{cc} +} + +func (c *filesystemServiceClient) Get(ctx context.Context, in *GetFilesystemRequest, opts ...grpc.CallOption) (*Filesystem, error) { + out := new(Filesystem) + err := c.cc.Invoke(ctx, FilesystemService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Filesystem, error) { + out := new(Filesystem) + err := c.cc.Invoke(ctx, FilesystemService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) List(ctx context.Context, in *ListFilesystemsRequest, opts ...grpc.CallOption) (*ListFilesystemsResponse, error) { + out := new(ListFilesystemsResponse) + err := c.cc.Invoke(ctx, FilesystemService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Create(ctx context.Context, in *CreateFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Update(ctx context.Context, in *UpdateFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Delete(ctx context.Context, in *DeleteFilesystemRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + out := new(v1.ListOperationsResponse) + err := c.cc.Invoke(ctx, FilesystemService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServiceServer is the server API for FilesystemService service. +// All implementations should embed UnimplementedFilesystemServiceServer +// for forward compatibility +type FilesystemServiceServer interface { + Get(context.Context, *GetFilesystemRequest) (*Filesystem, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Filesystem, error) + List(context.Context, *ListFilesystemsRequest) (*ListFilesystemsResponse, error) + Create(context.Context, *CreateFilesystemRequest) (*v1.Operation, error) + Update(context.Context, *UpdateFilesystemRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteFilesystemRequest) (*v1.Operation, error) + ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) +} + +// UnimplementedFilesystemServiceServer should be embedded to have forward compatible implementations. +type UnimplementedFilesystemServiceServer struct { +} + +func (UnimplementedFilesystemServiceServer) Get(context.Context, *GetFilesystemRequest) (*Filesystem, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedFilesystemServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Filesystem, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedFilesystemServiceServer) List(context.Context, *ListFilesystemsRequest) (*ListFilesystemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedFilesystemServiceServer) Create(context.Context, *CreateFilesystemRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedFilesystemServiceServer) Update(context.Context, *UpdateFilesystemRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedFilesystemServiceServer) Delete(context.Context, *DeleteFilesystemRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedFilesystemServiceServer) ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeFilesystemServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FilesystemServiceServer will +// result in compilation errors. +type UnsafeFilesystemServiceServer interface { + mustEmbedUnimplementedFilesystemServiceServer() +} + +func RegisterFilesystemServiceServer(s grpc.ServiceRegistrar, srv FilesystemServiceServer) { + s.RegisterService(&FilesystemService_ServiceDesc, srv) +} + +func _FilesystemService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Get(ctx, req.(*GetFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFilesystemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).List(ctx, req.(*ListFilesystemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Create(ctx, req.(*CreateFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Update(ctx, req.(*UpdateFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Delete(ctx, req.(*DeleteFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).ListOperationsByParent(ctx, req.(*ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FilesystemService_ServiceDesc is the grpc.ServiceDesc for FilesystemService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FilesystemService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1.FilesystemService", + HandlerType: (*FilesystemServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _FilesystemService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _FilesystemService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _FilesystemService_List_Handler, + }, + { + MethodName: "Create", + Handler: _FilesystemService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _FilesystemService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _FilesystemService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _FilesystemService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1/filesystem_service.proto", +} diff --git a/proto/nebius/compute/v1/gpu_cluster.pb.go b/proto/nebius/compute/v1/gpu_cluster.pb.go new file mode 100644 index 0000000..86b1986 --- /dev/null +++ b/proto/nebius/compute/v1/gpu_cluster.pb.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/gpu_cluster.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GpuCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *GpuClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *GpuCluster) Reset() { + *x = GpuCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuCluster) ProtoMessage() {} + +func (x *GpuCluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuCluster.ProtoReflect.Descriptor instead. +func (*GpuCluster) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *GpuCluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GpuCluster) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *GpuCluster) GetStatus() *GpuClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +type GpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InfinibandFabric string `protobuf:"bytes,1,opt,name=infiniband_fabric,json=infinibandFabric,proto3" json:"infiniband_fabric,omitempty"` +} + +func (x *GpuClusterSpec) Reset() { + *x = GpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterSpec) ProtoMessage() {} + +func (x *GpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterSpec.ProtoReflect.Descriptor instead. +func (*GpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *GpuClusterSpec) GetInfinibandFabric() string { + if x != nil { + return x.InfinibandFabric + } + return "" +} + +type GpuClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Instances []string `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` + // Indicates whether there is an ongoing operation + Reconciling bool `protobuf:"varint,2,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *GpuClusterStatus) Reset() { + *x = GpuClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterStatus) ProtoMessage() {} + +func (x *GpuClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterStatus.ProtoReflect.Descriptor instead. +func (*GpuClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *GpuClusterStatus) GetInstances() []string { + if x != nil { + return x.Instances + } + return nil +} + +func (x *GpuClusterStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1_gpu_cluster_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_gpu_cluster_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xc0, 0x01, 0x0a, 0x0a, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x35, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x49, 0x0a, 0x0e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, 0x11, 0x69, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x62, + 0x61, 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x10, 0x69, 0x6e, + 0x66, 0x69, 0x6e, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x22, 0x52, + 0x0a, 0x10, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x42, 0x5e, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0f, + 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_gpu_cluster_proto_rawDescOnce sync.Once + file_nebius_compute_v1_gpu_cluster_proto_rawDescData = file_nebius_compute_v1_gpu_cluster_proto_rawDesc +) + +func file_nebius_compute_v1_gpu_cluster_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_gpu_cluster_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_gpu_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_gpu_cluster_proto_rawDescData) + }) + return file_nebius_compute_v1_gpu_cluster_proto_rawDescData +} + +var file_nebius_compute_v1_gpu_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1_gpu_cluster_proto_goTypes = []any{ + (*GpuCluster)(nil), // 0: nebius.compute.v1.GpuCluster + (*GpuClusterSpec)(nil), // 1: nebius.compute.v1.GpuClusterSpec + (*GpuClusterStatus)(nil), // 2: nebius.compute.v1.GpuClusterStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1_gpu_cluster_proto_depIdxs = []int32{ + 3, // 0: nebius.compute.v1.GpuCluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.compute.v1.GpuCluster.spec:type_name -> nebius.compute.v1.GpuClusterSpec + 2, // 2: nebius.compute.v1.GpuCluster.status:type_name -> nebius.compute.v1.GpuClusterStatus + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_gpu_cluster_proto_init() } +func file_nebius_compute_v1_gpu_cluster_proto_init() { + if File_nebius_compute_v1_gpu_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_gpu_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GpuCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_gpu_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_gpu_cluster_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_gpu_cluster_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_gpu_cluster_proto_msgTypes, + }.Build() + File_nebius_compute_v1_gpu_cluster_proto = out.File + file_nebius_compute_v1_gpu_cluster_proto_rawDesc = nil + file_nebius_compute_v1_gpu_cluster_proto_goTypes = nil + file_nebius_compute_v1_gpu_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/gpu_cluster.sensitive.pb.go b/proto/nebius/compute/v1/gpu_cluster.sensitive.pb.go new file mode 100644 index 0000000..5c02526 --- /dev/null +++ b/proto/nebius/compute/v1/gpu_cluster.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GpuCluster) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuCluster) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/gpu_cluster_service.pb.go b/proto/nebius/compute/v1/gpu_cluster_service.pb.go new file mode 100644 index 0000000..94581c3 --- /dev/null +++ b/proto/nebius/compute/v1/gpu_cluster_service.pb.go @@ -0,0 +1,616 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/gpu_cluster_service.proto + +package v1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGpuClusterRequest) Reset() { + *x = GetGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGpuClusterRequest) ProtoMessage() {} + +func (x *GetGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*GetGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetGpuClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListGpuClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListGpuClustersRequest) Reset() { + *x = ListGpuClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGpuClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGpuClustersRequest) ProtoMessage() {} + +func (x *ListGpuClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGpuClustersRequest.ProtoReflect.Descriptor instead. +func (*ListGpuClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListGpuClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListGpuClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGpuClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListGpuClustersRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type CreateGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateGpuClusterRequest) Reset() { + *x = CreateGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGpuClusterRequest) ProtoMessage() {} + +func (x *CreateGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateGpuClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateGpuClusterRequest) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateGpuClusterRequest) Reset() { + *x = UpdateGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGpuClusterRequest) ProtoMessage() {} + +func (x *UpdateGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateGpuClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateGpuClusterRequest) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteGpuClusterRequest) Reset() { + *x = DeleteGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGpuClusterRequest) ProtoMessage() {} + +func (x *DeleteGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteGpuClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListGpuClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*GpuCluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGpuClustersResponse) Reset() { + *x = ListGpuClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGpuClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGpuClustersResponse) ProtoMessage() {} + +func (x *ListGpuClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGpuClustersResponse.ProtoReflect.Descriptor instead. +func (*ListGpuClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListGpuClustersResponse) GetItems() []*GpuCluster { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListGpuClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1_gpu_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_gpu_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, + 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x90, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x35, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x76, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x80, 0x05, 0x0a, 0x11, 0x47, + 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4d, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x5d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x74, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x65, 0x0a, + 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x47, 0x70, 0x75, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_gpu_cluster_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_gpu_cluster_service_proto_rawDescData = file_nebius_compute_v1_gpu_cluster_service_proto_rawDesc +) + +func file_nebius_compute_v1_gpu_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_gpu_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_gpu_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_gpu_cluster_service_proto_rawDescData) + }) + return file_nebius_compute_v1_gpu_cluster_service_proto_rawDescData +} + +var file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1_gpu_cluster_service_proto_goTypes = []any{ + (*GetGpuClusterRequest)(nil), // 0: nebius.compute.v1.GetGpuClusterRequest + (*ListGpuClustersRequest)(nil), // 1: nebius.compute.v1.ListGpuClustersRequest + (*CreateGpuClusterRequest)(nil), // 2: nebius.compute.v1.CreateGpuClusterRequest + (*UpdateGpuClusterRequest)(nil), // 3: nebius.compute.v1.UpdateGpuClusterRequest + (*DeleteGpuClusterRequest)(nil), // 4: nebius.compute.v1.DeleteGpuClusterRequest + (*ListGpuClustersResponse)(nil), // 5: nebius.compute.v1.ListGpuClustersResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*GpuClusterSpec)(nil), // 7: nebius.compute.v1.GpuClusterSpec + (*GpuCluster)(nil), // 8: nebius.compute.v1.GpuCluster + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*ListOperationsByParentRequest)(nil), // 10: nebius.compute.v1.ListOperationsByParentRequest + (*v1.Operation)(nil), // 11: nebius.common.v1.Operation + (*v1.ListOperationsResponse)(nil), // 12: nebius.common.v1.ListOperationsResponse +} +var file_nebius_compute_v1_gpu_cluster_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1.CreateGpuClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1.CreateGpuClusterRequest.spec:type_name -> nebius.compute.v1.GpuClusterSpec + 6, // 2: nebius.compute.v1.UpdateGpuClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1.UpdateGpuClusterRequest.spec:type_name -> nebius.compute.v1.GpuClusterSpec + 8, // 4: nebius.compute.v1.ListGpuClustersResponse.items:type_name -> nebius.compute.v1.GpuCluster + 0, // 5: nebius.compute.v1.GpuClusterService.Get:input_type -> nebius.compute.v1.GetGpuClusterRequest + 9, // 6: nebius.compute.v1.GpuClusterService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1.GpuClusterService.List:input_type -> nebius.compute.v1.ListGpuClustersRequest + 2, // 8: nebius.compute.v1.GpuClusterService.Create:input_type -> nebius.compute.v1.CreateGpuClusterRequest + 3, // 9: nebius.compute.v1.GpuClusterService.Update:input_type -> nebius.compute.v1.UpdateGpuClusterRequest + 4, // 10: nebius.compute.v1.GpuClusterService.Delete:input_type -> nebius.compute.v1.DeleteGpuClusterRequest + 10, // 11: nebius.compute.v1.GpuClusterService.ListOperationsByParent:input_type -> nebius.compute.v1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1.GpuClusterService.Get:output_type -> nebius.compute.v1.GpuCluster + 8, // 13: nebius.compute.v1.GpuClusterService.GetByName:output_type -> nebius.compute.v1.GpuCluster + 5, // 14: nebius.compute.v1.GpuClusterService.List:output_type -> nebius.compute.v1.ListGpuClustersResponse + 11, // 15: nebius.compute.v1.GpuClusterService.Create:output_type -> nebius.common.v1.Operation + 11, // 16: nebius.compute.v1.GpuClusterService.Update:output_type -> nebius.common.v1.Operation + 11, // 17: nebius.compute.v1.GpuClusterService.Delete:output_type -> nebius.common.v1.Operation + 12, // 18: nebius.compute.v1.GpuClusterService.ListOperationsByParent:output_type -> nebius.common.v1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_gpu_cluster_service_proto_init() } +func file_nebius_compute_v1_gpu_cluster_service_proto_init() { + if File_nebius_compute_v1_gpu_cluster_service_proto != nil { + return + } + file_nebius_compute_v1_gpu_cluster_proto_init() + file_nebius_compute_v1_operation_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListGpuClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListGpuClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_gpu_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1_gpu_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_gpu_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_gpu_cluster_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_gpu_cluster_service_proto = out.File + file_nebius_compute_v1_gpu_cluster_service_proto_rawDesc = nil + file_nebius_compute_v1_gpu_cluster_service_proto_goTypes = nil + file_nebius_compute_v1_gpu_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/gpu_cluster_service.sensitive.pb.go b/proto/nebius/compute/v1/gpu_cluster_service.sensitive.pb.go new file mode 100644 index 0000000..02915a8 --- /dev/null +++ b/proto/nebius/compute/v1/gpu_cluster_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGpuClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGpuClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGpuClustersResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGpuClustersResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/gpu_cluster_service_grpc.pb.go b/proto/nebius/compute/v1/gpu_cluster_service_grpc.pb.go new file mode 100644 index 0000000..35745f1 --- /dev/null +++ b/proto/nebius/compute/v1/gpu_cluster_service_grpc.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/compute/v1/gpu_cluster_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GpuClusterService_Get_FullMethodName = "/nebius.compute.v1.GpuClusterService/Get" + GpuClusterService_GetByName_FullMethodName = "/nebius.compute.v1.GpuClusterService/GetByName" + GpuClusterService_List_FullMethodName = "/nebius.compute.v1.GpuClusterService/List" + GpuClusterService_Create_FullMethodName = "/nebius.compute.v1.GpuClusterService/Create" + GpuClusterService_Update_FullMethodName = "/nebius.compute.v1.GpuClusterService/Update" + GpuClusterService_Delete_FullMethodName = "/nebius.compute.v1.GpuClusterService/Delete" + GpuClusterService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1.GpuClusterService/ListOperationsByParent" +) + +// GpuClusterServiceClient is the client API for GpuClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GpuClusterServiceClient interface { + Get(ctx context.Context, in *GetGpuClusterRequest, opts ...grpc.CallOption) (*GpuCluster, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*GpuCluster, error) + List(ctx context.Context, in *ListGpuClustersRequest, opts ...grpc.CallOption) (*ListGpuClustersResponse, error) + Create(ctx context.Context, in *CreateGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type gpuClusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGpuClusterServiceClient(cc grpc.ClientConnInterface) GpuClusterServiceClient { + return &gpuClusterServiceClient{cc} +} + +func (c *gpuClusterServiceClient) Get(ctx context.Context, in *GetGpuClusterRequest, opts ...grpc.CallOption) (*GpuCluster, error) { + out := new(GpuCluster) + err := c.cc.Invoke(ctx, GpuClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*GpuCluster, error) { + out := new(GpuCluster) + err := c.cc.Invoke(ctx, GpuClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) List(ctx context.Context, in *ListGpuClustersRequest, opts ...grpc.CallOption) (*ListGpuClustersResponse, error) { + out := new(ListGpuClustersResponse) + err := c.cc.Invoke(ctx, GpuClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Create(ctx context.Context, in *CreateGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Update(ctx context.Context, in *UpdateGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Delete(ctx context.Context, in *DeleteGpuClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + out := new(v1.ListOperationsResponse) + err := c.cc.Invoke(ctx, GpuClusterService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GpuClusterServiceServer is the server API for GpuClusterService service. +// All implementations should embed UnimplementedGpuClusterServiceServer +// for forward compatibility +type GpuClusterServiceServer interface { + Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error) + GetByName(context.Context, *v1.GetByNameRequest) (*GpuCluster, error) + List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error) + Create(context.Context, *CreateGpuClusterRequest) (*v1.Operation, error) + Update(context.Context, *UpdateGpuClusterRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteGpuClusterRequest) (*v1.Operation, error) + ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) +} + +// UnimplementedGpuClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGpuClusterServiceServer struct { +} + +func (UnimplementedGpuClusterServiceServer) Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedGpuClusterServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*GpuCluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedGpuClusterServiceServer) List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedGpuClusterServiceServer) Create(context.Context, *CreateGpuClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedGpuClusterServiceServer) Update(context.Context, *UpdateGpuClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedGpuClusterServiceServer) Delete(context.Context, *DeleteGpuClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedGpuClusterServiceServer) ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeGpuClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GpuClusterServiceServer will +// result in compilation errors. +type UnsafeGpuClusterServiceServer interface { + mustEmbedUnimplementedGpuClusterServiceServer() +} + +func RegisterGpuClusterServiceServer(s grpc.ServiceRegistrar, srv GpuClusterServiceServer) { + s.RegisterService(&GpuClusterService_ServiceDesc, srv) +} + +func _GpuClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Get(ctx, req.(*GetGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGpuClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).List(ctx, req.(*ListGpuClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Create(ctx, req.(*CreateGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Update(ctx, req.(*UpdateGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Delete(ctx, req.(*DeleteGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).ListOperationsByParent(ctx, req.(*ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GpuClusterService_ServiceDesc is the grpc.ServiceDesc for GpuClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GpuClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1.GpuClusterService", + HandlerType: (*GpuClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _GpuClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _GpuClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _GpuClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _GpuClusterService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _GpuClusterService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _GpuClusterService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _GpuClusterService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1/gpu_cluster_service.proto", +} diff --git a/proto/nebius/compute/v1/image.pb.go b/proto/nebius/compute/v1/image.pb.go new file mode 100644 index 0000000..bf46fd2 --- /dev/null +++ b/proto/nebius/compute/v1/image.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/image.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ImageStatus_State int32 + +const ( + ImageStatus_UNSPECIFIED ImageStatus_State = 0 + ImageStatus_CREATING ImageStatus_State = 1 + ImageStatus_READY ImageStatus_State = 2 + ImageStatus_UPDATING ImageStatus_State = 3 + ImageStatus_DELETING ImageStatus_State = 4 + ImageStatus_ERROR ImageStatus_State = 5 +) + +// Enum value maps for ImageStatus_State. +var ( + ImageStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + ImageStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x ImageStatus_State) Enum() *ImageStatus_State { + p := new(ImageStatus_State) + *p = x + return p +} + +func (x ImageStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ImageStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_image_proto_enumTypes[0].Descriptor() +} + +func (ImageStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_image_proto_enumTypes[0] +} + +func (x ImageStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ImageStatus_State.Descriptor instead. +func (ImageStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_proto_rawDescGZIP(), []int{2, 0} +} + +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ImageSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ImageStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_proto_rawDescGZIP(), []int{0} +} + +func (x *Image) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Image) GetSpec() *ImageSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Image) GetStatus() *ImageStatus { + if x != nil { + return x.Status + } + return nil +} + +type ImageSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description *string `protobuf:"bytes,1,opt,name=description,proto3,oneof" json:"description,omitempty"` + ImageFamily string `protobuf:"bytes,2,opt,name=image_family,json=imageFamily,proto3" json:"image_family,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *ImageSpec) Reset() { + *x = ImageSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageSpec) ProtoMessage() {} + +func (x *ImageSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageSpec.ProtoReflect.Descriptor instead. +func (*ImageSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_proto_rawDescGZIP(), []int{1} +} + +func (x *ImageSpec) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *ImageSpec) GetImageFamily() string { + if x != nil { + return x.ImageFamily + } + return "" +} + +func (x *ImageSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type ImageStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State ImageStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1.ImageStatus_State" json:"state,omitempty"` + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + StorageSizeBytes int64 `protobuf:"varint,3,opt,name=storage_size_bytes,json=storageSizeBytes,proto3" json:"storage_size_bytes,omitempty"` + MinDiskSizeBytes int64 `protobuf:"varint,4,opt,name=min_disk_size_bytes,json=minDiskSizeBytes,proto3" json:"min_disk_size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + Reconciling bool `protobuf:"varint,5,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *ImageStatus) Reset() { + *x = ImageStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageStatus) ProtoMessage() {} + +func (x *ImageStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageStatus.ProtoReflect.Descriptor instead. +func (*ImageStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_proto_rawDescGZIP(), []int{2} +} + +func (x *ImageStatus) GetState() ImageStatus_State { + if x != nil { + return x.State + } + return ImageStatus_UNSPECIFIED +} + +func (x *ImageStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +func (x *ImageStatus) GetStorageSizeBytes() int64 { + if x != nil { + return x.StorageSizeBytes + } + return 0 +} + +func (x *ImageStatus) GetMinDiskSizeBytes() int64 { + if x != nil { + return x.MinDiskSizeBytes + } + return 0 +} + +func (x *ImageStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1_image_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_image_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, + 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x2b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xcf, 0x02, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, + 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, + 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, + 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, + 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x59, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_image_proto_rawDescOnce sync.Once + file_nebius_compute_v1_image_proto_rawDescData = file_nebius_compute_v1_image_proto_rawDesc +) + +func file_nebius_compute_v1_image_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_image_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_image_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_image_proto_rawDescData) + }) + return file_nebius_compute_v1_image_proto_rawDescData +} + +var file_nebius_compute_v1_image_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_compute_v1_image_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1_image_proto_goTypes = []any{ + (ImageStatus_State)(0), // 0: nebius.compute.v1.ImageStatus.State + (*Image)(nil), // 1: nebius.compute.v1.Image + (*ImageSpec)(nil), // 2: nebius.compute.v1.ImageSpec + (*ImageStatus)(nil), // 3: nebius.compute.v1.ImageStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1_image_proto_depIdxs = []int32{ + 4, // 0: nebius.compute.v1.Image.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.compute.v1.Image.spec:type_name -> nebius.compute.v1.ImageSpec + 3, // 2: nebius.compute.v1.Image.status:type_name -> nebius.compute.v1.ImageStatus + 0, // 3: nebius.compute.v1.ImageStatus.state:type_name -> nebius.compute.v1.ImageStatus.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_image_proto_init() } +func file_nebius_compute_v1_image_proto_init() { + if File_nebius_compute_v1_image_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_image_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_image_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ImageSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_image_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ImageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1_image_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_image_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_image_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_image_proto_depIdxs, + EnumInfos: file_nebius_compute_v1_image_proto_enumTypes, + MessageInfos: file_nebius_compute_v1_image_proto_msgTypes, + }.Build() + File_nebius_compute_v1_image_proto = out.File + file_nebius_compute_v1_image_proto_rawDesc = nil + file_nebius_compute_v1_image_proto_goTypes = nil + file_nebius_compute_v1_image_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/image.sensitive.pb.go b/proto/nebius/compute/v1/image.sensitive.pb.go new file mode 100644 index 0000000..a22d9c7 --- /dev/null +++ b/proto/nebius/compute/v1/image.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Image) Sanitize() // is not generated as no sensitive fields found +// func (x *Image) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ImageSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ImageSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ImageStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ImageStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/image_service.pb.go b/proto/nebius/compute/v1/image_service.pb.go new file mode 100644 index 0000000..e622652 --- /dev/null +++ b/proto/nebius/compute/v1/image_service.pb.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/image_service.proto + +package v1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetImageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetImageRequest) Reset() { + *x = GetImageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageRequest) ProtoMessage() {} + +func (x *GetImageRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageRequest.ProtoReflect.Descriptor instead. +func (*GetImageRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetImageRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetImageLatestByFamilyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ImageFamily string `protobuf:"bytes,1,opt,name=image_family,json=imageFamily,proto3" json:"image_family,omitempty"` + ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` // default 'project-{region}public-images' +} + +func (x *GetImageLatestByFamilyRequest) Reset() { + *x = GetImageLatestByFamilyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageLatestByFamilyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageLatestByFamilyRequest) ProtoMessage() {} + +func (x *GetImageLatestByFamilyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageLatestByFamilyRequest.ProtoReflect.Descriptor instead. +func (*GetImageLatestByFamilyRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetImageLatestByFamilyRequest) GetImageFamily() string { + if x != nil { + return x.ImageFamily + } + return "" +} + +func (x *GetImageLatestByFamilyRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +type ListImagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListImagesRequest) Reset() { + *x = ListImagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListImagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListImagesRequest) ProtoMessage() {} + +func (x *ListImagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListImagesRequest.ProtoReflect.Descriptor instead. +func (*ListImagesRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListImagesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListImagesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListImagesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListImagesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListImagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Image `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListImagesResponse) Reset() { + *x = ListImagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListImagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListImagesResponse) ProtoMessage() {} + +func (x *ListImagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_image_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListImagesResponse.ProtoReflect.Descriptor instead. +func (*ListImagesResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_image_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListImagesResponse) GetItems() []*Image { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListImagesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1_image_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_image_service_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x5f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x6d, + 0x69, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x6c, 0x0a, 0x12, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xca, 0x03, 0x0a, 0x0c, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x03, 0x47, 0x65, 0x74, + 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x49, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x30, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x42, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x74, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x60, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x11, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_image_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_image_service_proto_rawDescData = file_nebius_compute_v1_image_service_proto_rawDesc +) + +func file_nebius_compute_v1_image_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_image_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_image_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_image_service_proto_rawDescData) + }) + return file_nebius_compute_v1_image_service_proto_rawDescData +} + +var file_nebius_compute_v1_image_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_compute_v1_image_service_proto_goTypes = []any{ + (*GetImageRequest)(nil), // 0: nebius.compute.v1.GetImageRequest + (*GetImageLatestByFamilyRequest)(nil), // 1: nebius.compute.v1.GetImageLatestByFamilyRequest + (*ListImagesRequest)(nil), // 2: nebius.compute.v1.ListImagesRequest + (*ListImagesResponse)(nil), // 3: nebius.compute.v1.ListImagesResponse + (*Image)(nil), // 4: nebius.compute.v1.Image + (*v1.GetByNameRequest)(nil), // 5: nebius.common.v1.GetByNameRequest + (*ListOperationsByParentRequest)(nil), // 6: nebius.compute.v1.ListOperationsByParentRequest + (*v1.ListOperationsResponse)(nil), // 7: nebius.common.v1.ListOperationsResponse +} +var file_nebius_compute_v1_image_service_proto_depIdxs = []int32{ + 4, // 0: nebius.compute.v1.ListImagesResponse.items:type_name -> nebius.compute.v1.Image + 0, // 1: nebius.compute.v1.ImageService.Get:input_type -> nebius.compute.v1.GetImageRequest + 5, // 2: nebius.compute.v1.ImageService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 3: nebius.compute.v1.ImageService.GetLatestByFamily:input_type -> nebius.compute.v1.GetImageLatestByFamilyRequest + 2, // 4: nebius.compute.v1.ImageService.List:input_type -> nebius.compute.v1.ListImagesRequest + 6, // 5: nebius.compute.v1.ImageService.ListOperationsByParent:input_type -> nebius.compute.v1.ListOperationsByParentRequest + 4, // 6: nebius.compute.v1.ImageService.Get:output_type -> nebius.compute.v1.Image + 4, // 7: nebius.compute.v1.ImageService.GetByName:output_type -> nebius.compute.v1.Image + 4, // 8: nebius.compute.v1.ImageService.GetLatestByFamily:output_type -> nebius.compute.v1.Image + 3, // 9: nebius.compute.v1.ImageService.List:output_type -> nebius.compute.v1.ListImagesResponse + 7, // 10: nebius.compute.v1.ImageService.ListOperationsByParent:output_type -> nebius.common.v1.ListOperationsResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_image_service_proto_init() } +func file_nebius_compute_v1_image_service_proto_init() { + if File_nebius_compute_v1_image_service_proto != nil { + return + } + file_nebius_compute_v1_image_proto_init() + file_nebius_compute_v1_operation_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_image_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetImageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_image_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetImageLatestByFamilyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_image_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListImagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_image_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListImagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_image_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1_image_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_image_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_image_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_image_service_proto = out.File + file_nebius_compute_v1_image_service_proto_rawDesc = nil + file_nebius_compute_v1_image_service_proto_goTypes = nil + file_nebius_compute_v1_image_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/image_service.sensitive.pb.go b/proto/nebius/compute/v1/image_service.sensitive.pb.go new file mode 100644 index 0000000..c971f0d --- /dev/null +++ b/proto/nebius/compute/v1/image_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetImageRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetImageRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetImageLatestByFamilyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetImageLatestByFamilyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListImagesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListImagesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListImagesResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListImagesResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/image_service_grpc.pb.go b/proto/nebius/compute/v1/image_service_grpc.pb.go new file mode 100644 index 0000000..c3d790a --- /dev/null +++ b/proto/nebius/compute/v1/image_service_grpc.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/compute/v1/image_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ImageService_Get_FullMethodName = "/nebius.compute.v1.ImageService/Get" + ImageService_GetByName_FullMethodName = "/nebius.compute.v1.ImageService/GetByName" + ImageService_GetLatestByFamily_FullMethodName = "/nebius.compute.v1.ImageService/GetLatestByFamily" + ImageService_List_FullMethodName = "/nebius.compute.v1.ImageService/List" + ImageService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1.ImageService/ListOperationsByParent" +) + +// ImageServiceClient is the client API for ImageService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ImageServiceClient interface { + Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*Image, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Image, error) + GetLatestByFamily(ctx context.Context, in *GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*Image, error) + List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) + ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type imageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewImageServiceClient(cc grpc.ClientConnInterface) ImageServiceClient { + return &imageServiceClient{cc} +} + +func (c *imageServiceClient) Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) GetLatestByFamily(ctx context.Context, in *GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_GetLatestByFamily_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { + out := new(ListImagesResponse) + err := c.cc.Invoke(ctx, ImageService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + out := new(v1.ListOperationsResponse) + err := c.cc.Invoke(ctx, ImageService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ImageServiceServer is the server API for ImageService service. +// All implementations should embed UnimplementedImageServiceServer +// for forward compatibility +type ImageServiceServer interface { + Get(context.Context, *GetImageRequest) (*Image, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Image, error) + GetLatestByFamily(context.Context, *GetImageLatestByFamilyRequest) (*Image, error) + List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) + ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) +} + +// UnimplementedImageServiceServer should be embedded to have forward compatible implementations. +type UnimplementedImageServiceServer struct { +} + +func (UnimplementedImageServiceServer) Get(context.Context, *GetImageRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedImageServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedImageServiceServer) GetLatestByFamily(context.Context, *GetImageLatestByFamilyRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestByFamily not implemented") +} +func (UnimplementedImageServiceServer) List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedImageServiceServer) ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeImageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ImageServiceServer will +// result in compilation errors. +type UnsafeImageServiceServer interface { + mustEmbedUnimplementedImageServiceServer() +} + +func RegisterImageServiceServer(s grpc.ServiceRegistrar, srv ImageServiceServer) { + s.RegisterService(&ImageService_ServiceDesc, srv) +} + +func _ImageService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).Get(ctx, req.(*GetImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_GetLatestByFamily_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImageLatestByFamilyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).GetLatestByFamily(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_GetLatestByFamily_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).GetLatestByFamily(ctx, req.(*GetImageLatestByFamilyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListImagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).List(ctx, req.(*ListImagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).ListOperationsByParent(ctx, req.(*ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ImageService_ServiceDesc is the grpc.ServiceDesc for ImageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ImageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1.ImageService", + HandlerType: (*ImageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ImageService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ImageService_GetByName_Handler, + }, + { + MethodName: "GetLatestByFamily", + Handler: _ImageService_GetLatestByFamily_Handler, + }, + { + MethodName: "List", + Handler: _ImageService_List_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _ImageService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1/image_service.proto", +} diff --git a/proto/nebius/compute/v1/instance.pb.go b/proto/nebius/compute/v1/instance.pb.go new file mode 100644 index 0000000..63d65ed --- /dev/null +++ b/proto/nebius/compute/v1/instance.pb.go @@ -0,0 +1,1227 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/instance.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InstanceRecoveryPolicy int32 + +const ( + InstanceRecoveryPolicy_RECOVER InstanceRecoveryPolicy = 0 + InstanceRecoveryPolicy_FAIL InstanceRecoveryPolicy = 1 +) + +// Enum value maps for InstanceRecoveryPolicy. +var ( + InstanceRecoveryPolicy_name = map[int32]string{ + 0: "RECOVER", + 1: "FAIL", + } + InstanceRecoveryPolicy_value = map[string]int32{ + "RECOVER": 0, + "FAIL": 1, + } +) + +func (x InstanceRecoveryPolicy) Enum() *InstanceRecoveryPolicy { + p := new(InstanceRecoveryPolicy) + *p = x + return p +} + +func (x InstanceRecoveryPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InstanceRecoveryPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_instance_proto_enumTypes[0].Descriptor() +} + +func (InstanceRecoveryPolicy) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_instance_proto_enumTypes[0] +} + +func (x InstanceRecoveryPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InstanceRecoveryPolicy.Descriptor instead. +func (InstanceRecoveryPolicy) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{0} +} + +type AttachedDiskSpec_AttachMode int32 + +const ( + AttachedDiskSpec_UNSPECIFIED AttachedDiskSpec_AttachMode = 0 + AttachedDiskSpec_READ_ONLY AttachedDiskSpec_AttachMode = 1 + AttachedDiskSpec_READ_WRITE AttachedDiskSpec_AttachMode = 2 +) + +// Enum value maps for AttachedDiskSpec_AttachMode. +var ( + AttachedDiskSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedDiskSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedDiskSpec_AttachMode) Enum() *AttachedDiskSpec_AttachMode { + p := new(AttachedDiskSpec_AttachMode) + *p = x + return p +} + +func (x AttachedDiskSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedDiskSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_instance_proto_enumTypes[1].Descriptor() +} + +func (AttachedDiskSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_instance_proto_enumTypes[1] +} + +func (x AttachedDiskSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedDiskSpec_AttachMode.Descriptor instead. +func (AttachedDiskSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{4, 0} +} + +type AttachedFilesystemSpec_AttachMode int32 + +const ( + AttachedFilesystemSpec_UNSPECIFIED AttachedFilesystemSpec_AttachMode = 0 + AttachedFilesystemSpec_READ_ONLY AttachedFilesystemSpec_AttachMode = 1 + AttachedFilesystemSpec_READ_WRITE AttachedFilesystemSpec_AttachMode = 2 +) + +// Enum value maps for AttachedFilesystemSpec_AttachMode. +var ( + AttachedFilesystemSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedFilesystemSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedFilesystemSpec_AttachMode) Enum() *AttachedFilesystemSpec_AttachMode { + p := new(AttachedFilesystemSpec_AttachMode) + *p = x + return p +} + +func (x AttachedFilesystemSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedFilesystemSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_instance_proto_enumTypes[2].Descriptor() +} + +func (AttachedFilesystemSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_instance_proto_enumTypes[2] +} + +func (x AttachedFilesystemSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedFilesystemSpec_AttachMode.Descriptor instead. +func (AttachedFilesystemSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{7, 0} +} + +type InstanceStatus_InstanceState int32 + +const ( + InstanceStatus_UNSPECIFIED InstanceStatus_InstanceState = 0 + InstanceStatus_CREATING InstanceStatus_InstanceState = 1 + InstanceStatus_UPDATING InstanceStatus_InstanceState = 2 + InstanceStatus_STARTING InstanceStatus_InstanceState = 3 + InstanceStatus_RUNNING InstanceStatus_InstanceState = 4 + InstanceStatus_STOPPING InstanceStatus_InstanceState = 5 + InstanceStatus_STOPPED InstanceStatus_InstanceState = 6 + InstanceStatus_DELETING InstanceStatus_InstanceState = 7 + InstanceStatus_ERROR InstanceStatus_InstanceState = 8 +) + +// Enum value maps for InstanceStatus_InstanceState. +var ( + InstanceStatus_InstanceState_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "UPDATING", + 3: "STARTING", + 4: "RUNNING", + 5: "STOPPING", + 6: "STOPPED", + 7: "DELETING", + 8: "ERROR", + } + InstanceStatus_InstanceState_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "UPDATING": 2, + "STARTING": 3, + "RUNNING": 4, + "STOPPING": 5, + "STOPPED": 6, + "DELETING": 7, + "ERROR": 8, + } +) + +func (x InstanceStatus_InstanceState) Enum() *InstanceStatus_InstanceState { + p := new(InstanceStatus_InstanceState) + *p = x + return p +} + +func (x InstanceStatus_InstanceState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InstanceStatus_InstanceState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1_instance_proto_enumTypes[3].Descriptor() +} + +func (InstanceStatus_InstanceState) Type() protoreflect.EnumType { + return &file_nebius_compute_v1_instance_proto_enumTypes[3] +} + +func (x InstanceStatus_InstanceState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InstanceStatus_InstanceState.Descriptor instead. +func (InstanceStatus_InstanceState) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{8, 0} +} + +type Instance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *InstanceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Instance) Reset() { + *x = Instance{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Instance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instance) ProtoMessage() {} + +func (x *Instance) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Instance.ProtoReflect.Descriptor instead. +func (*Instance) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{0} +} + +func (x *Instance) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Instance) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Instance) GetStatus() *InstanceStatus { + if x != nil { + return x.Status + } + return nil +} + +type InstanceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceAccountId string `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` + Resources *ResourcesSpec `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"` + GpuCluster *InstanceGpuClusterSpec `protobuf:"bytes,3,opt,name=gpu_cluster,json=gpuCluster,proto3" json:"gpu_cluster,omitempty"` + NetworkInterfaces []*NetworkInterfaceSpec `protobuf:"bytes,4,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + BootDisk *AttachedDiskSpec `protobuf:"bytes,5,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + SecondaryDisks []*AttachedDiskSpec `protobuf:"bytes,6,rep,name=secondary_disks,json=secondaryDisks,proto3" json:"secondary_disks,omitempty"` + Filesystems []*AttachedFilesystemSpec `protobuf:"bytes,7,rep,name=filesystems,proto3" json:"filesystems,omitempty"` + CloudInitUserData string `protobuf:"bytes,8,opt,name=cloud_init_user_data,json=cloudInitUserData,proto3" json:"cloud_init_user_data,omitempty"` + Stopped bool `protobuf:"varint,13,opt,name=stopped,proto3" json:"stopped,omitempty"` + RecoveryPolicy InstanceRecoveryPolicy `protobuf:"varint,15,opt,name=recovery_policy,json=recoveryPolicy,proto3,enum=nebius.compute.v1.InstanceRecoveryPolicy" json:"recovery_policy,omitempty"` +} + +func (x *InstanceSpec) Reset() { + *x = InstanceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceSpec) ProtoMessage() {} + +func (x *InstanceSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceSpec.ProtoReflect.Descriptor instead. +func (*InstanceSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{1} +} + +func (x *InstanceSpec) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +func (x *InstanceSpec) GetResources() *ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (x *InstanceSpec) GetGpuCluster() *InstanceGpuClusterSpec { + if x != nil { + return x.GpuCluster + } + return nil +} + +func (x *InstanceSpec) GetNetworkInterfaces() []*NetworkInterfaceSpec { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +func (x *InstanceSpec) GetBootDisk() *AttachedDiskSpec { + if x != nil { + return x.BootDisk + } + return nil +} + +func (x *InstanceSpec) GetSecondaryDisks() []*AttachedDiskSpec { + if x != nil { + return x.SecondaryDisks + } + return nil +} + +func (x *InstanceSpec) GetFilesystems() []*AttachedFilesystemSpec { + if x != nil { + return x.Filesystems + } + return nil +} + +func (x *InstanceSpec) GetCloudInitUserData() string { + if x != nil { + return x.CloudInitUserData + } + return "" +} + +func (x *InstanceSpec) GetStopped() bool { + if x != nil { + return x.Stopped + } + return false +} + +func (x *InstanceSpec) GetRecoveryPolicy() InstanceRecoveryPolicy { + if x != nil { + return x.RecoveryPolicy + } + return InstanceRecoveryPolicy_RECOVER +} + +type ResourcesSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + // Types that are assignable to Size: + // + // *ResourcesSpec_Preset + Size isResourcesSpec_Size `protobuf_oneof:"size"` +} + +func (x *ResourcesSpec) Reset() { + *x = ResourcesSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesSpec) ProtoMessage() {} + +func (x *ResourcesSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesSpec.ProtoReflect.Descriptor instead. +func (*ResourcesSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{2} +} + +func (x *ResourcesSpec) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (m *ResourcesSpec) GetSize() isResourcesSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *ResourcesSpec) GetPreset() string { + if x, ok := x.GetSize().(*ResourcesSpec_Preset); ok { + return x.Preset + } + return "" +} + +type isResourcesSpec_Size interface { + isResourcesSpec_Size() +} + +type ResourcesSpec_Preset struct { + Preset string `protobuf:"bytes,2,opt,name=preset,proto3,oneof"` +} + +func (*ResourcesSpec_Preset) isResourcesSpec_Size() {} + +type InstanceGpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *InstanceGpuClusterSpec) Reset() { + *x = InstanceGpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceGpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceGpuClusterSpec) ProtoMessage() {} + +func (x *InstanceGpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceGpuClusterSpec.ProtoReflect.Descriptor instead. +func (*InstanceGpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{3} +} + +func (x *InstanceGpuClusterSpec) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type AttachedDiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttachMode AttachedDiskSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.compute.v1.AttachedDiskSpec_AttachMode" json:"attach_mode,omitempty"` + // Types that are assignable to Type: + // + // *AttachedDiskSpec_ExistingDisk + Type isAttachedDiskSpec_Type `protobuf_oneof:"type"` + // Specifies the user-defined identifier, allowing to use '/dev/disk/by-id/virtio-{device_id}' as a device path in mount command. + DeviceId string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` +} + +func (x *AttachedDiskSpec) Reset() { + *x = AttachedDiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedDiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedDiskSpec) ProtoMessage() {} + +func (x *AttachedDiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedDiskSpec.ProtoReflect.Descriptor instead. +func (*AttachedDiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{4} +} + +func (x *AttachedDiskSpec) GetAttachMode() AttachedDiskSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedDiskSpec_UNSPECIFIED +} + +func (m *AttachedDiskSpec) GetType() isAttachedDiskSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *AttachedDiskSpec) GetExistingDisk() *ExistingDisk { + if x, ok := x.GetType().(*AttachedDiskSpec_ExistingDisk); ok { + return x.ExistingDisk + } + return nil +} + +func (x *AttachedDiskSpec) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +type isAttachedDiskSpec_Type interface { + isAttachedDiskSpec_Type() +} + +type AttachedDiskSpec_ExistingDisk struct { + ExistingDisk *ExistingDisk `protobuf:"bytes,2,opt,name=existing_disk,json=existingDisk,proto3,oneof"` +} + +func (*AttachedDiskSpec_ExistingDisk) isAttachedDiskSpec_Type() {} + +type ExistingDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingDisk) Reset() { + *x = ExistingDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingDisk) ProtoMessage() {} + +func (x *ExistingDisk) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingDisk.ProtoReflect.Descriptor instead. +func (*ExistingDisk) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{5} +} + +func (x *ExistingDisk) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ExistingFilesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingFilesystem) Reset() { + *x = ExistingFilesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingFilesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingFilesystem) ProtoMessage() {} + +func (x *ExistingFilesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingFilesystem.ProtoReflect.Descriptor instead. +func (*ExistingFilesystem) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{6} +} + +func (x *ExistingFilesystem) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type AttachedFilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttachMode AttachedFilesystemSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.compute.v1.AttachedFilesystemSpec_AttachMode" json:"attach_mode,omitempty"` + // Specifies the user-defined identifier, allowing to use it as a device in mount command. + MountTag string `protobuf:"bytes,2,opt,name=mount_tag,json=mountTag,proto3" json:"mount_tag,omitempty"` + // Types that are assignable to Type: + // + // *AttachedFilesystemSpec_ExistingFilesystem + Type isAttachedFilesystemSpec_Type `protobuf_oneof:"type"` +} + +func (x *AttachedFilesystemSpec) Reset() { + *x = AttachedFilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedFilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedFilesystemSpec) ProtoMessage() {} + +func (x *AttachedFilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedFilesystemSpec.ProtoReflect.Descriptor instead. +func (*AttachedFilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{7} +} + +func (x *AttachedFilesystemSpec) GetAttachMode() AttachedFilesystemSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedFilesystemSpec_UNSPECIFIED +} + +func (x *AttachedFilesystemSpec) GetMountTag() string { + if x != nil { + return x.MountTag + } + return "" +} + +func (m *AttachedFilesystemSpec) GetType() isAttachedFilesystemSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *AttachedFilesystemSpec) GetExistingFilesystem() *ExistingFilesystem { + if x, ok := x.GetType().(*AttachedFilesystemSpec_ExistingFilesystem); ok { + return x.ExistingFilesystem + } + return nil +} + +type isAttachedFilesystemSpec_Type interface { + isAttachedFilesystemSpec_Type() +} + +type AttachedFilesystemSpec_ExistingFilesystem struct { + ExistingFilesystem *ExistingFilesystem `protobuf:"bytes,3,opt,name=existing_filesystem,json=existingFilesystem,proto3,oneof"` +} + +func (*AttachedFilesystemSpec_ExistingFilesystem) isAttachedFilesystemSpec_Type() {} + +type InstanceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State InstanceStatus_InstanceState `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1.InstanceStatus_InstanceState" json:"state,omitempty"` + NetworkInterfaces []*NetworkInterfaceStatus `protobuf:"bytes,2,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + // Indicates whether there is an ongoing operation + Reconciling bool `protobuf:"varint,5,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *InstanceStatus) Reset() { + *x = InstanceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceStatus) ProtoMessage() {} + +func (x *InstanceStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceStatus.ProtoReflect.Descriptor instead. +func (*InstanceStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_proto_rawDescGZIP(), []int{8} +} + +func (x *InstanceStatus) GetState() InstanceStatus_InstanceState { + if x != nil { + return x.State + } + return InstanceStatus_UNSPECIFIED +} + +func (x *InstanceStatus) GetNetworkInterfaces() []*NetworkInterfaceStatus { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +func (x *InstanceStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1_instance_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_instance_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xf7, 0x05, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0a, 0x67, 0x70, + 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x0f, 0xba, + 0x48, 0x08, 0xc8, 0x01, 0x01, 0x92, 0x01, 0x02, 0x10, 0x08, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x11, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x46, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, + 0x64, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x56, 0x0a, 0x0f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, + 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x10, + 0x08, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x44, 0x69, 0x73, 0x6b, + 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, + 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x0c, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x10, 0x08, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x14, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xba, 0x48, 0x06, 0x72, + 0x04, 0x18, 0x80, 0x80, 0x02, 0xc0, 0x4a, 0x01, 0x52, 0x11, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x49, + 0x6e, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, + 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, + 0x4d, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x06, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x28, + 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa6, 0x02, 0x0a, 0x10, 0x41, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x57, 0x0a, + 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, + 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, 0x48, 0x00, + 0x52, 0x0c, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x24, + 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x14, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, + 0x10, 0x02, 0x42, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, + 0x01, 0x22, 0x26, 0x0a, 0x0c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, + 0x6b, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, + 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc3, 0x02, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x5d, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, + 0x65, 0x63, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x23, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x61, 0x67, 0x12, 0x58, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, + 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x42, 0x0d, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xe1, 0x02, + 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x45, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x11, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x69, 0x6e, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0c, 0x0a, + 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, + 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, + 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x08, 0x2a, 0x2f, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, + 0x10, 0x01, 0x42, 0x5c, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_instance_proto_rawDescOnce sync.Once + file_nebius_compute_v1_instance_proto_rawDescData = file_nebius_compute_v1_instance_proto_rawDesc +) + +func file_nebius_compute_v1_instance_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_instance_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_instance_proto_rawDescData) + }) + return file_nebius_compute_v1_instance_proto_rawDescData +} + +var file_nebius_compute_v1_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_nebius_compute_v1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_compute_v1_instance_proto_goTypes = []any{ + (InstanceRecoveryPolicy)(0), // 0: nebius.compute.v1.InstanceRecoveryPolicy + (AttachedDiskSpec_AttachMode)(0), // 1: nebius.compute.v1.AttachedDiskSpec.AttachMode + (AttachedFilesystemSpec_AttachMode)(0), // 2: nebius.compute.v1.AttachedFilesystemSpec.AttachMode + (InstanceStatus_InstanceState)(0), // 3: nebius.compute.v1.InstanceStatus.InstanceState + (*Instance)(nil), // 4: nebius.compute.v1.Instance + (*InstanceSpec)(nil), // 5: nebius.compute.v1.InstanceSpec + (*ResourcesSpec)(nil), // 6: nebius.compute.v1.ResourcesSpec + (*InstanceGpuClusterSpec)(nil), // 7: nebius.compute.v1.InstanceGpuClusterSpec + (*AttachedDiskSpec)(nil), // 8: nebius.compute.v1.AttachedDiskSpec + (*ExistingDisk)(nil), // 9: nebius.compute.v1.ExistingDisk + (*ExistingFilesystem)(nil), // 10: nebius.compute.v1.ExistingFilesystem + (*AttachedFilesystemSpec)(nil), // 11: nebius.compute.v1.AttachedFilesystemSpec + (*InstanceStatus)(nil), // 12: nebius.compute.v1.InstanceStatus + (*v1.ResourceMetadata)(nil), // 13: nebius.common.v1.ResourceMetadata + (*NetworkInterfaceSpec)(nil), // 14: nebius.compute.v1.NetworkInterfaceSpec + (*NetworkInterfaceStatus)(nil), // 15: nebius.compute.v1.NetworkInterfaceStatus +} +var file_nebius_compute_v1_instance_proto_depIdxs = []int32{ + 13, // 0: nebius.compute.v1.Instance.metadata:type_name -> nebius.common.v1.ResourceMetadata + 5, // 1: nebius.compute.v1.Instance.spec:type_name -> nebius.compute.v1.InstanceSpec + 12, // 2: nebius.compute.v1.Instance.status:type_name -> nebius.compute.v1.InstanceStatus + 6, // 3: nebius.compute.v1.InstanceSpec.resources:type_name -> nebius.compute.v1.ResourcesSpec + 7, // 4: nebius.compute.v1.InstanceSpec.gpu_cluster:type_name -> nebius.compute.v1.InstanceGpuClusterSpec + 14, // 5: nebius.compute.v1.InstanceSpec.network_interfaces:type_name -> nebius.compute.v1.NetworkInterfaceSpec + 8, // 6: nebius.compute.v1.InstanceSpec.boot_disk:type_name -> nebius.compute.v1.AttachedDiskSpec + 8, // 7: nebius.compute.v1.InstanceSpec.secondary_disks:type_name -> nebius.compute.v1.AttachedDiskSpec + 11, // 8: nebius.compute.v1.InstanceSpec.filesystems:type_name -> nebius.compute.v1.AttachedFilesystemSpec + 0, // 9: nebius.compute.v1.InstanceSpec.recovery_policy:type_name -> nebius.compute.v1.InstanceRecoveryPolicy + 1, // 10: nebius.compute.v1.AttachedDiskSpec.attach_mode:type_name -> nebius.compute.v1.AttachedDiskSpec.AttachMode + 9, // 11: nebius.compute.v1.AttachedDiskSpec.existing_disk:type_name -> nebius.compute.v1.ExistingDisk + 2, // 12: nebius.compute.v1.AttachedFilesystemSpec.attach_mode:type_name -> nebius.compute.v1.AttachedFilesystemSpec.AttachMode + 10, // 13: nebius.compute.v1.AttachedFilesystemSpec.existing_filesystem:type_name -> nebius.compute.v1.ExistingFilesystem + 3, // 14: nebius.compute.v1.InstanceStatus.state:type_name -> nebius.compute.v1.InstanceStatus.InstanceState + 15, // 15: nebius.compute.v1.InstanceStatus.network_interfaces:type_name -> nebius.compute.v1.NetworkInterfaceStatus + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_instance_proto_init() } +func file_nebius_compute_v1_instance_proto_init() { + if File_nebius_compute_v1_instance_proto != nil { + return + } + file_nebius_compute_v1_network_interface_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Instance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*InstanceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ResourcesSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*InstanceGpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*AttachedDiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ExistingDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ExistingFilesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*AttachedFilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*InstanceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1_instance_proto_msgTypes[2].OneofWrappers = []any{ + (*ResourcesSpec_Preset)(nil), + } + file_nebius_compute_v1_instance_proto_msgTypes[4].OneofWrappers = []any{ + (*AttachedDiskSpec_ExistingDisk)(nil), + } + file_nebius_compute_v1_instance_proto_msgTypes[7].OneofWrappers = []any{ + (*AttachedFilesystemSpec_ExistingFilesystem)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_instance_proto_rawDesc, + NumEnums: 4, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_instance_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_instance_proto_depIdxs, + EnumInfos: file_nebius_compute_v1_instance_proto_enumTypes, + MessageInfos: file_nebius_compute_v1_instance_proto_msgTypes, + }.Build() + File_nebius_compute_v1_instance_proto = out.File + file_nebius_compute_v1_instance_proto_rawDesc = nil + file_nebius_compute_v1_instance_proto_goTypes = nil + file_nebius_compute_v1_instance_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/instance.sensitive.pb.go b/proto/nebius/compute/v1/instance.sensitive.pb.go new file mode 100644 index 0000000..fc8e819 --- /dev/null +++ b/proto/nebius/compute/v1/instance.sensitive.pb.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Instance] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Instance) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Instance]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Instance +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Instance], use the following code: +// +// var original *Instance +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Instance) +func (x *Instance) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Instance) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInstance)(c)) +} + +// wrapperInstance is used to return [Instance] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInstance Instance + +func (w *wrapperInstance) String() string { + return (*Instance)(w).String() +} + +func (*wrapperInstance) ProtoMessage() {} + +func (w *wrapperInstance) ProtoReflect() protoreflect.Message { + return (*Instance)(w).ProtoReflect() +} + +// Sanitize mutates [InstanceSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *InstanceSpec) Sanitize() { + if x == nil { + return + } + x.CloudInitUserData = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [InstanceSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *InstanceSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [InstanceSpec], use the following code: +// +// var original *InstanceSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*InstanceSpec) +func (x *InstanceSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*InstanceSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInstanceSpec)(c)) +} + +// wrapperInstanceSpec is used to return [InstanceSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInstanceSpec InstanceSpec + +func (w *wrapperInstanceSpec) String() string { + return (*InstanceSpec)(w).String() +} + +func (*wrapperInstanceSpec) ProtoMessage() {} + +func (w *wrapperInstanceSpec) ProtoReflect() protoreflect.Message { + return (*InstanceSpec)(w).ProtoReflect() +} + +// func (x *ResourcesSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourcesSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InstanceGpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *InstanceGpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedDiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedDiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingDisk) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingDisk) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingFilesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingFilesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedFilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedFilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InstanceStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *InstanceStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/instance_service.pb.go b/proto/nebius/compute/v1/instance_service.pb.go new file mode 100644 index 0000000..c1e14a9 --- /dev/null +++ b/proto/nebius/compute/v1/instance_service.pb.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/instance_service.proto + +package v1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetInstanceRequest) Reset() { + *x = GetInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstanceRequest) ProtoMessage() {} + +func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead. +func (*GetInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListInstancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListInstancesRequest) Reset() { + *x = ListInstancesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesRequest) ProtoMessage() {} + +func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesRequest.ProtoReflect.Descriptor instead. +func (*ListInstancesRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListInstancesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListInstancesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListInstancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type CreateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateInstanceRequest) Reset() { + *x = CreateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInstanceRequest) ProtoMessage() {} + +func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead. +func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateInstanceRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateInstanceRequest) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateInstanceRequest) Reset() { + *x = UpdateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInstanceRequest) ProtoMessage() {} + +func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInstanceRequest.ProtoReflect.Descriptor instead. +func (*UpdateInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateInstanceRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateInstanceRequest) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteInstanceRequest) Reset() { + *x = DeleteInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInstanceRequest) ProtoMessage() {} + +func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInstanceRequest.ProtoReflect.Descriptor instead. +func (*DeleteInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListInstancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Instance `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListInstancesResponse) Reset() { + *x = ListInstancesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesResponse) ProtoMessage() {} + +func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesResponse.ProtoReflect.Descriptor instead. +func (*ListInstancesResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListInstancesResponse) GetItems() []*Instance { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListInstancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type StartInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *StartInstanceRequest) Reset() { + *x = StartInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartInstanceRequest) ProtoMessage() {} + +func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartInstanceRequest.ProtoReflect.Descriptor instead. +func (*StartInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{6} +} + +func (x *StartInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type StopInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *StopInstanceRequest) Reset() { + *x = StopInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopInstanceRequest) ProtoMessage() {} + +func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_instance_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopInstanceRequest.ProtoReflect.Descriptor instead. +func (*StopInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_instance_service_proto_rawDescGZIP(), []int{7} +} + +func (x *StopInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_compute_v1_instance_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_instance_service_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6f, 0x0a, + 0x14, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, + 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8c, 0x01, + 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x27, 0x0a, 0x15, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x26, 0x0a, 0x14, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x25, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0x8a, 0x06, 0x0a, 0x0f, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x28, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4f, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x27, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x6f, 0x70, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x74, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x63, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_instance_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_instance_service_proto_rawDescData = file_nebius_compute_v1_instance_service_proto_rawDesc +) + +func file_nebius_compute_v1_instance_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_instance_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_instance_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_instance_service_proto_rawDescData) + }) + return file_nebius_compute_v1_instance_service_proto_rawDescData +} + +var file_nebius_compute_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_nebius_compute_v1_instance_service_proto_goTypes = []any{ + (*GetInstanceRequest)(nil), // 0: nebius.compute.v1.GetInstanceRequest + (*ListInstancesRequest)(nil), // 1: nebius.compute.v1.ListInstancesRequest + (*CreateInstanceRequest)(nil), // 2: nebius.compute.v1.CreateInstanceRequest + (*UpdateInstanceRequest)(nil), // 3: nebius.compute.v1.UpdateInstanceRequest + (*DeleteInstanceRequest)(nil), // 4: nebius.compute.v1.DeleteInstanceRequest + (*ListInstancesResponse)(nil), // 5: nebius.compute.v1.ListInstancesResponse + (*StartInstanceRequest)(nil), // 6: nebius.compute.v1.StartInstanceRequest + (*StopInstanceRequest)(nil), // 7: nebius.compute.v1.StopInstanceRequest + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*InstanceSpec)(nil), // 9: nebius.compute.v1.InstanceSpec + (*Instance)(nil), // 10: nebius.compute.v1.Instance + (*v1.GetByNameRequest)(nil), // 11: nebius.common.v1.GetByNameRequest + (*ListOperationsByParentRequest)(nil), // 12: nebius.compute.v1.ListOperationsByParentRequest + (*v1.Operation)(nil), // 13: nebius.common.v1.Operation + (*v1.ListOperationsResponse)(nil), // 14: nebius.common.v1.ListOperationsResponse +} +var file_nebius_compute_v1_instance_service_proto_depIdxs = []int32{ + 8, // 0: nebius.compute.v1.CreateInstanceRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 1: nebius.compute.v1.CreateInstanceRequest.spec:type_name -> nebius.compute.v1.InstanceSpec + 8, // 2: nebius.compute.v1.UpdateInstanceRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 3: nebius.compute.v1.UpdateInstanceRequest.spec:type_name -> nebius.compute.v1.InstanceSpec + 10, // 4: nebius.compute.v1.ListInstancesResponse.items:type_name -> nebius.compute.v1.Instance + 0, // 5: nebius.compute.v1.InstanceService.Get:input_type -> nebius.compute.v1.GetInstanceRequest + 11, // 6: nebius.compute.v1.InstanceService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1.InstanceService.List:input_type -> nebius.compute.v1.ListInstancesRequest + 2, // 8: nebius.compute.v1.InstanceService.Create:input_type -> nebius.compute.v1.CreateInstanceRequest + 3, // 9: nebius.compute.v1.InstanceService.Update:input_type -> nebius.compute.v1.UpdateInstanceRequest + 4, // 10: nebius.compute.v1.InstanceService.Delete:input_type -> nebius.compute.v1.DeleteInstanceRequest + 6, // 11: nebius.compute.v1.InstanceService.Start:input_type -> nebius.compute.v1.StartInstanceRequest + 7, // 12: nebius.compute.v1.InstanceService.Stop:input_type -> nebius.compute.v1.StopInstanceRequest + 12, // 13: nebius.compute.v1.InstanceService.ListOperationsByParent:input_type -> nebius.compute.v1.ListOperationsByParentRequest + 10, // 14: nebius.compute.v1.InstanceService.Get:output_type -> nebius.compute.v1.Instance + 10, // 15: nebius.compute.v1.InstanceService.GetByName:output_type -> nebius.compute.v1.Instance + 5, // 16: nebius.compute.v1.InstanceService.List:output_type -> nebius.compute.v1.ListInstancesResponse + 13, // 17: nebius.compute.v1.InstanceService.Create:output_type -> nebius.common.v1.Operation + 13, // 18: nebius.compute.v1.InstanceService.Update:output_type -> nebius.common.v1.Operation + 13, // 19: nebius.compute.v1.InstanceService.Delete:output_type -> nebius.common.v1.Operation + 13, // 20: nebius.compute.v1.InstanceService.Start:output_type -> nebius.common.v1.Operation + 13, // 21: nebius.compute.v1.InstanceService.Stop:output_type -> nebius.common.v1.Operation + 14, // 22: nebius.compute.v1.InstanceService.ListOperationsByParent:output_type -> nebius.common.v1.ListOperationsResponse + 14, // [14:23] is the sub-list for method output_type + 5, // [5:14] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_instance_service_proto_init() } +func file_nebius_compute_v1_instance_service_proto_init() { + if File_nebius_compute_v1_instance_service_proto != nil { + return + } + file_nebius_compute_v1_instance_proto_init() + file_nebius_compute_v1_operation_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_instance_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListInstancesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListInstancesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*StartInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_instance_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*StopInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_instance_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1_instance_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_instance_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_instance_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_instance_service_proto = out.File + file_nebius_compute_v1_instance_service_proto_rawDesc = nil + file_nebius_compute_v1_instance_service_proto_goTypes = nil + file_nebius_compute_v1_instance_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/instance_service.sensitive.pb.go b/proto/nebius/compute/v1/instance_service.sensitive.pb.go new file mode 100644 index 0000000..816aa64 --- /dev/null +++ b/proto/nebius/compute/v1/instance_service.sensitive.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListInstancesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListInstancesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [CreateInstanceRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateInstanceRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateInstanceRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateInstanceRequest], use the following code: +// +// var original *CreateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateInstanceRequest) +func (x *CreateInstanceRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateInstanceRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateInstanceRequest)(c)) +} + +// wrapperCreateInstanceRequest is used to return [CreateInstanceRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateInstanceRequest CreateInstanceRequest + +func (w *wrapperCreateInstanceRequest) String() string { + return (*CreateInstanceRequest)(w).String() +} + +func (*wrapperCreateInstanceRequest) ProtoMessage() {} + +func (w *wrapperCreateInstanceRequest) ProtoReflect() protoreflect.Message { + return (*CreateInstanceRequest)(w).ProtoReflect() +} + +// Sanitize mutates [UpdateInstanceRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateInstanceRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateInstanceRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateInstanceRequest], use the following code: +// +// var original *UpdateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateInstanceRequest) +func (x *UpdateInstanceRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateInstanceRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateInstanceRequest)(c)) +} + +// wrapperUpdateInstanceRequest is used to return [UpdateInstanceRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateInstanceRequest UpdateInstanceRequest + +func (w *wrapperUpdateInstanceRequest) String() string { + return (*UpdateInstanceRequest)(w).String() +} + +func (*wrapperUpdateInstanceRequest) ProtoMessage() {} + +func (w *wrapperUpdateInstanceRequest) ProtoReflect() protoreflect.Message { + return (*UpdateInstanceRequest)(w).ProtoReflect() +} + +// func (x *DeleteInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListInstancesResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListInstancesResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListInstancesResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListInstancesResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListInstancesResponse], use the following code: +// +// var original *ListInstancesResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListInstancesResponse) +func (x *ListInstancesResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListInstancesResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListInstancesResponse)(c)) +} + +// wrapperListInstancesResponse is used to return [ListInstancesResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListInstancesResponse ListInstancesResponse + +func (w *wrapperListInstancesResponse) String() string { + return (*ListInstancesResponse)(w).String() +} + +func (*wrapperListInstancesResponse) ProtoMessage() {} + +func (w *wrapperListInstancesResponse) ProtoReflect() protoreflect.Message { + return (*ListInstancesResponse)(w).ProtoReflect() +} + +// func (x *StartInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *StartInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *StopInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *StopInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/instance_service_grpc.pb.go b/proto/nebius/compute/v1/instance_service_grpc.pb.go new file mode 100644 index 0000000..bffed9b --- /dev/null +++ b/proto/nebius/compute/v1/instance_service_grpc.pb.go @@ -0,0 +1,404 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/compute/v1/instance_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + InstanceService_Get_FullMethodName = "/nebius.compute.v1.InstanceService/Get" + InstanceService_GetByName_FullMethodName = "/nebius.compute.v1.InstanceService/GetByName" + InstanceService_List_FullMethodName = "/nebius.compute.v1.InstanceService/List" + InstanceService_Create_FullMethodName = "/nebius.compute.v1.InstanceService/Create" + InstanceService_Update_FullMethodName = "/nebius.compute.v1.InstanceService/Update" + InstanceService_Delete_FullMethodName = "/nebius.compute.v1.InstanceService/Delete" + InstanceService_Start_FullMethodName = "/nebius.compute.v1.InstanceService/Start" + InstanceService_Stop_FullMethodName = "/nebius.compute.v1.InstanceService/Stop" + InstanceService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1.InstanceService/ListOperationsByParent" +) + +// InstanceServiceClient is the client API for InstanceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InstanceServiceClient interface { + Get(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Instance, error) + List(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) + Create(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Start(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Stop(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) + ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type instanceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInstanceServiceClient(cc grpc.ClientConnInterface) InstanceServiceClient { + return &instanceServiceClient{cc} +} + +func (c *instanceServiceClient) Get(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) { + out := new(Instance) + err := c.cc.Invoke(ctx, InstanceService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Instance, error) { + out := new(Instance) + err := c.cc.Invoke(ctx, InstanceService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) List(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) { + out := new(ListInstancesResponse) + err := c.cc.Invoke(ctx, InstanceService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Create(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Update(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Delete(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Start(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Start_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Stop(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Stop_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) ListOperationsByParent(ctx context.Context, in *ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + out := new(v1.ListOperationsResponse) + err := c.cc.Invoke(ctx, InstanceService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InstanceServiceServer is the server API for InstanceService service. +// All implementations should embed UnimplementedInstanceServiceServer +// for forward compatibility +type InstanceServiceServer interface { + Get(context.Context, *GetInstanceRequest) (*Instance, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Instance, error) + List(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) + Create(context.Context, *CreateInstanceRequest) (*v1.Operation, error) + Update(context.Context, *UpdateInstanceRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteInstanceRequest) (*v1.Operation, error) + Start(context.Context, *StartInstanceRequest) (*v1.Operation, error) + Stop(context.Context, *StopInstanceRequest) (*v1.Operation, error) + ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) +} + +// UnimplementedInstanceServiceServer should be embedded to have forward compatible implementations. +type UnimplementedInstanceServiceServer struct { +} + +func (UnimplementedInstanceServiceServer) Get(context.Context, *GetInstanceRequest) (*Instance, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedInstanceServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Instance, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedInstanceServiceServer) List(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedInstanceServiceServer) Create(context.Context, *CreateInstanceRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedInstanceServiceServer) Update(context.Context, *UpdateInstanceRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedInstanceServiceServer) Delete(context.Context, *DeleteInstanceRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedInstanceServiceServer) Start(context.Context, *StartInstanceRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") +} +func (UnimplementedInstanceServiceServer) Stop(context.Context, *StopInstanceRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedInstanceServiceServer) ListOperationsByParent(context.Context, *ListOperationsByParentRequest) (*v1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeInstanceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InstanceServiceServer will +// result in compilation errors. +type UnsafeInstanceServiceServer interface { + mustEmbedUnimplementedInstanceServiceServer() +} + +func RegisterInstanceServiceServer(s grpc.ServiceRegistrar, srv InstanceServiceServer) { + s.RegisterService(&InstanceService_ServiceDesc, srv) +} + +func _InstanceService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Get(ctx, req.(*GetInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInstancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).List(ctx, req.(*ListInstancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Create(ctx, req.(*CreateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Update(ctx, req.(*UpdateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Delete(ctx, req.(*DeleteInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Start(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Start_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Start(ctx, req.(*StartInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Stop_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Stop(ctx, req.(*StopInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).ListOperationsByParent(ctx, req.(*ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InstanceService_ServiceDesc is the grpc.ServiceDesc for InstanceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InstanceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1.InstanceService", + HandlerType: (*InstanceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _InstanceService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _InstanceService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _InstanceService_List_Handler, + }, + { + MethodName: "Create", + Handler: _InstanceService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _InstanceService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _InstanceService_Delete_Handler, + }, + { + MethodName: "Start", + Handler: _InstanceService_Start_Handler, + }, + { + MethodName: "Stop", + Handler: _InstanceService_Stop_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _InstanceService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1/instance_service.proto", +} diff --git a/proto/nebius/compute/v1/network_interface.pb.go b/proto/nebius/compute/v1/network_interface.pb.go new file mode 100644 index 0000000..038b8a6 --- /dev/null +++ b/proto/nebius/compute/v1/network_interface.pb.go @@ -0,0 +1,639 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/network_interface.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Describes the specification of a network interface. +type NetworkInterfaceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Subnet ID + SubnetId string `protobuf:"bytes,1,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + // Name for interface. + // Must be unique within instance's network interfaces + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Private IPv4 address associated with the interface. + IpAddress *IPAddress `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + // Public IPv4 address associated with the interface. + PublicIpAddress *PublicIPAddress `protobuf:"bytes,4,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` +} + +func (x *NetworkInterfaceSpec) Reset() { + *x = NetworkInterfaceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceSpec) ProtoMessage() {} + +func (x *NetworkInterfaceSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceSpec.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{0} +} + +func (x *NetworkInterfaceSpec) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +func (x *NetworkInterfaceSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NetworkInterfaceSpec) GetIpAddress() *IPAddress { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *NetworkInterfaceSpec) GetPublicIpAddress() *PublicIPAddress { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +// Describes an IPv4 address. +type IPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Allocation identifier if it was created before. + AllocationId string `protobuf:"bytes,1,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *IPAddress) Reset() { + *x = IPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPAddress) ProtoMessage() {} + +func (x *IPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPAddress.ProtoReflect.Descriptor instead. +func (*IPAddress) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{1} +} + +func (x *IPAddress) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +// Describes a public IP address. +type PublicIPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes different methods of public IP address allocation. + // + // Types that are assignable to Allocation: + // + // *PublicIPAddress_AllocationId + Allocation isPublicIPAddress_Allocation `protobuf_oneof:"allocation"` + // If false - Allocation will be created/deleted during NetworkInterface.Allocate/NetworkInterface.Deallocate + // If true - Allocation will be created/deleted during NetworkInterface.Create/NetworkInterface.Delete + // False by default + Static bool `protobuf:"varint,3,opt,name=static,proto3" json:"static,omitempty"` +} + +func (x *PublicIPAddress) Reset() { + *x = PublicIPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddress) ProtoMessage() {} + +func (x *PublicIPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddress.ProtoReflect.Descriptor instead. +func (*PublicIPAddress) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{2} +} + +func (m *PublicIPAddress) GetAllocation() isPublicIPAddress_Allocation { + if m != nil { + return m.Allocation + } + return nil +} + +func (x *PublicIPAddress) GetAllocationId() string { + if x, ok := x.GetAllocation().(*PublicIPAddress_AllocationId); ok { + return x.AllocationId + } + return "" +} + +func (x *PublicIPAddress) GetStatic() bool { + if x != nil { + return x.Static + } + return false +} + +type isPublicIPAddress_Allocation interface { + isPublicIPAddress_Allocation() +} + +type PublicIPAddress_AllocationId struct { + // Allocation identifier if it was created before. + AllocationId string `protobuf:"bytes,1,opt,name=allocation_id,json=allocationId,proto3,oneof"` +} + +func (*PublicIPAddress_AllocationId) isPublicIPAddress_Allocation() {} + +// Describes the status of a network interface. +type NetworkInterfaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The index of the network interface + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + // Name for interface. + // Unique within instance's network interfaces + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Effective Private IPv4 address + IpAddress *IPAddressStatus `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + // Effective Public IPv4 address + PublicIpAddress *PublicIPAddressStatus `protobuf:"bytes,4,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` + // MAC address + MacAddress string `protobuf:"bytes,7,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` +} + +func (x *NetworkInterfaceStatus) Reset() { + *x = NetworkInterfaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceStatus) ProtoMessage() {} + +func (x *NetworkInterfaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceStatus.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{3} +} + +func (x *NetworkInterfaceStatus) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *NetworkInterfaceStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NetworkInterfaceStatus) GetIpAddress() *IPAddressStatus { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *NetworkInterfaceStatus) GetPublicIpAddress() *PublicIPAddressStatus { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +func (x *NetworkInterfaceStatus) GetMacAddress() string { + if x != nil { + return x.MacAddress + } + return "" +} + +type IPAddressStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Effective private IPv4 address assigned to the interface. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Allocation identifier. + AllocationId string `protobuf:"bytes,2,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *IPAddressStatus) Reset() { + *x = IPAddressStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPAddressStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPAddressStatus) ProtoMessage() {} + +func (x *IPAddressStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPAddressStatus.ProtoReflect.Descriptor instead. +func (*IPAddressStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{4} +} + +func (x *IPAddressStatus) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *IPAddressStatus) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +type PublicIPAddressStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Effective public IPv4 address assigned to the interface. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Allocation identifier. + AllocationId string `protobuf:"bytes,2,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *PublicIPAddressStatus) Reset() { + *x = PublicIPAddressStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddressStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddressStatus) ProtoMessage() {} + +func (x *PublicIPAddressStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_network_interface_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddressStatus.ProtoReflect.Descriptor instead. +func (*PublicIPAddressStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_network_interface_proto_rawDescGZIP(), []int{5} +} + +func (x *PublicIPAddressStatus) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PublicIPAddressStatus) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +var File_nebius_compute_v1_network_interface_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_network_interface_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x02, 0x0a, 0x14, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, + 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x08, 0x73, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xba, 0x48, 0x1f, 0xc8, 0x01, 0x01, 0x72, 0x1a, 0x10, + 0x01, 0x18, 0x3c, 0x32, 0x14, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x30, + 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2a, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x41, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x54, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x30, 0x0a, 0x09, 0x49, 0x50, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x0f, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, + 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x42, 0x0c, 0x0a, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x41, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x54, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x61, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x0f, 0x49, 0x50, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x15, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x42, 0x64, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x15, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_compute_v1_network_interface_proto_rawDescOnce sync.Once + file_nebius_compute_v1_network_interface_proto_rawDescData = file_nebius_compute_v1_network_interface_proto_rawDesc +) + +func file_nebius_compute_v1_network_interface_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_network_interface_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_network_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_network_interface_proto_rawDescData) + }) + return file_nebius_compute_v1_network_interface_proto_rawDescData +} + +var file_nebius_compute_v1_network_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1_network_interface_proto_goTypes = []any{ + (*NetworkInterfaceSpec)(nil), // 0: nebius.compute.v1.NetworkInterfaceSpec + (*IPAddress)(nil), // 1: nebius.compute.v1.IPAddress + (*PublicIPAddress)(nil), // 2: nebius.compute.v1.PublicIPAddress + (*NetworkInterfaceStatus)(nil), // 3: nebius.compute.v1.NetworkInterfaceStatus + (*IPAddressStatus)(nil), // 4: nebius.compute.v1.IPAddressStatus + (*PublicIPAddressStatus)(nil), // 5: nebius.compute.v1.PublicIPAddressStatus +} +var file_nebius_compute_v1_network_interface_proto_depIdxs = []int32{ + 1, // 0: nebius.compute.v1.NetworkInterfaceSpec.ip_address:type_name -> nebius.compute.v1.IPAddress + 2, // 1: nebius.compute.v1.NetworkInterfaceSpec.public_ip_address:type_name -> nebius.compute.v1.PublicIPAddress + 4, // 2: nebius.compute.v1.NetworkInterfaceStatus.ip_address:type_name -> nebius.compute.v1.IPAddressStatus + 5, // 3: nebius.compute.v1.NetworkInterfaceStatus.public_ip_address:type_name -> nebius.compute.v1.PublicIPAddressStatus + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_network_interface_proto_init() } +func file_nebius_compute_v1_network_interface_proto_init() { + if File_nebius_compute_v1_network_interface_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_network_interface_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*IPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*IPAddressStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddressStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1_network_interface_proto_msgTypes[2].OneofWrappers = []any{ + (*PublicIPAddress_AllocationId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_network_interface_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_network_interface_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_network_interface_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_network_interface_proto_msgTypes, + }.Build() + File_nebius_compute_v1_network_interface_proto = out.File + file_nebius_compute_v1_network_interface_proto_rawDesc = nil + file_nebius_compute_v1_network_interface_proto_goTypes = nil + file_nebius_compute_v1_network_interface_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/network_interface.sensitive.pb.go b/proto/nebius/compute/v1/network_interface.sensitive.pb.go new file mode 100644 index 0000000..bd511ed --- /dev/null +++ b/proto/nebius/compute/v1/network_interface.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *NetworkInterfaceSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *IPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPAddressStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *IPAddressStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddressStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddressStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1/operation_service.pb.go b/proto/nebius/compute/v1/operation_service.pb.go new file mode 100644 index 0000000..22a7f52 --- /dev/null +++ b/proto/nebius/compute/v1/operation_service.pb.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/compute/v1/operation_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListOperationsByParentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the parent to list operations for resource type at. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Page size. [1...1000]. Optional, if not specified, a reasonable default will be chosen by the service. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Listing continuation token. Empty to start listing from the first page. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListOperationsByParentRequest) Reset() { + *x = ListOperationsByParentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1_operation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOperationsByParentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOperationsByParentRequest) ProtoMessage() {} + +func (x *ListOperationsByParentRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1_operation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListOperationsByParentRequest.ProtoReflect.Descriptor instead. +func (*ListOperationsByParentRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1_operation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ListOperationsByParentRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListOperationsByParentRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListOperationsByParentRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +var File_nebius_compute_v1_operation_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1_operation_service_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x1d, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x64, + 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1_operation_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1_operation_service_proto_rawDescData = file_nebius_compute_v1_operation_service_proto_rawDesc +) + +func file_nebius_compute_v1_operation_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1_operation_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1_operation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1_operation_service_proto_rawDescData) + }) + return file_nebius_compute_v1_operation_service_proto_rawDescData +} + +var file_nebius_compute_v1_operation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_compute_v1_operation_service_proto_goTypes = []any{ + (*ListOperationsByParentRequest)(nil), // 0: nebius.compute.v1.ListOperationsByParentRequest +} +var file_nebius_compute_v1_operation_service_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1_operation_service_proto_init() } +func file_nebius_compute_v1_operation_service_proto_init() { + if File_nebius_compute_v1_operation_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1_operation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ListOperationsByParentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1_operation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1_operation_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1_operation_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1_operation_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1_operation_service_proto = out.File + file_nebius_compute_v1_operation_service_proto_rawDesc = nil + file_nebius_compute_v1_operation_service_proto_goTypes = nil + file_nebius_compute_v1_operation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1/operation_service.sensitive.pb.go b/proto/nebius/compute/v1/operation_service.sensitive.pb.go new file mode 100644 index 0000000..a3f4214 --- /dev/null +++ b/proto/nebius/compute/v1/operation_service.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *ListOperationsByParentRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListOperationsByParentRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/disk.pb.go b/proto/nebius/compute/v1alpha1/disk.pb.go new file mode 100644 index 0000000..40767e2 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/disk.pb.go @@ -0,0 +1,818 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/disk.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type DiskSpec_DiskType int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskSpec_UNSPECIFIED DiskSpec_DiskType = 0 + // the list of available types will be clarified later, it is not final version + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskSpec_NETWORK_SSD DiskSpec_DiskType = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskSpec_NETWORK_HDD DiskSpec_DiskType = 2 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskSpec_NETWORK_SSD_NON_REPLICATED DiskSpec_DiskType = 3 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskSpec_NETWORK_SSD_IO_M3 DiskSpec_DiskType = 4 +) + +// Enum value maps for DiskSpec_DiskType. +var ( + DiskSpec_DiskType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + 3: "NETWORK_SSD_NON_REPLICATED", + 4: "NETWORK_SSD_IO_M3", + } + DiskSpec_DiskType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + "NETWORK_SSD_NON_REPLICATED": 3, + "NETWORK_SSD_IO_M3": 4, + } +) + +func (x DiskSpec_DiskType) Enum() *DiskSpec_DiskType { + p := new(DiskSpec_DiskType) + *p = x + return p +} + +func (x DiskSpec_DiskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskSpec_DiskType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_disk_proto_enumTypes[0].Descriptor() +} + +func (DiskSpec_DiskType) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_disk_proto_enumTypes[0] +} + +func (x DiskSpec_DiskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskSpec_DiskType.Descriptor instead. +func (DiskSpec_DiskType) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{1, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type DiskStatus_State int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_UNSPECIFIED DiskStatus_State = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_CREATING DiskStatus_State = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_READY DiskStatus_State = 2 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_UPDATING DiskStatus_State = 3 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_DELETING DiskStatus_State = 4 + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + DiskStatus_ERROR DiskStatus_State = 5 +) + +// Enum value maps for DiskStatus_State. +var ( + DiskStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + DiskStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x DiskStatus_State) Enum() *DiskStatus_State { + p := new(DiskStatus_State) + *p = x + return p +} + +func (x DiskStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_disk_proto_enumTypes[1].Descriptor() +} + +func (DiskStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_disk_proto_enumTypes[1] +} + +func (x DiskStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskStatus_State.Descriptor instead. +func (DiskStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{3, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + Status *DiskStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Disk) Reset() { + *x = Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disk) ProtoMessage() {} + +func (x *Disk) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Disk.ProtoReflect.Descriptor instead. +func (*Disk) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *Disk) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *Disk) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *Disk) GetStatus() *DiskStatus { + if x != nil { + return x.Status + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type DiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *DiskSpec_SizeBytes + // *DiskSpec_SizeKibibytes + // *DiskSpec_SizeMebibytes + // *DiskSpec_SizeGibibytes + Size isDiskSpec_Size `protobuf_oneof:"size"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + Type DiskSpec_DiskType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.compute.v1alpha1.DiskSpec_DiskType" json:"type,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + PlacementPolicy *DiskPlacementPolicy `protobuf:"bytes,7,opt,name=placement_policy,json=placementPolicy,proto3" json:"placement_policy,omitempty"` + // Types that are assignable to Source: + // + // *DiskSpec_SourceImageId + // *DiskSpec_SourceImageFamily + Source isDiskSpec_Source `protobuf_oneof:"source"` +} + +func (x *DiskSpec) Reset() { + *x = DiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskSpec) ProtoMessage() {} + +func (x *DiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskSpec.ProtoReflect.Descriptor instead. +func (*DiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{1} +} + +func (m *DiskSpec) GetSize() isDiskSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetType() DiskSpec_DiskType { + if x != nil { + return x.Type + } + return DiskSpec_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetPlacementPolicy() *DiskPlacementPolicy { + if x != nil { + return x.PlacementPolicy + } + return nil +} + +func (m *DiskSpec) GetSource() isDiskSpec_Source { + if m != nil { + return m.Source + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSourceImageId() string { + if x, ok := x.GetSource().(*DiskSpec_SourceImageId); ok { + return x.SourceImageId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskSpec) GetSourceImageFamily() string { + if x, ok := x.GetSource().(*DiskSpec_SourceImageFamily); ok { + return x.SourceImageFamily + } + return "" +} + +type isDiskSpec_Size interface { + isDiskSpec_Size() +} + +type DiskSpec_SizeBytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type DiskSpec_SizeKibibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type DiskSpec_SizeMebibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type DiskSpec_SizeGibibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*DiskSpec_SizeBytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeKibibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeMebibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeGibibytes) isDiskSpec_Size() {} + +type isDiskSpec_Source interface { + isDiskSpec_Source() +} + +type DiskSpec_SourceImageId struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SourceImageId string `protobuf:"bytes,8,opt,name=source_image_id,json=sourceImageId,proto3,oneof"` +} + +type DiskSpec_SourceImageFamily struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SourceImageFamily string `protobuf:"bytes,9,opt,name=source_image_family,json=sourceImageFamily,proto3,oneof"` +} + +func (*DiskSpec_SourceImageId) isDiskSpec_Source() {} + +func (*DiskSpec_SourceImageFamily) isDiskSpec_Source() {} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type DiskPlacementPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + PlacementGroupId string `protobuf:"bytes,1,opt,name=placement_group_id,json=placementGroupId,proto3" json:"placement_group_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + PlacementGroupPartition int64 `protobuf:"varint,2,opt,name=placement_group_partition,json=placementGroupPartition,proto3" json:"placement_group_partition,omitempty"` +} + +func (x *DiskPlacementPolicy) Reset() { + *x = DiskPlacementPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskPlacementPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskPlacementPolicy) ProtoMessage() {} + +func (x *DiskPlacementPolicy) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskPlacementPolicy.ProtoReflect.Descriptor instead. +func (*DiskPlacementPolicy) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskPlacementPolicy) GetPlacementGroupId() string { + if x != nil { + return x.PlacementGroupId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskPlacementPolicy) GetPlacementGroupPartition() int64 { + if x != nil { + return x.PlacementGroupPartition + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +type DiskStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + State DiskStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1alpha1.DiskStatus_State" json:"state,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + ReadWriteAttachment string `protobuf:"bytes,3,opt,name=read_write_attachment,json=readWriteAttachment,proto3" json:"read_write_attachment,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + ReadOnlyAttachments []string `protobuf:"bytes,4,rep,name=read_only_attachments,json=readOnlyAttachments,proto3" json:"read_only_attachments,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SourceImageId string `protobuf:"bytes,5,opt,name=source_image_id,json=sourceImageId,proto3" json:"source_image_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + SizeBytes int64 `protobuf:"varint,6,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. + Reconciling bool `protobuf:"varint,7,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *DiskStatus) Reset() { + *x = DiskStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskStatus) ProtoMessage() {} + +func (x *DiskStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskStatus.ProtoReflect.Descriptor instead. +func (*DiskStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetState() DiskStatus_State { + if x != nil { + return x.State + } + return DiskStatus_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetReadWriteAttachment() string { + if x != nil { + return x.ReadWriteAttachment + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetReadOnlyAttachments() []string { + if x != nil { + return x.ReadOnlyAttachments + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetSourceImageId() string { + if x != nil { + return x.SourceImageId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk.proto is marked as deprecated. +func (x *DiskStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1alpha1_disk_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_disk_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, + 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x90, 0x05, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x25, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x09, 0x73, 0x69, 0x7a, + 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6b, + 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4b, 0x69, 0x62, 0x69, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x65, + 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, + 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x5d, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0f, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, + 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x01, 0x52, + 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x13, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x02, 0x48, 0x01, 0x52, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x74, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, + 0x53, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, + 0x48, 0x44, 0x44, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, + 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, + 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x49, 0x4f, 0x5f, 0x4d, 0x33, 0x10, 0x04, 0x42, 0x0d, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x7f, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2c, 0x0a, 0x12, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, + 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, + 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x67, + 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x42, 0x09, 0x44, 0x69, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_disk_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_disk_proto_rawDescData = file_nebius_compute_v1alpha1_disk_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_disk_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_disk_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_disk_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_disk_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_disk_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_disk_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_compute_v1alpha1_disk_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_compute_v1alpha1_disk_proto_goTypes = []any{ + (DiskSpec_DiskType)(0), // 0: nebius.compute.v1alpha1.DiskSpec.DiskType + (DiskStatus_State)(0), // 1: nebius.compute.v1alpha1.DiskStatus.State + (*Disk)(nil), // 2: nebius.compute.v1alpha1.Disk + (*DiskSpec)(nil), // 3: nebius.compute.v1alpha1.DiskSpec + (*DiskPlacementPolicy)(nil), // 4: nebius.compute.v1alpha1.DiskPlacementPolicy + (*DiskStatus)(nil), // 5: nebius.compute.v1alpha1.DiskStatus + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1alpha1_disk_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1alpha1.Disk.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.compute.v1alpha1.Disk.spec:type_name -> nebius.compute.v1alpha1.DiskSpec + 5, // 2: nebius.compute.v1alpha1.Disk.status:type_name -> nebius.compute.v1alpha1.DiskStatus + 0, // 3: nebius.compute.v1alpha1.DiskSpec.type:type_name -> nebius.compute.v1alpha1.DiskSpec.DiskType + 4, // 4: nebius.compute.v1alpha1.DiskSpec.placement_policy:type_name -> nebius.compute.v1alpha1.DiskPlacementPolicy + 1, // 5: nebius.compute.v1alpha1.DiskStatus.state:type_name -> nebius.compute.v1alpha1.DiskStatus.State + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_disk_proto_init() } +func file_nebius_compute_v1alpha1_disk_proto_init() { + if File_nebius_compute_v1alpha1_disk_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_disk_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DiskPlacementPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DiskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1alpha1_disk_proto_msgTypes[1].OneofWrappers = []any{ + (*DiskSpec_SizeBytes)(nil), + (*DiskSpec_SizeKibibytes)(nil), + (*DiskSpec_SizeMebibytes)(nil), + (*DiskSpec_SizeGibibytes)(nil), + (*DiskSpec_SourceImageId)(nil), + (*DiskSpec_SourceImageFamily)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_disk_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1alpha1_disk_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_disk_proto_depIdxs, + EnumInfos: file_nebius_compute_v1alpha1_disk_proto_enumTypes, + MessageInfos: file_nebius_compute_v1alpha1_disk_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_disk_proto = out.File + file_nebius_compute_v1alpha1_disk_proto_rawDesc = nil + file_nebius_compute_v1alpha1_disk_proto_goTypes = nil + file_nebius_compute_v1alpha1_disk_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/disk.sensitive.pb.go b/proto/nebius/compute/v1alpha1/disk.sensitive.pb.go new file mode 100644 index 0000000..91eca14 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/disk.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Disk) Sanitize() // is not generated as no sensitive fields found +// func (x *Disk) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskPlacementPolicy) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskPlacementPolicy) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/disk_service.pb.go b/proto/nebius/compute/v1alpha1/disk_service.pb.go new file mode 100644 index 0000000..987c22e --- /dev/null +++ b/proto/nebius/compute/v1alpha1/disk_service.pb.go @@ -0,0 +1,645 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/disk_service.proto is a deprecated file. + +package v1alpha1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type GetDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetDiskRequest) Reset() { + *x = GetDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskRequest) ProtoMessage() {} + +func (x *GetDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskRequest.ProtoReflect.Descriptor instead. +func (*GetDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *GetDiskRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type ListDisksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListDisksRequest) Reset() { + *x = ListDisksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisksRequest) ProtoMessage() {} + +func (x *ListDisksRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisksRequest.ProtoReflect.Descriptor instead. +func (*ListDisksRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type CreateDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateDiskRequest) Reset() { + *x = CreateDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDiskRequest) ProtoMessage() {} + +func (x *CreateDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDiskRequest.ProtoReflect.Descriptor instead. +func (*CreateDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *CreateDiskRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *CreateDiskRequest) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type UpdateDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Spec *DiskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateDiskRequest) Reset() { + *x = UpdateDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDiskRequest) ProtoMessage() {} + +func (x *UpdateDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDiskRequest.ProtoReflect.Descriptor instead. +func (*UpdateDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *UpdateDiskRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *UpdateDiskRequest) GetSpec() *DiskSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type DeleteDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteDiskRequest) Reset() { + *x = DeleteDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDiskRequest) ProtoMessage() {} + +func (x *DeleteDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDiskRequest.ProtoReflect.Descriptor instead. +func (*DeleteDiskRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *DeleteDiskRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +type ListDisksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + Items []*Disk `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDisksResponse) Reset() { + *x = ListDisksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisksResponse) ProtoMessage() {} + +func (x *ListDisksResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisksResponse.ProtoReflect.Descriptor instead. +func (*ListDisksResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksResponse) GetItems() []*Disk { + if x != nil { + return x.Items + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/disk_service.proto is marked as deprecated. +func (x *ListDisksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1alpha1_disk_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_disk_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a, 0x11, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x35, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8a, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x9c, 0x05, 0x0a, 0x0b, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x03, 0x47, + 0x65, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x5d, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x35, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x03, 0x88, 0x02, 0x01, 0x42, 0x6e, 0x0a, 0x1e, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_disk_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_disk_service_proto_rawDescData = file_nebius_compute_v1alpha1_disk_service_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_disk_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_disk_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_disk_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_disk_service_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_disk_service_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_disk_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1alpha1_disk_service_proto_goTypes = []any{ + (*GetDiskRequest)(nil), // 0: nebius.compute.v1alpha1.GetDiskRequest + (*ListDisksRequest)(nil), // 1: nebius.compute.v1alpha1.ListDisksRequest + (*CreateDiskRequest)(nil), // 2: nebius.compute.v1alpha1.CreateDiskRequest + (*UpdateDiskRequest)(nil), // 3: nebius.compute.v1alpha1.UpdateDiskRequest + (*DeleteDiskRequest)(nil), // 4: nebius.compute.v1alpha1.DeleteDiskRequest + (*ListDisksResponse)(nil), // 5: nebius.compute.v1alpha1.ListDisksResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*DiskSpec)(nil), // 7: nebius.compute.v1alpha1.DiskSpec + (*Disk)(nil), // 8: nebius.compute.v1alpha1.Disk + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*v1alpha1.ListOperationsByParentRequest)(nil), // 10: nebius.common.v1alpha1.ListOperationsByParentRequest + (*v1alpha1.Operation)(nil), // 11: nebius.common.v1alpha1.Operation + (*v1alpha1.ListOperationsResponse)(nil), // 12: nebius.common.v1alpha1.ListOperationsResponse +} +var file_nebius_compute_v1alpha1_disk_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1alpha1.CreateDiskRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1alpha1.CreateDiskRequest.spec:type_name -> nebius.compute.v1alpha1.DiskSpec + 6, // 2: nebius.compute.v1alpha1.UpdateDiskRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1alpha1.UpdateDiskRequest.spec:type_name -> nebius.compute.v1alpha1.DiskSpec + 8, // 4: nebius.compute.v1alpha1.ListDisksResponse.items:type_name -> nebius.compute.v1alpha1.Disk + 0, // 5: nebius.compute.v1alpha1.DiskService.Get:input_type -> nebius.compute.v1alpha1.GetDiskRequest + 9, // 6: nebius.compute.v1alpha1.DiskService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1alpha1.DiskService.List:input_type -> nebius.compute.v1alpha1.ListDisksRequest + 2, // 8: nebius.compute.v1alpha1.DiskService.Create:input_type -> nebius.compute.v1alpha1.CreateDiskRequest + 3, // 9: nebius.compute.v1alpha1.DiskService.Update:input_type -> nebius.compute.v1alpha1.UpdateDiskRequest + 4, // 10: nebius.compute.v1alpha1.DiskService.Delete:input_type -> nebius.compute.v1alpha1.DeleteDiskRequest + 10, // 11: nebius.compute.v1alpha1.DiskService.ListOperationsByParent:input_type -> nebius.common.v1alpha1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1alpha1.DiskService.Get:output_type -> nebius.compute.v1alpha1.Disk + 8, // 13: nebius.compute.v1alpha1.DiskService.GetByName:output_type -> nebius.compute.v1alpha1.Disk + 5, // 14: nebius.compute.v1alpha1.DiskService.List:output_type -> nebius.compute.v1alpha1.ListDisksResponse + 11, // 15: nebius.compute.v1alpha1.DiskService.Create:output_type -> nebius.common.v1alpha1.Operation + 11, // 16: nebius.compute.v1alpha1.DiskService.Update:output_type -> nebius.common.v1alpha1.Operation + 11, // 17: nebius.compute.v1alpha1.DiskService.Delete:output_type -> nebius.common.v1alpha1.Operation + 12, // 18: nebius.compute.v1alpha1.DiskService.ListOperationsByParent:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_disk_service_proto_init() } +func file_nebius_compute_v1alpha1_disk_service_proto_init() { + if File_nebius_compute_v1alpha1_disk_service_proto != nil { + return + } + file_nebius_compute_v1alpha1_disk_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListDisksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_disk_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListDisksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_disk_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1alpha1_disk_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_disk_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_disk_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_disk_service_proto = out.File + file_nebius_compute_v1alpha1_disk_service_proto_rawDesc = nil + file_nebius_compute_v1alpha1_disk_service_proto_goTypes = nil + file_nebius_compute_v1alpha1_disk_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/disk_service.sensitive.pb.go b/proto/nebius/compute/v1alpha1/disk_service.sensitive.pb.go new file mode 100644 index 0000000..b8a3efd --- /dev/null +++ b/proto/nebius/compute/v1alpha1/disk_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListDisksRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListDisksRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteDiskRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteDiskRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListDisksResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListDisksResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/disk_service_grpc.pb.go b/proto/nebius/compute/v1alpha1/disk_service_grpc.pb.go new file mode 100644 index 0000000..2698944 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/disk_service_grpc.pb.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/compute/v1alpha1/disk_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + DiskService_Get_FullMethodName = "/nebius.compute.v1alpha1.DiskService/Get" + DiskService_GetByName_FullMethodName = "/nebius.compute.v1alpha1.DiskService/GetByName" + DiskService_List_FullMethodName = "/nebius.compute.v1alpha1.DiskService/List" + DiskService_Create_FullMethodName = "/nebius.compute.v1alpha1.DiskService/Create" + DiskService_Update_FullMethodName = "/nebius.compute.v1alpha1.DiskService/Update" + DiskService_Delete_FullMethodName = "/nebius.compute.v1alpha1.DiskService/Delete" + DiskService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1alpha1.DiskService/ListOperationsByParent" +) + +// DiskServiceClient is the client API for DiskService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type DiskServiceClient interface { + Get(ctx context.Context, in *GetDiskRequest, opts ...grpc.CallOption) (*Disk, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Disk, error) + List(ctx context.Context, in *ListDisksRequest, opts ...grpc.CallOption) (*ListDisksResponse, error) + Create(ctx context.Context, in *CreateDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) +} + +type diskServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewDiskServiceClient(cc grpc.ClientConnInterface) DiskServiceClient { + return &diskServiceClient{cc} +} + +func (c *diskServiceClient) Get(ctx context.Context, in *GetDiskRequest, opts ...grpc.CallOption) (*Disk, error) { + out := new(Disk) + err := c.cc.Invoke(ctx, DiskService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Disk, error) { + out := new(Disk) + err := c.cc.Invoke(ctx, DiskService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) List(ctx context.Context, in *ListDisksRequest, opts ...grpc.CallOption) (*ListDisksResponse, error) { + out := new(ListDisksResponse) + err := c.cc.Invoke(ctx, DiskService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Create(ctx context.Context, in *CreateDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, DiskService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Update(ctx context.Context, in *UpdateDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, DiskService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) Delete(ctx context.Context, in *DeleteDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, DiskService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskServiceClient) ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + out := new(v1alpha1.ListOperationsResponse) + err := c.cc.Invoke(ctx, DiskService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DiskServiceServer is the server API for DiskService service. +// All implementations should embed UnimplementedDiskServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type DiskServiceServer interface { + Get(context.Context, *GetDiskRequest) (*Disk, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Disk, error) + List(context.Context, *ListDisksRequest) (*ListDisksResponse, error) + Create(context.Context, *CreateDiskRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateDiskRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteDiskRequest) (*v1alpha1.Operation, error) + ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) +} + +// UnimplementedDiskServiceServer should be embedded to have forward compatible implementations. +type UnimplementedDiskServiceServer struct { +} + +func (UnimplementedDiskServiceServer) Get(context.Context, *GetDiskRequest) (*Disk, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedDiskServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Disk, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedDiskServiceServer) List(context.Context, *ListDisksRequest) (*ListDisksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedDiskServiceServer) Create(context.Context, *CreateDiskRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedDiskServiceServer) Update(context.Context, *UpdateDiskRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedDiskServiceServer) Delete(context.Context, *DeleteDiskRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedDiskServiceServer) ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeDiskServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DiskServiceServer will +// result in compilation errors. +type UnsafeDiskServiceServer interface { + mustEmbedUnimplementedDiskServiceServer() +} + +// Deprecated: Do not use. +func RegisterDiskServiceServer(s grpc.ServiceRegistrar, srv DiskServiceServer) { + s.RegisterService(&DiskService_ServiceDesc, srv) +} + +func _DiskService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Get(ctx, req.(*GetDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDisksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).List(ctx, req.(*ListDisksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Create(ctx, req.(*CreateDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Update(ctx, req.(*UpdateDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).Delete(ctx, req.(*DeleteDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DiskService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DiskService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServiceServer).ListOperationsByParent(ctx, req.(*v1alpha1.ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DiskService_ServiceDesc is the grpc.ServiceDesc for DiskService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DiskService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1alpha1.DiskService", + HandlerType: (*DiskServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _DiskService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _DiskService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _DiskService_List_Handler, + }, + { + MethodName: "Create", + Handler: _DiskService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _DiskService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _DiskService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _DiskService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1alpha1/disk_service.proto", +} diff --git a/proto/nebius/compute/v1alpha1/filesystem.pb.go b/proto/nebius/compute/v1alpha1/filesystem.pb.go new file mode 100644 index 0000000..0462782 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/filesystem.pb.go @@ -0,0 +1,646 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/filesystem.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +type FilesystemSpec_FilesystemType int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemSpec_UNSPECIFIED FilesystemSpec_FilesystemType = 0 + // the list of available types will be clarified later, it is not final version + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemSpec_NETWORK_SSD FilesystemSpec_FilesystemType = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemSpec_NETWORK_HDD FilesystemSpec_FilesystemType = 2 +) + +// Enum value maps for FilesystemSpec_FilesystemType. +var ( + FilesystemSpec_FilesystemType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + } + FilesystemSpec_FilesystemType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + } +) + +func (x FilesystemSpec_FilesystemType) Enum() *FilesystemSpec_FilesystemType { + p := new(FilesystemSpec_FilesystemType) + *p = x + return p +} + +func (x FilesystemSpec_FilesystemType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FilesystemSpec_FilesystemType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_filesystem_proto_enumTypes[0].Descriptor() +} + +func (FilesystemSpec_FilesystemType) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_filesystem_proto_enumTypes[0] +} + +func (x FilesystemSpec_FilesystemType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FilesystemSpec_FilesystemType.Descriptor instead. +func (FilesystemSpec_FilesystemType) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP(), []int{1, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +type FilesystemStatus_State int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_UNSPECIFIED FilesystemStatus_State = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_CREATING FilesystemStatus_State = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_READY FilesystemStatus_State = 2 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_UPDATING FilesystemStatus_State = 3 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_DELETING FilesystemStatus_State = 4 + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + FilesystemStatus_ERROR FilesystemStatus_State = 5 +) + +// Enum value maps for FilesystemStatus_State. +var ( + FilesystemStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + FilesystemStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x FilesystemStatus_State) Enum() *FilesystemStatus_State { + p := new(FilesystemStatus_State) + *p = x + return p +} + +func (x FilesystemStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FilesystemStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_filesystem_proto_enumTypes[1].Descriptor() +} + +func (FilesystemStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_filesystem_proto_enumTypes[1] +} + +func (x FilesystemStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FilesystemStatus_State.Descriptor instead. +func (FilesystemStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP(), []int{2, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +type Filesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + Status *FilesystemStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Filesystem) Reset() { + *x = Filesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filesystem) ProtoMessage() {} + +func (x *Filesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filesystem.ProtoReflect.Descriptor instead. +func (*Filesystem) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *Filesystem) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *Filesystem) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *Filesystem) GetStatus() *FilesystemStatus { + if x != nil { + return x.Status + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +type FilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *FilesystemSpec_SizeBytes + // *FilesystemSpec_SizeKibibytes + // *FilesystemSpec_SizeMebibytes + // *FilesystemSpec_SizeGibibytes + Size isFilesystemSpec_Size `protobuf_oneof:"size"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + Type FilesystemSpec_FilesystemType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.compute.v1alpha1.FilesystemSpec_FilesystemType" json:"type,omitempty"` +} + +func (x *FilesystemSpec) Reset() { + *x = FilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilesystemSpec) ProtoMessage() {} + +func (x *FilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilesystemSpec.ProtoReflect.Descriptor instead. +func (*FilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP(), []int{1} +} + +func (m *FilesystemSpec) GetSize() isFilesystemSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*FilesystemSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemSpec) GetType() FilesystemSpec_FilesystemType { + if x != nil { + return x.Type + } + return FilesystemSpec_UNSPECIFIED +} + +type isFilesystemSpec_Size interface { + isFilesystemSpec_Size() +} + +type FilesystemSpec_SizeBytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type FilesystemSpec_SizeKibibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type FilesystemSpec_SizeMebibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type FilesystemSpec_SizeGibibytes struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*FilesystemSpec_SizeBytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeKibibytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeMebibytes) isFilesystemSpec_Size() {} + +func (*FilesystemSpec_SizeGibibytes) isFilesystemSpec_Size() {} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +type FilesystemStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + State FilesystemStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1alpha1.FilesystemStatus_State" json:"state,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + ReadWriteAttachments []string `protobuf:"bytes,3,rep,name=read_write_attachments,json=readWriteAttachments,proto3" json:"read_write_attachments,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + ReadOnlyAttachments []string `protobuf:"bytes,4,rep,name=read_only_attachments,json=readOnlyAttachments,proto3" json:"read_only_attachments,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + SizeBytes int64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. + Reconciling bool `protobuf:"varint,6,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *FilesystemStatus) Reset() { + *x = FilesystemStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilesystemStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilesystemStatus) ProtoMessage() {} + +func (x *FilesystemStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilesystemStatus.ProtoReflect.Descriptor instead. +func (*FilesystemStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetState() FilesystemStatus_State { + if x != nil { + return x.State + } + return FilesystemStatus_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetReadWriteAttachments() []string { + if x != nil { + return x.ReadWriteAttachments + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetReadOnlyAttachments() []string { + if x != nil { + return x.ReadOnlyAttachments + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem.proto is marked as deprecated. +func (x *FilesystemStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1alpha1_filesystem_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_filesystem_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x0a, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa0, 0x03, 0x0a, 0x0e, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, + 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6b, 0x69, 0x62, + 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4b, 0x69, 0x62, 0x69, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x65, 0x62, 0x69, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x02, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, + 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x02, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x56, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x36, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, + 0x4a, 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x43, 0x0a, 0x0e, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, + 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, + 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x48, 0x44, 0x44, 0x10, 0x02, 0x42, 0x0d, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x8b, 0x03, + 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x45, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x61, + 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, + 0x67, 0x22, 0x58, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, + 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x6d, 0x0a, 0x1e, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_filesystem_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_filesystem_proto_rawDescData = file_nebius_compute_v1alpha1_filesystem_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_filesystem_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_filesystem_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_filesystem_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_filesystem_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_filesystem_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_filesystem_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_compute_v1alpha1_filesystem_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1alpha1_filesystem_proto_goTypes = []any{ + (FilesystemSpec_FilesystemType)(0), // 0: nebius.compute.v1alpha1.FilesystemSpec.FilesystemType + (FilesystemStatus_State)(0), // 1: nebius.compute.v1alpha1.FilesystemStatus.State + (*Filesystem)(nil), // 2: nebius.compute.v1alpha1.Filesystem + (*FilesystemSpec)(nil), // 3: nebius.compute.v1alpha1.FilesystemSpec + (*FilesystemStatus)(nil), // 4: nebius.compute.v1alpha1.FilesystemStatus + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1alpha1_filesystem_proto_depIdxs = []int32{ + 5, // 0: nebius.compute.v1alpha1.Filesystem.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.compute.v1alpha1.Filesystem.spec:type_name -> nebius.compute.v1alpha1.FilesystemSpec + 4, // 2: nebius.compute.v1alpha1.Filesystem.status:type_name -> nebius.compute.v1alpha1.FilesystemStatus + 0, // 3: nebius.compute.v1alpha1.FilesystemSpec.type:type_name -> nebius.compute.v1alpha1.FilesystemSpec.FilesystemType + 1, // 4: nebius.compute.v1alpha1.FilesystemStatus.state:type_name -> nebius.compute.v1alpha1.FilesystemStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_filesystem_proto_init() } +func file_nebius_compute_v1alpha1_filesystem_proto_init() { + if File_nebius_compute_v1alpha1_filesystem_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Filesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FilesystemStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1alpha1_filesystem_proto_msgTypes[1].OneofWrappers = []any{ + (*FilesystemSpec_SizeBytes)(nil), + (*FilesystemSpec_SizeKibibytes)(nil), + (*FilesystemSpec_SizeMebibytes)(nil), + (*FilesystemSpec_SizeGibibytes)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_filesystem_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1alpha1_filesystem_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_filesystem_proto_depIdxs, + EnumInfos: file_nebius_compute_v1alpha1_filesystem_proto_enumTypes, + MessageInfos: file_nebius_compute_v1alpha1_filesystem_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_filesystem_proto = out.File + file_nebius_compute_v1alpha1_filesystem_proto_rawDesc = nil + file_nebius_compute_v1alpha1_filesystem_proto_goTypes = nil + file_nebius_compute_v1alpha1_filesystem_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/filesystem.sensitive.pb.go b/proto/nebius/compute/v1alpha1/filesystem.sensitive.pb.go new file mode 100644 index 0000000..32e6b58 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/filesystem.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Filesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *Filesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *FilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FilesystemStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *FilesystemStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/filesystem_service.pb.go b/proto/nebius/compute/v1alpha1/filesystem_service.pb.go new file mode 100644 index 0000000..5a74365 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/filesystem_service.pb.go @@ -0,0 +1,652 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/filesystem_service.proto is a deprecated file. + +package v1alpha1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type GetFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetFilesystemRequest) Reset() { + *x = GetFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFilesystemRequest) ProtoMessage() {} + +func (x *GetFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFilesystemRequest.ProtoReflect.Descriptor instead. +func (*GetFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *GetFilesystemRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type ListFilesystemsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListFilesystemsRequest) Reset() { + *x = ListFilesystemsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesystemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesystemsRequest) ProtoMessage() {} + +func (x *ListFilesystemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesystemsRequest.ProtoReflect.Descriptor instead. +func (*ListFilesystemsRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type CreateFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateFilesystemRequest) Reset() { + *x = CreateFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFilesystemRequest) ProtoMessage() {} + +func (x *CreateFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFilesystemRequest.ProtoReflect.Descriptor instead. +func (*CreateFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *CreateFilesystemRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *CreateFilesystemRequest) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type UpdateFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Spec *FilesystemSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateFilesystemRequest) Reset() { + *x = UpdateFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFilesystemRequest) ProtoMessage() {} + +func (x *UpdateFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFilesystemRequest.ProtoReflect.Descriptor instead. +func (*UpdateFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *UpdateFilesystemRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *UpdateFilesystemRequest) GetSpec() *FilesystemSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type DeleteFilesystemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteFilesystemRequest) Reset() { + *x = DeleteFilesystemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFilesystemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFilesystemRequest) ProtoMessage() {} + +func (x *DeleteFilesystemRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFilesystemRequest.ProtoReflect.Descriptor instead. +func (*DeleteFilesystemRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *DeleteFilesystemRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +type ListFilesystemsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + Items []*Filesystem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFilesystemsResponse) Reset() { + *x = ListFilesystemsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesystemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesystemsResponse) ProtoMessage() {} + +func (x *ListFilesystemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesystemsResponse.ProtoReflect.Descriptor instead. +func (*ListFilesystemsResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsResponse) GetItems() []*Filesystem { + if x != nil { + return x.Items + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/filesystem_service.proto is marked as deprecated. +func (x *ListFilesystemsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1alpha1_filesystem_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_filesystem_service_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0x96, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x96, 0x01, 0x0a, 0x17, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x7c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xd2, 0x05, + 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x54, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x12, 0x69, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, + 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x03, 0x88, + 0x02, 0x01, 0x42, 0x74, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescData = file_nebius_compute_v1alpha1_filesystem_service_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_filesystem_service_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1alpha1_filesystem_service_proto_goTypes = []any{ + (*GetFilesystemRequest)(nil), // 0: nebius.compute.v1alpha1.GetFilesystemRequest + (*ListFilesystemsRequest)(nil), // 1: nebius.compute.v1alpha1.ListFilesystemsRequest + (*CreateFilesystemRequest)(nil), // 2: nebius.compute.v1alpha1.CreateFilesystemRequest + (*UpdateFilesystemRequest)(nil), // 3: nebius.compute.v1alpha1.UpdateFilesystemRequest + (*DeleteFilesystemRequest)(nil), // 4: nebius.compute.v1alpha1.DeleteFilesystemRequest + (*ListFilesystemsResponse)(nil), // 5: nebius.compute.v1alpha1.ListFilesystemsResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*FilesystemSpec)(nil), // 7: nebius.compute.v1alpha1.FilesystemSpec + (*Filesystem)(nil), // 8: nebius.compute.v1alpha1.Filesystem + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*v1alpha1.ListOperationsByParentRequest)(nil), // 10: nebius.common.v1alpha1.ListOperationsByParentRequest + (*v1alpha1.Operation)(nil), // 11: nebius.common.v1alpha1.Operation + (*v1alpha1.ListOperationsResponse)(nil), // 12: nebius.common.v1alpha1.ListOperationsResponse +} +var file_nebius_compute_v1alpha1_filesystem_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1alpha1.CreateFilesystemRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1alpha1.CreateFilesystemRequest.spec:type_name -> nebius.compute.v1alpha1.FilesystemSpec + 6, // 2: nebius.compute.v1alpha1.UpdateFilesystemRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1alpha1.UpdateFilesystemRequest.spec:type_name -> nebius.compute.v1alpha1.FilesystemSpec + 8, // 4: nebius.compute.v1alpha1.ListFilesystemsResponse.items:type_name -> nebius.compute.v1alpha1.Filesystem + 0, // 5: nebius.compute.v1alpha1.FilesystemService.Get:input_type -> nebius.compute.v1alpha1.GetFilesystemRequest + 9, // 6: nebius.compute.v1alpha1.FilesystemService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1alpha1.FilesystemService.List:input_type -> nebius.compute.v1alpha1.ListFilesystemsRequest + 2, // 8: nebius.compute.v1alpha1.FilesystemService.Create:input_type -> nebius.compute.v1alpha1.CreateFilesystemRequest + 3, // 9: nebius.compute.v1alpha1.FilesystemService.Update:input_type -> nebius.compute.v1alpha1.UpdateFilesystemRequest + 4, // 10: nebius.compute.v1alpha1.FilesystemService.Delete:input_type -> nebius.compute.v1alpha1.DeleteFilesystemRequest + 10, // 11: nebius.compute.v1alpha1.FilesystemService.ListOperationsByParent:input_type -> nebius.common.v1alpha1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1alpha1.FilesystemService.Get:output_type -> nebius.compute.v1alpha1.Filesystem + 8, // 13: nebius.compute.v1alpha1.FilesystemService.GetByName:output_type -> nebius.compute.v1alpha1.Filesystem + 5, // 14: nebius.compute.v1alpha1.FilesystemService.List:output_type -> nebius.compute.v1alpha1.ListFilesystemsResponse + 11, // 15: nebius.compute.v1alpha1.FilesystemService.Create:output_type -> nebius.common.v1alpha1.Operation + 11, // 16: nebius.compute.v1alpha1.FilesystemService.Update:output_type -> nebius.common.v1alpha1.Operation + 11, // 17: nebius.compute.v1alpha1.FilesystemService.Delete:output_type -> nebius.common.v1alpha1.Operation + 12, // 18: nebius.compute.v1alpha1.FilesystemService.ListOperationsByParent:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_filesystem_service_proto_init() } +func file_nebius_compute_v1alpha1_filesystem_service_proto_init() { + if File_nebius_compute_v1alpha1_filesystem_service_proto != nil { + return + } + file_nebius_compute_v1alpha1_filesystem_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListFilesystemsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFilesystemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListFilesystemsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_filesystem_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1alpha1_filesystem_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_filesystem_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_filesystem_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_filesystem_service_proto = out.File + file_nebius_compute_v1alpha1_filesystem_service_proto_rawDesc = nil + file_nebius_compute_v1alpha1_filesystem_service_proto_goTypes = nil + file_nebius_compute_v1alpha1_filesystem_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/filesystem_service.sensitive.pb.go b/proto/nebius/compute/v1alpha1/filesystem_service.sensitive.pb.go new file mode 100644 index 0000000..e0600c6 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/filesystem_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFilesystemsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFilesystemsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteFilesystemRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteFilesystemRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFilesystemsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFilesystemsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/filesystem_service_grpc.pb.go b/proto/nebius/compute/v1alpha1/filesystem_service_grpc.pb.go new file mode 100644 index 0000000..3a5794d --- /dev/null +++ b/proto/nebius/compute/v1alpha1/filesystem_service_grpc.pb.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/compute/v1alpha1/filesystem_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + FilesystemService_Get_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/Get" + FilesystemService_GetByName_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/GetByName" + FilesystemService_List_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/List" + FilesystemService_Create_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/Create" + FilesystemService_Update_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/Update" + FilesystemService_Delete_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/Delete" + FilesystemService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1alpha1.FilesystemService/ListOperationsByParent" +) + +// FilesystemServiceClient is the client API for FilesystemService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type FilesystemServiceClient interface { + Get(ctx context.Context, in *GetFilesystemRequest, opts ...grpc.CallOption) (*Filesystem, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Filesystem, error) + List(ctx context.Context, in *ListFilesystemsRequest, opts ...grpc.CallOption) (*ListFilesystemsResponse, error) + Create(ctx context.Context, in *CreateFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) +} + +type filesystemServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewFilesystemServiceClient(cc grpc.ClientConnInterface) FilesystemServiceClient { + return &filesystemServiceClient{cc} +} + +func (c *filesystemServiceClient) Get(ctx context.Context, in *GetFilesystemRequest, opts ...grpc.CallOption) (*Filesystem, error) { + out := new(Filesystem) + err := c.cc.Invoke(ctx, FilesystemService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Filesystem, error) { + out := new(Filesystem) + err := c.cc.Invoke(ctx, FilesystemService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) List(ctx context.Context, in *ListFilesystemsRequest, opts ...grpc.CallOption) (*ListFilesystemsResponse, error) { + out := new(ListFilesystemsResponse) + err := c.cc.Invoke(ctx, FilesystemService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Create(ctx context.Context, in *CreateFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Update(ctx context.Context, in *UpdateFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) Delete(ctx context.Context, in *DeleteFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, FilesystemService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemServiceClient) ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + out := new(v1alpha1.ListOperationsResponse) + err := c.cc.Invoke(ctx, FilesystemService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServiceServer is the server API for FilesystemService service. +// All implementations should embed UnimplementedFilesystemServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type FilesystemServiceServer interface { + Get(context.Context, *GetFilesystemRequest) (*Filesystem, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Filesystem, error) + List(context.Context, *ListFilesystemsRequest) (*ListFilesystemsResponse, error) + Create(context.Context, *CreateFilesystemRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateFilesystemRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteFilesystemRequest) (*v1alpha1.Operation, error) + ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) +} + +// UnimplementedFilesystemServiceServer should be embedded to have forward compatible implementations. +type UnimplementedFilesystemServiceServer struct { +} + +func (UnimplementedFilesystemServiceServer) Get(context.Context, *GetFilesystemRequest) (*Filesystem, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedFilesystemServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Filesystem, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedFilesystemServiceServer) List(context.Context, *ListFilesystemsRequest) (*ListFilesystemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedFilesystemServiceServer) Create(context.Context, *CreateFilesystemRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedFilesystemServiceServer) Update(context.Context, *UpdateFilesystemRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedFilesystemServiceServer) Delete(context.Context, *DeleteFilesystemRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedFilesystemServiceServer) ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeFilesystemServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FilesystemServiceServer will +// result in compilation errors. +type UnsafeFilesystemServiceServer interface { + mustEmbedUnimplementedFilesystemServiceServer() +} + +// Deprecated: Do not use. +func RegisterFilesystemServiceServer(s grpc.ServiceRegistrar, srv FilesystemServiceServer) { + s.RegisterService(&FilesystemService_ServiceDesc, srv) +} + +func _FilesystemService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Get(ctx, req.(*GetFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFilesystemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).List(ctx, req.(*ListFilesystemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Create(ctx, req.(*CreateFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Update(ctx, req.(*UpdateFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFilesystemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).Delete(ctx, req.(*DeleteFilesystemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilesystemService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilesystemService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServiceServer).ListOperationsByParent(ctx, req.(*v1alpha1.ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FilesystemService_ServiceDesc is the grpc.ServiceDesc for FilesystemService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FilesystemService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1alpha1.FilesystemService", + HandlerType: (*FilesystemServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _FilesystemService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _FilesystemService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _FilesystemService_List_Handler, + }, + { + MethodName: "Create", + Handler: _FilesystemService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _FilesystemService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _FilesystemService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _FilesystemService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1alpha1/filesystem_service.proto", +} diff --git a/proto/nebius/compute/v1alpha1/gpu_cluster.pb.go b/proto/nebius/compute/v1alpha1/gpu_cluster.pb.go new file mode 100644 index 0000000..246ac47 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/gpu_cluster.pb.go @@ -0,0 +1,345 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/gpu_cluster.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +type GpuCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + Status *GpuClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *GpuCluster) Reset() { + *x = GpuCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuCluster) ProtoMessage() {} + +func (x *GpuCluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuCluster.ProtoReflect.Descriptor instead. +func (*GpuCluster) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuCluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuCluster) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuCluster) GetStatus() *GpuClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +type GpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + InfinibandFabric string `protobuf:"bytes,1,opt,name=infiniband_fabric,json=infinibandFabric,proto3" json:"infiniband_fabric,omitempty"` +} + +func (x *GpuClusterSpec) Reset() { + *x = GpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterSpec) ProtoMessage() {} + +func (x *GpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterSpec.ProtoReflect.Descriptor instead. +func (*GpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuClusterSpec) GetInfinibandFabric() string { + if x != nil { + return x.InfinibandFabric + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +type GpuClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + Instances []string `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` + // Indicates whether there is an ongoing operation + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. + Reconciling bool `protobuf:"varint,2,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *GpuClusterStatus) Reset() { + *x = GpuClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterStatus) ProtoMessage() {} + +func (x *GpuClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterStatus.ProtoReflect.Descriptor instead. +func (*GpuClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuClusterStatus) GetInstances() []string { + if x != nil { + return x.Instances + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster.proto is marked as deprecated. +func (x *GpuClusterStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1alpha1_gpu_cluster_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, + 0x0a, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x49, 0x0a, 0x0e, 0x47, + 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, + 0x11, 0x69, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x62, 0x72, + 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0xba, 0x4a, 0x01, 0x02, 0x52, 0x10, 0x69, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x62, 0x61, 0x6e, 0x64, + 0x46, 0x61, 0x62, 0x72, 0x69, 0x63, 0x22, 0x52, 0x0a, 0x10, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, + 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x42, 0x6d, 0x0a, 0x1e, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x47, 0x70, + 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescData = file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1alpha1_gpu_cluster_proto_goTypes = []any{ + (*GpuCluster)(nil), // 0: nebius.compute.v1alpha1.GpuCluster + (*GpuClusterSpec)(nil), // 1: nebius.compute.v1alpha1.GpuClusterSpec + (*GpuClusterStatus)(nil), // 2: nebius.compute.v1alpha1.GpuClusterStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1alpha1_gpu_cluster_proto_depIdxs = []int32{ + 3, // 0: nebius.compute.v1alpha1.GpuCluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.compute.v1alpha1.GpuCluster.spec:type_name -> nebius.compute.v1alpha1.GpuClusterSpec + 2, // 2: nebius.compute.v1alpha1.GpuCluster.status:type_name -> nebius.compute.v1alpha1.GpuClusterStatus + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_gpu_cluster_proto_init() } +func file_nebius_compute_v1alpha1_gpu_cluster_proto_init() { + if File_nebius_compute_v1alpha1_gpu_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GpuCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1alpha1_gpu_cluster_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_gpu_cluster_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_gpu_cluster_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_gpu_cluster_proto = out.File + file_nebius_compute_v1alpha1_gpu_cluster_proto_rawDesc = nil + file_nebius_compute_v1alpha1_gpu_cluster_proto_goTypes = nil + file_nebius_compute_v1alpha1_gpu_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/gpu_cluster.sensitive.pb.go b/proto/nebius/compute/v1alpha1/gpu_cluster.sensitive.pb.go new file mode 100644 index 0000000..981f1b4 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/gpu_cluster.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GpuCluster) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuCluster) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/gpu_cluster_service.pb.go b/proto/nebius/compute/v1alpha1/gpu_cluster_service.pb.go new file mode 100644 index 0000000..438b901 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/gpu_cluster_service.pb.go @@ -0,0 +1,653 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/gpu_cluster_service.proto is a deprecated file. + +package v1alpha1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type GetGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGpuClusterRequest) Reset() { + *x = GetGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGpuClusterRequest) ProtoMessage() {} + +func (x *GetGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*GetGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *GetGpuClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type ListGpuClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListGpuClustersRequest) Reset() { + *x = ListGpuClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGpuClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGpuClustersRequest) ProtoMessage() {} + +func (x *ListGpuClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGpuClustersRequest.ProtoReflect.Descriptor instead. +func (*ListGpuClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type CreateGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateGpuClusterRequest) Reset() { + *x = CreateGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGpuClusterRequest) ProtoMessage() {} + +func (x *CreateGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *CreateGpuClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *CreateGpuClusterRequest) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type UpdateGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Spec *GpuClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateGpuClusterRequest) Reset() { + *x = UpdateGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGpuClusterRequest) ProtoMessage() {} + +func (x *UpdateGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *UpdateGpuClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *UpdateGpuClusterRequest) GetSpec() *GpuClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type DeleteGpuClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteGpuClusterRequest) Reset() { + *x = DeleteGpuClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGpuClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGpuClusterRequest) ProtoMessage() {} + +func (x *DeleteGpuClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteGpuClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteGpuClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *DeleteGpuClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +type ListGpuClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + Items []*GpuCluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGpuClustersResponse) Reset() { + *x = ListGpuClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGpuClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGpuClustersResponse) ProtoMessage() {} + +func (x *ListGpuClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGpuClustersResponse.ProtoReflect.Descriptor instead. +func (*ListGpuClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersResponse) GetItems() []*GpuCluster { + if x != nil { + return x.Items + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/gpu_cluster_service.proto is marked as deprecated. +func (x *ListGpuClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1alpha1_gpu_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, + 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, + 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x96, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x3b, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x96, 0x01, + 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x7c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, + 0xd2, 0x05, 0x0a, 0x11, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x54, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, 0x75, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x70, + 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x5d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, + 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x03, 0x88, 0x02, 0x01, 0x42, 0x74, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x16, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescData = file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_compute_v1alpha1_gpu_cluster_service_proto_goTypes = []any{ + (*GetGpuClusterRequest)(nil), // 0: nebius.compute.v1alpha1.GetGpuClusterRequest + (*ListGpuClustersRequest)(nil), // 1: nebius.compute.v1alpha1.ListGpuClustersRequest + (*CreateGpuClusterRequest)(nil), // 2: nebius.compute.v1alpha1.CreateGpuClusterRequest + (*UpdateGpuClusterRequest)(nil), // 3: nebius.compute.v1alpha1.UpdateGpuClusterRequest + (*DeleteGpuClusterRequest)(nil), // 4: nebius.compute.v1alpha1.DeleteGpuClusterRequest + (*ListGpuClustersResponse)(nil), // 5: nebius.compute.v1alpha1.ListGpuClustersResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*GpuClusterSpec)(nil), // 7: nebius.compute.v1alpha1.GpuClusterSpec + (*GpuCluster)(nil), // 8: nebius.compute.v1alpha1.GpuCluster + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*v1alpha1.ListOperationsByParentRequest)(nil), // 10: nebius.common.v1alpha1.ListOperationsByParentRequest + (*v1alpha1.Operation)(nil), // 11: nebius.common.v1alpha1.Operation + (*v1alpha1.ListOperationsResponse)(nil), // 12: nebius.common.v1alpha1.ListOperationsResponse +} +var file_nebius_compute_v1alpha1_gpu_cluster_service_proto_depIdxs = []int32{ + 6, // 0: nebius.compute.v1alpha1.CreateGpuClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.compute.v1alpha1.CreateGpuClusterRequest.spec:type_name -> nebius.compute.v1alpha1.GpuClusterSpec + 6, // 2: nebius.compute.v1alpha1.UpdateGpuClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.compute.v1alpha1.UpdateGpuClusterRequest.spec:type_name -> nebius.compute.v1alpha1.GpuClusterSpec + 8, // 4: nebius.compute.v1alpha1.ListGpuClustersResponse.items:type_name -> nebius.compute.v1alpha1.GpuCluster + 0, // 5: nebius.compute.v1alpha1.GpuClusterService.Get:input_type -> nebius.compute.v1alpha1.GetGpuClusterRequest + 9, // 6: nebius.compute.v1alpha1.GpuClusterService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1alpha1.GpuClusterService.List:input_type -> nebius.compute.v1alpha1.ListGpuClustersRequest + 2, // 8: nebius.compute.v1alpha1.GpuClusterService.Create:input_type -> nebius.compute.v1alpha1.CreateGpuClusterRequest + 3, // 9: nebius.compute.v1alpha1.GpuClusterService.Update:input_type -> nebius.compute.v1alpha1.UpdateGpuClusterRequest + 4, // 10: nebius.compute.v1alpha1.GpuClusterService.Delete:input_type -> nebius.compute.v1alpha1.DeleteGpuClusterRequest + 10, // 11: nebius.compute.v1alpha1.GpuClusterService.ListOperationsByParent:input_type -> nebius.common.v1alpha1.ListOperationsByParentRequest + 8, // 12: nebius.compute.v1alpha1.GpuClusterService.Get:output_type -> nebius.compute.v1alpha1.GpuCluster + 8, // 13: nebius.compute.v1alpha1.GpuClusterService.GetByName:output_type -> nebius.compute.v1alpha1.GpuCluster + 5, // 14: nebius.compute.v1alpha1.GpuClusterService.List:output_type -> nebius.compute.v1alpha1.ListGpuClustersResponse + 11, // 15: nebius.compute.v1alpha1.GpuClusterService.Create:output_type -> nebius.common.v1alpha1.Operation + 11, // 16: nebius.compute.v1alpha1.GpuClusterService.Update:output_type -> nebius.common.v1alpha1.Operation + 11, // 17: nebius.compute.v1alpha1.GpuClusterService.Delete:output_type -> nebius.common.v1alpha1.Operation + 12, // 18: nebius.compute.v1alpha1.GpuClusterService.ListOperationsByParent:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_gpu_cluster_service_proto_init() } +func file_nebius_compute_v1alpha1_gpu_cluster_service_proto_init() { + if File_nebius_compute_v1alpha1_gpu_cluster_service_proto != nil { + return + } + file_nebius_compute_v1alpha1_gpu_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListGpuClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteGpuClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListGpuClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1alpha1_gpu_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_gpu_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_gpu_cluster_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_gpu_cluster_service_proto = out.File + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_rawDesc = nil + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_goTypes = nil + file_nebius_compute_v1alpha1_gpu_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/gpu_cluster_service.sensitive.pb.go b/proto/nebius/compute/v1alpha1/gpu_cluster_service.sensitive.pb.go new file mode 100644 index 0000000..67e8505 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/gpu_cluster_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGpuClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGpuClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteGpuClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteGpuClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGpuClustersResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGpuClustersResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/gpu_cluster_service_grpc.pb.go b/proto/nebius/compute/v1alpha1/gpu_cluster_service_grpc.pb.go new file mode 100644 index 0000000..e171851 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/gpu_cluster_service_grpc.pb.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/compute/v1alpha1/gpu_cluster_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GpuClusterService_Get_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/Get" + GpuClusterService_GetByName_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/GetByName" + GpuClusterService_List_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/List" + GpuClusterService_Create_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/Create" + GpuClusterService_Update_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/Update" + GpuClusterService_Delete_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/Delete" + GpuClusterService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1alpha1.GpuClusterService/ListOperationsByParent" +) + +// GpuClusterServiceClient is the client API for GpuClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type GpuClusterServiceClient interface { + Get(ctx context.Context, in *GetGpuClusterRequest, opts ...grpc.CallOption) (*GpuCluster, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*GpuCluster, error) + List(ctx context.Context, in *ListGpuClustersRequest, opts ...grpc.CallOption) (*ListGpuClustersResponse, error) + Create(ctx context.Context, in *CreateGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) +} + +type gpuClusterServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewGpuClusterServiceClient(cc grpc.ClientConnInterface) GpuClusterServiceClient { + return &gpuClusterServiceClient{cc} +} + +func (c *gpuClusterServiceClient) Get(ctx context.Context, in *GetGpuClusterRequest, opts ...grpc.CallOption) (*GpuCluster, error) { + out := new(GpuCluster) + err := c.cc.Invoke(ctx, GpuClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*GpuCluster, error) { + out := new(GpuCluster) + err := c.cc.Invoke(ctx, GpuClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) List(ctx context.Context, in *ListGpuClustersRequest, opts ...grpc.CallOption) (*ListGpuClustersResponse, error) { + out := new(ListGpuClustersResponse) + err := c.cc.Invoke(ctx, GpuClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Create(ctx context.Context, in *CreateGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Update(ctx context.Context, in *UpdateGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) Delete(ctx context.Context, in *DeleteGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, GpuClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gpuClusterServiceClient) ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + out := new(v1alpha1.ListOperationsResponse) + err := c.cc.Invoke(ctx, GpuClusterService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GpuClusterServiceServer is the server API for GpuClusterService service. +// All implementations should embed UnimplementedGpuClusterServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type GpuClusterServiceServer interface { + Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error) + GetByName(context.Context, *v1.GetByNameRequest) (*GpuCluster, error) + List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error) + Create(context.Context, *CreateGpuClusterRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateGpuClusterRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteGpuClusterRequest) (*v1alpha1.Operation, error) + ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) +} + +// UnimplementedGpuClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGpuClusterServiceServer struct { +} + +func (UnimplementedGpuClusterServiceServer) Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedGpuClusterServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*GpuCluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedGpuClusterServiceServer) List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedGpuClusterServiceServer) Create(context.Context, *CreateGpuClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedGpuClusterServiceServer) Update(context.Context, *UpdateGpuClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedGpuClusterServiceServer) Delete(context.Context, *DeleteGpuClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedGpuClusterServiceServer) ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeGpuClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GpuClusterServiceServer will +// result in compilation errors. +type UnsafeGpuClusterServiceServer interface { + mustEmbedUnimplementedGpuClusterServiceServer() +} + +// Deprecated: Do not use. +func RegisterGpuClusterServiceServer(s grpc.ServiceRegistrar, srv GpuClusterServiceServer) { + s.RegisterService(&GpuClusterService_ServiceDesc, srv) +} + +func _GpuClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Get(ctx, req.(*GetGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGpuClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).List(ctx, req.(*ListGpuClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Create(ctx, req.(*CreateGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Update(ctx, req.(*UpdateGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGpuClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).Delete(ctx, req.(*DeleteGpuClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GpuClusterService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GpuClusterServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GpuClusterService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GpuClusterServiceServer).ListOperationsByParent(ctx, req.(*v1alpha1.ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GpuClusterService_ServiceDesc is the grpc.ServiceDesc for GpuClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GpuClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1alpha1.GpuClusterService", + HandlerType: (*GpuClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _GpuClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _GpuClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _GpuClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _GpuClusterService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _GpuClusterService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _GpuClusterService_Delete_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _GpuClusterService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1alpha1/gpu_cluster_service.proto", +} diff --git a/proto/nebius/compute/v1alpha1/image.pb.go b/proto/nebius/compute/v1alpha1/image.pb.go new file mode 100644 index 0000000..fe8e02f --- /dev/null +++ b/proto/nebius/compute/v1alpha1/image.pb.go @@ -0,0 +1,481 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/image.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +type ImageStatus_State int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_UNSPECIFIED ImageStatus_State = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_CREATING ImageStatus_State = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_READY ImageStatus_State = 2 + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_UPDATING ImageStatus_State = 3 + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_DELETING ImageStatus_State = 4 + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageStatus_ERROR ImageStatus_State = 5 +) + +// Enum value maps for ImageStatus_State. +var ( + ImageStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "UPDATING", + 4: "DELETING", + 5: "ERROR", + } + ImageStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5, + } +) + +func (x ImageStatus_State) Enum() *ImageStatus_State { + p := new(ImageStatus_State) + *p = x + return p +} + +func (x ImageStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ImageStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_image_proto_enumTypes[0].Descriptor() +} + +func (ImageStatus_State) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_image_proto_enumTypes[0] +} + +func (x ImageStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ImageStatus_State.Descriptor instead. +func (ImageStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_proto_rawDescGZIP(), []int{2, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Spec *ImageSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Status *ImageStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *Image) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *Image) GetSpec() *ImageSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *Image) GetStatus() *ImageStatus { + if x != nil { + return x.Status + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +type ImageSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Description *string `protobuf:"bytes,1,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + ImageFamily string `protobuf:"bytes,2,opt,name=image_family,json=imageFamily,proto3" json:"image_family,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *ImageSpec) Reset() { + *x = ImageSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageSpec) ProtoMessage() {} + +func (x *ImageSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageSpec.ProtoReflect.Descriptor instead. +func (*ImageSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageSpec) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageSpec) GetImageFamily() string { + if x != nil { + return x.ImageFamily + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +type ImageStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + State ImageStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1alpha1.ImageStatus_State" json:"state,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + StateDescription string `protobuf:"bytes,2,opt,name=state_description,json=stateDescription,proto3" json:"state_description,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + StorageSizeBytes int64 `protobuf:"varint,3,opt,name=storage_size_bytes,json=storageSizeBytes,proto3" json:"storage_size_bytes,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + MinDiskSizeBytes int64 `protobuf:"varint,4,opt,name=min_disk_size_bytes,json=minDiskSizeBytes,proto3" json:"min_disk_size_bytes,omitempty"` + // Indicates whether there is an ongoing operation + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. + Reconciling bool `protobuf:"varint,5,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *ImageStatus) Reset() { + *x = ImageStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageStatus) ProtoMessage() {} + +func (x *ImageStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageStatus.ProtoReflect.Descriptor instead. +func (*ImageStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageStatus) GetState() ImageStatus_State { + if x != nil { + return x.State + } + return ImageStatus_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageStatus) GetStateDescription() string { + if x != nil { + return x.StateDescription + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageStatus) GetStorageSizeBytes() int64 { + if x != nil { + return x.StorageSizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageStatus) GetMinDiskSizeBytes() int64 { + if x != nil { + return x.MinDiskSizeBytes + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image.proto is marked as deprecated. +func (x *ImageStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1alpha1_image_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_image_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x05, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3c, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, + 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x1e, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd5, 0x02, + 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x6d, 0x69, + 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, + 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x68, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_image_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_image_proto_rawDescData = file_nebius_compute_v1alpha1_image_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_image_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_image_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_image_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_image_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_image_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_image_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_compute_v1alpha1_image_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_compute_v1alpha1_image_proto_goTypes = []any{ + (ImageStatus_State)(0), // 0: nebius.compute.v1alpha1.ImageStatus.State + (*Image)(nil), // 1: nebius.compute.v1alpha1.Image + (*ImageSpec)(nil), // 2: nebius.compute.v1alpha1.ImageSpec + (*ImageStatus)(nil), // 3: nebius.compute.v1alpha1.ImageStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata +} +var file_nebius_compute_v1alpha1_image_proto_depIdxs = []int32{ + 4, // 0: nebius.compute.v1alpha1.Image.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.compute.v1alpha1.Image.spec:type_name -> nebius.compute.v1alpha1.ImageSpec + 3, // 2: nebius.compute.v1alpha1.Image.status:type_name -> nebius.compute.v1alpha1.ImageStatus + 0, // 3: nebius.compute.v1alpha1.ImageStatus.state:type_name -> nebius.compute.v1alpha1.ImageStatus.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_image_proto_init() } +func file_nebius_compute_v1alpha1_image_proto_init() { + if File_nebius_compute_v1alpha1_image_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_image_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_image_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ImageSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_image_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ImageStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1alpha1_image_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_image_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1alpha1_image_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_image_proto_depIdxs, + EnumInfos: file_nebius_compute_v1alpha1_image_proto_enumTypes, + MessageInfos: file_nebius_compute_v1alpha1_image_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_image_proto = out.File + file_nebius_compute_v1alpha1_image_proto_rawDesc = nil + file_nebius_compute_v1alpha1_image_proto_goTypes = nil + file_nebius_compute_v1alpha1_image_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/image.sensitive.pb.go b/proto/nebius/compute/v1alpha1/image.sensitive.pb.go new file mode 100644 index 0000000..d348988 --- /dev/null +++ b/proto/nebius/compute/v1alpha1/image.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Image) Sanitize() // is not generated as no sensitive fields found +// func (x *Image) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ImageSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ImageSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ImageStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ImageStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/image_service.pb.go b/proto/nebius/compute/v1alpha1/image_service.pb.go new file mode 100644 index 0000000..c970a7c --- /dev/null +++ b/proto/nebius/compute/v1alpha1/image_service.pb.go @@ -0,0 +1,472 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/image_service.proto is a deprecated file. + +package v1alpha1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +type GetImageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetImageRequest) Reset() { + *x = GetImageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageRequest) ProtoMessage() {} + +func (x *GetImageRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageRequest.ProtoReflect.Descriptor instead. +func (*GetImageRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *GetImageRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +type GetImageLatestByFamilyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + ImageFamily string `protobuf:"bytes,1,opt,name=image_family,json=imageFamily,proto3" json:"image_family,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` // default 'project-{region}public-images' +} + +func (x *GetImageLatestByFamilyRequest) Reset() { + *x = GetImageLatestByFamilyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageLatestByFamilyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageLatestByFamilyRequest) ProtoMessage() {} + +func (x *GetImageLatestByFamilyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageLatestByFamilyRequest.ProtoReflect.Descriptor instead. +func (*GetImageLatestByFamilyRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *GetImageLatestByFamilyRequest) GetImageFamily() string { + if x != nil { + return x.ImageFamily + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *GetImageLatestByFamilyRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +type ListImagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListImagesRequest) Reset() { + *x = ListImagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListImagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListImagesRequest) ProtoMessage() {} + +func (x *ListImagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListImagesRequest.ProtoReflect.Descriptor instead. +func (*ListImagesRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +type ListImagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + Items []*Image `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListImagesResponse) Reset() { + *x = ListImagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListImagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListImagesResponse) ProtoMessage() {} + +func (x *ListImagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_image_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListImagesResponse.ProtoReflect.Descriptor instead. +func (*ListImagesResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_image_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesResponse) GetItems() []*Image { + if x != nil { + return x.Items + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/image_service.proto is marked as deprecated. +func (x *ListImagesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_compute_v1alpha1_image_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_image_service_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x5f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x42, 0x79, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x61, 0x6d, + 0x69, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x22, 0x84, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x72, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x84, 0x04, 0x0a, 0x0c, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x4f, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x6b, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x46, 0x61, 0x6d, + 0x69, 0x6c, 0x79, 0x12, 0x36, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x46, 0x61, + 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x03, 0x88, + 0x02, 0x01, 0x42, 0x6f, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x42, 0x11, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_image_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_image_service_proto_rawDescData = file_nebius_compute_v1alpha1_image_service_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_image_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_image_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_image_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_image_service_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_image_service_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_image_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_compute_v1alpha1_image_service_proto_goTypes = []any{ + (*GetImageRequest)(nil), // 0: nebius.compute.v1alpha1.GetImageRequest + (*GetImageLatestByFamilyRequest)(nil), // 1: nebius.compute.v1alpha1.GetImageLatestByFamilyRequest + (*ListImagesRequest)(nil), // 2: nebius.compute.v1alpha1.ListImagesRequest + (*ListImagesResponse)(nil), // 3: nebius.compute.v1alpha1.ListImagesResponse + (*Image)(nil), // 4: nebius.compute.v1alpha1.Image + (*v1.GetByNameRequest)(nil), // 5: nebius.common.v1.GetByNameRequest + (*v1alpha1.ListOperationsByParentRequest)(nil), // 6: nebius.common.v1alpha1.ListOperationsByParentRequest + (*v1alpha1.ListOperationsResponse)(nil), // 7: nebius.common.v1alpha1.ListOperationsResponse +} +var file_nebius_compute_v1alpha1_image_service_proto_depIdxs = []int32{ + 4, // 0: nebius.compute.v1alpha1.ListImagesResponse.items:type_name -> nebius.compute.v1alpha1.Image + 0, // 1: nebius.compute.v1alpha1.ImageService.Get:input_type -> nebius.compute.v1alpha1.GetImageRequest + 5, // 2: nebius.compute.v1alpha1.ImageService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 3: nebius.compute.v1alpha1.ImageService.GetLatestByFamily:input_type -> nebius.compute.v1alpha1.GetImageLatestByFamilyRequest + 2, // 4: nebius.compute.v1alpha1.ImageService.List:input_type -> nebius.compute.v1alpha1.ListImagesRequest + 6, // 5: nebius.compute.v1alpha1.ImageService.ListOperationsByParent:input_type -> nebius.common.v1alpha1.ListOperationsByParentRequest + 4, // 6: nebius.compute.v1alpha1.ImageService.Get:output_type -> nebius.compute.v1alpha1.Image + 4, // 7: nebius.compute.v1alpha1.ImageService.GetByName:output_type -> nebius.compute.v1alpha1.Image + 4, // 8: nebius.compute.v1alpha1.ImageService.GetLatestByFamily:output_type -> nebius.compute.v1alpha1.Image + 3, // 9: nebius.compute.v1alpha1.ImageService.List:output_type -> nebius.compute.v1alpha1.ListImagesResponse + 7, // 10: nebius.compute.v1alpha1.ImageService.ListOperationsByParent:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_image_service_proto_init() } +func file_nebius_compute_v1alpha1_image_service_proto_init() { + if File_nebius_compute_v1alpha1_image_service_proto != nil { + return + } + file_nebius_compute_v1alpha1_image_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_image_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetImageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_image_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetImageLatestByFamilyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_image_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListImagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_image_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListImagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_image_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1alpha1_image_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_image_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_image_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_image_service_proto = out.File + file_nebius_compute_v1alpha1_image_service_proto_rawDesc = nil + file_nebius_compute_v1alpha1_image_service_proto_goTypes = nil + file_nebius_compute_v1alpha1_image_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/image_service.sensitive.pb.go b/proto/nebius/compute/v1alpha1/image_service.sensitive.pb.go new file mode 100644 index 0000000..01bad9d --- /dev/null +++ b/proto/nebius/compute/v1alpha1/image_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetImageRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetImageRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetImageLatestByFamilyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetImageLatestByFamilyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListImagesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListImagesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListImagesResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListImagesResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/image_service_grpc.pb.go b/proto/nebius/compute/v1alpha1/image_service_grpc.pb.go new file mode 100644 index 0000000..ea6802e --- /dev/null +++ b/proto/nebius/compute/v1alpha1/image_service_grpc.pb.go @@ -0,0 +1,263 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/compute/v1alpha1/image_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ImageService_Get_FullMethodName = "/nebius.compute.v1alpha1.ImageService/Get" + ImageService_GetByName_FullMethodName = "/nebius.compute.v1alpha1.ImageService/GetByName" + ImageService_GetLatestByFamily_FullMethodName = "/nebius.compute.v1alpha1.ImageService/GetLatestByFamily" + ImageService_List_FullMethodName = "/nebius.compute.v1alpha1.ImageService/List" + ImageService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1alpha1.ImageService/ListOperationsByParent" +) + +// ImageServiceClient is the client API for ImageService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type ImageServiceClient interface { + Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*Image, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Image, error) + GetLatestByFamily(ctx context.Context, in *GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*Image, error) + List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) + ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) +} + +type imageServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewImageServiceClient(cc grpc.ClientConnInterface) ImageServiceClient { + return &imageServiceClient{cc} +} + +func (c *imageServiceClient) Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) GetLatestByFamily(ctx context.Context, in *GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*Image, error) { + out := new(Image) + err := c.cc.Invoke(ctx, ImageService_GetLatestByFamily_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { + out := new(ListImagesResponse) + err := c.cc.Invoke(ctx, ImageService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imageServiceClient) ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + out := new(v1alpha1.ListOperationsResponse) + err := c.cc.Invoke(ctx, ImageService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ImageServiceServer is the server API for ImageService service. +// All implementations should embed UnimplementedImageServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type ImageServiceServer interface { + Get(context.Context, *GetImageRequest) (*Image, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Image, error) + GetLatestByFamily(context.Context, *GetImageLatestByFamilyRequest) (*Image, error) + List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) + ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) +} + +// UnimplementedImageServiceServer should be embedded to have forward compatible implementations. +type UnimplementedImageServiceServer struct { +} + +func (UnimplementedImageServiceServer) Get(context.Context, *GetImageRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedImageServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedImageServiceServer) GetLatestByFamily(context.Context, *GetImageLatestByFamilyRequest) (*Image, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestByFamily not implemented") +} +func (UnimplementedImageServiceServer) List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedImageServiceServer) ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeImageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ImageServiceServer will +// result in compilation errors. +type UnsafeImageServiceServer interface { + mustEmbedUnimplementedImageServiceServer() +} + +// Deprecated: Do not use. +func RegisterImageServiceServer(s grpc.ServiceRegistrar, srv ImageServiceServer) { + s.RegisterService(&ImageService_ServiceDesc, srv) +} + +func _ImageService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).Get(ctx, req.(*GetImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_GetLatestByFamily_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImageLatestByFamilyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).GetLatestByFamily(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_GetLatestByFamily_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).GetLatestByFamily(ctx, req.(*GetImageLatestByFamilyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListImagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).List(ctx, req.(*ListImagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ImageService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ImageServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ImageService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ImageServiceServer).ListOperationsByParent(ctx, req.(*v1alpha1.ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ImageService_ServiceDesc is the grpc.ServiceDesc for ImageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ImageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1alpha1.ImageService", + HandlerType: (*ImageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ImageService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ImageService_GetByName_Handler, + }, + { + MethodName: "GetLatestByFamily", + Handler: _ImageService_GetLatestByFamily_Handler, + }, + { + MethodName: "List", + Handler: _ImageService_List_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _ImageService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1alpha1/image_service.proto", +} diff --git a/proto/nebius/compute/v1alpha1/instance.pb.go b/proto/nebius/compute/v1alpha1/instance.pb.go new file mode 100644 index 0000000..5ee12aa --- /dev/null +++ b/proto/nebius/compute/v1alpha1/instance.pb.go @@ -0,0 +1,1320 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/instance.proto is a deprecated file. + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type InstanceRecoveryPolicy int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceRecoveryPolicy_RECOVER InstanceRecoveryPolicy = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceRecoveryPolicy_FAIL InstanceRecoveryPolicy = 1 +) + +// Enum value maps for InstanceRecoveryPolicy. +var ( + InstanceRecoveryPolicy_name = map[int32]string{ + 0: "RECOVER", + 1: "FAIL", + } + InstanceRecoveryPolicy_value = map[string]int32{ + "RECOVER": 0, + "FAIL": 1, + } +) + +func (x InstanceRecoveryPolicy) Enum() *InstanceRecoveryPolicy { + p := new(InstanceRecoveryPolicy) + *p = x + return p +} + +func (x InstanceRecoveryPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InstanceRecoveryPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_instance_proto_enumTypes[0].Descriptor() +} + +func (InstanceRecoveryPolicy) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_instance_proto_enumTypes[0] +} + +func (x InstanceRecoveryPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InstanceRecoveryPolicy.Descriptor instead. +func (InstanceRecoveryPolicy) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type AttachedDiskSpec_AttachMode int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedDiskSpec_UNSPECIFIED AttachedDiskSpec_AttachMode = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedDiskSpec_READ_ONLY AttachedDiskSpec_AttachMode = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedDiskSpec_READ_WRITE AttachedDiskSpec_AttachMode = 2 +) + +// Enum value maps for AttachedDiskSpec_AttachMode. +var ( + AttachedDiskSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedDiskSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedDiskSpec_AttachMode) Enum() *AttachedDiskSpec_AttachMode { + p := new(AttachedDiskSpec_AttachMode) + *p = x + return p +} + +func (x AttachedDiskSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedDiskSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_instance_proto_enumTypes[1].Descriptor() +} + +func (AttachedDiskSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_instance_proto_enumTypes[1] +} + +func (x AttachedDiskSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedDiskSpec_AttachMode.Descriptor instead. +func (AttachedDiskSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{4, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type AttachedFilesystemSpec_AttachMode int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedFilesystemSpec_UNSPECIFIED AttachedFilesystemSpec_AttachMode = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedFilesystemSpec_READ_ONLY AttachedFilesystemSpec_AttachMode = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachedFilesystemSpec_READ_WRITE AttachedFilesystemSpec_AttachMode = 2 +) + +// Enum value maps for AttachedFilesystemSpec_AttachMode. +var ( + AttachedFilesystemSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedFilesystemSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedFilesystemSpec_AttachMode) Enum() *AttachedFilesystemSpec_AttachMode { + p := new(AttachedFilesystemSpec_AttachMode) + *p = x + return p +} + +func (x AttachedFilesystemSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedFilesystemSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_instance_proto_enumTypes[2].Descriptor() +} + +func (AttachedFilesystemSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_instance_proto_enumTypes[2] +} + +func (x AttachedFilesystemSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedFilesystemSpec_AttachMode.Descriptor instead. +func (AttachedFilesystemSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{7, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type InstanceStatus_InstanceState int32 + +const ( + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_UNSPECIFIED InstanceStatus_InstanceState = 0 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_CREATING InstanceStatus_InstanceState = 1 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_UPDATING InstanceStatus_InstanceState = 2 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_STARTING InstanceStatus_InstanceState = 3 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_RUNNING InstanceStatus_InstanceState = 4 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_STOPPING InstanceStatus_InstanceState = 5 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_STOPPED InstanceStatus_InstanceState = 6 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_DELETING InstanceStatus_InstanceState = 7 + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + InstanceStatus_ERROR InstanceStatus_InstanceState = 8 +) + +// Enum value maps for InstanceStatus_InstanceState. +var ( + InstanceStatus_InstanceState_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "CREATING", + 2: "UPDATING", + 3: "STARTING", + 4: "RUNNING", + 5: "STOPPING", + 6: "STOPPED", + 7: "DELETING", + 8: "ERROR", + } + InstanceStatus_InstanceState_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 1, + "UPDATING": 2, + "STARTING": 3, + "RUNNING": 4, + "STOPPING": 5, + "STOPPED": 6, + "DELETING": 7, + "ERROR": 8, + } +) + +func (x InstanceStatus_InstanceState) Enum() *InstanceStatus_InstanceState { + p := new(InstanceStatus_InstanceState) + *p = x + return p +} + +func (x InstanceStatus_InstanceState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InstanceStatus_InstanceState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_compute_v1alpha1_instance_proto_enumTypes[3].Descriptor() +} + +func (InstanceStatus_InstanceState) Type() protoreflect.EnumType { + return &file_nebius_compute_v1alpha1_instance_proto_enumTypes[3] +} + +func (x InstanceStatus_InstanceState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InstanceStatus_InstanceState.Descriptor instead. +func (InstanceStatus_InstanceState) EnumDescriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{8, 0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type Instance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Status *InstanceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Instance) Reset() { + *x = Instance{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Instance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instance) ProtoMessage() {} + +func (x *Instance) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Instance.ProtoReflect.Descriptor instead. +func (*Instance) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *Instance) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *Instance) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *Instance) GetStatus() *InstanceStatus { + if x != nil { + return x.Status + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type InstanceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + ServiceAccountId string `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Resources *ResourcesSpec `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + GpuCluster *InstanceGpuClusterSpec `protobuf:"bytes,3,opt,name=gpu_cluster,json=gpuCluster,proto3" json:"gpu_cluster,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + NetworkInterfaces []*v1alpha1.NetworkInterfaceSpec `protobuf:"bytes,4,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + BootDisk *AttachedDiskSpec `protobuf:"bytes,5,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + SecondaryDisks []*AttachedDiskSpec `protobuf:"bytes,6,rep,name=secondary_disks,json=secondaryDisks,proto3" json:"secondary_disks,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Filesystems []*AttachedFilesystemSpec `protobuf:"bytes,7,rep,name=filesystems,proto3" json:"filesystems,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + CloudInitUserData string `protobuf:"bytes,8,opt,name=cloud_init_user_data,json=cloudInitUserData,proto3" json:"cloud_init_user_data,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Stopped bool `protobuf:"varint,13,opt,name=stopped,proto3" json:"stopped,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + RecoveryPolicy InstanceRecoveryPolicy `protobuf:"varint,15,opt,name=recovery_policy,json=recoveryPolicy,proto3,enum=nebius.compute.v1alpha1.InstanceRecoveryPolicy" json:"recovery_policy,omitempty"` +} + +func (x *InstanceSpec) Reset() { + *x = InstanceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceSpec) ProtoMessage() {} + +func (x *InstanceSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceSpec.ProtoReflect.Descriptor instead. +func (*InstanceSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetResources() *ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetGpuCluster() *InstanceGpuClusterSpec { + if x != nil { + return x.GpuCluster + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetNetworkInterfaces() []*v1alpha1.NetworkInterfaceSpec { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetBootDisk() *AttachedDiskSpec { + if x != nil { + return x.BootDisk + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetSecondaryDisks() []*AttachedDiskSpec { + if x != nil { + return x.SecondaryDisks + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetFilesystems() []*AttachedFilesystemSpec { + if x != nil { + return x.Filesystems + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetCloudInitUserData() string { + if x != nil { + return x.CloudInitUserData + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetStopped() bool { + if x != nil { + return x.Stopped + } + return false +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceSpec) GetRecoveryPolicy() InstanceRecoveryPolicy { + if x != nil { + return x.RecoveryPolicy + } + return InstanceRecoveryPolicy_RECOVER +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type ResourcesSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + // Types that are assignable to Size: + // + // *ResourcesSpec_Preset + Size isResourcesSpec_Size `protobuf_oneof:"size"` +} + +func (x *ResourcesSpec) Reset() { + *x = ResourcesSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesSpec) ProtoMessage() {} + +func (x *ResourcesSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesSpec.ProtoReflect.Descriptor instead. +func (*ResourcesSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *ResourcesSpec) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (m *ResourcesSpec) GetSize() isResourcesSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *ResourcesSpec) GetPreset() string { + if x, ok := x.GetSize().(*ResourcesSpec_Preset); ok { + return x.Preset + } + return "" +} + +type isResourcesSpec_Size interface { + isResourcesSpec_Size() +} + +type ResourcesSpec_Preset struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Preset string `protobuf:"bytes,2,opt,name=preset,proto3,oneof"` +} + +func (*ResourcesSpec_Preset) isResourcesSpec_Size() {} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type InstanceGpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *InstanceGpuClusterSpec) Reset() { + *x = InstanceGpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceGpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceGpuClusterSpec) ProtoMessage() {} + +func (x *InstanceGpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceGpuClusterSpec.ProtoReflect.Descriptor instead. +func (*InstanceGpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceGpuClusterSpec) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type AttachedDiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachMode AttachedDiskSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.compute.v1alpha1.AttachedDiskSpec_AttachMode" json:"attach_mode,omitempty"` + // Types that are assignable to Type: + // + // *AttachedDiskSpec_ExistingDisk + Type isAttachedDiskSpec_Type `protobuf_oneof:"type"` + // Specifies the user-defined identifier, allowing to use '/dev/disk/by-id/virtio-{device_name}' as a device path in mount command. + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` +} + +func (x *AttachedDiskSpec) Reset() { + *x = AttachedDiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedDiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedDiskSpec) ProtoMessage() {} + +func (x *AttachedDiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedDiskSpec.ProtoReflect.Descriptor instead. +func (*AttachedDiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedDiskSpec) GetAttachMode() AttachedDiskSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedDiskSpec_UNSPECIFIED +} + +func (m *AttachedDiskSpec) GetType() isAttachedDiskSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedDiskSpec) GetExistingDisk() *ExistingDisk { + if x, ok := x.GetType().(*AttachedDiskSpec_ExistingDisk); ok { + return x.ExistingDisk + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedDiskSpec) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +type isAttachedDiskSpec_Type interface { + isAttachedDiskSpec_Type() +} + +type AttachedDiskSpec_ExistingDisk struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + ExistingDisk *ExistingDisk `protobuf:"bytes,2,opt,name=existing_disk,json=existingDisk,proto3,oneof"` +} + +func (*AttachedDiskSpec_ExistingDisk) isAttachedDiskSpec_Type() {} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type ExistingDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingDisk) Reset() { + *x = ExistingDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingDisk) ProtoMessage() {} + +func (x *ExistingDisk) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingDisk.ProtoReflect.Descriptor instead. +func (*ExistingDisk) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *ExistingDisk) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type ExistingFilesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingFilesystem) Reset() { + *x = ExistingFilesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingFilesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingFilesystem) ProtoMessage() {} + +func (x *ExistingFilesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingFilesystem.ProtoReflect.Descriptor instead. +func (*ExistingFilesystem) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{6} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *ExistingFilesystem) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type AttachedFilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + AttachMode AttachedFilesystemSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.compute.v1alpha1.AttachedFilesystemSpec_AttachMode" json:"attach_mode,omitempty"` + // Specifies the user-defined identifier, allowing to use it as a device in mount command. + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + DeviceName string `protobuf:"bytes,2,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + // Types that are assignable to Type: + // + // *AttachedFilesystemSpec_ExistingFilesystem + Type isAttachedFilesystemSpec_Type `protobuf_oneof:"type"` +} + +func (x *AttachedFilesystemSpec) Reset() { + *x = AttachedFilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedFilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedFilesystemSpec) ProtoMessage() {} + +func (x *AttachedFilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedFilesystemSpec.ProtoReflect.Descriptor instead. +func (*AttachedFilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{7} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedFilesystemSpec) GetAttachMode() AttachedFilesystemSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedFilesystemSpec_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedFilesystemSpec) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +func (m *AttachedFilesystemSpec) GetType() isAttachedFilesystemSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *AttachedFilesystemSpec) GetExistingFilesystem() *ExistingFilesystem { + if x, ok := x.GetType().(*AttachedFilesystemSpec_ExistingFilesystem); ok { + return x.ExistingFilesystem + } + return nil +} + +type isAttachedFilesystemSpec_Type interface { + isAttachedFilesystemSpec_Type() +} + +type AttachedFilesystemSpec_ExistingFilesystem struct { + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + ExistingFilesystem *ExistingFilesystem `protobuf:"bytes,3,opt,name=existing_filesystem,json=existingFilesystem,proto3,oneof"` +} + +func (*AttachedFilesystemSpec_ExistingFilesystem) isAttachedFilesystemSpec_Type() {} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +type InstanceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + State InstanceStatus_InstanceState `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.compute.v1alpha1.InstanceStatus_InstanceState" json:"state,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + NetworkInterfaces []*v1alpha1.NetworkInterfaceStatus `protobuf:"bytes,2,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + // Indicates whether there is an ongoing operation + // + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. + Reconciling bool `protobuf:"varint,5,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *InstanceStatus) Reset() { + *x = InstanceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstanceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstanceStatus) ProtoMessage() {} + +func (x *InstanceStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstanceStatus.ProtoReflect.Descriptor instead. +func (*InstanceStatus) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP(), []int{8} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceStatus) GetState() InstanceStatus_InstanceState { + if x != nil { + return x.State + } + return InstanceStatus_UNSPECIFIED +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceStatus) GetNetworkInterfaces() []*v1alpha1.NetworkInterfaceStatus { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance.proto is marked as deprecated. +func (x *InstanceStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_compute_v1alpha1_instance_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_instance_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3f, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0x83, 0x06, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x32, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0b, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x47, 0x70, + 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x52, 0x0a, 0x67, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x64, + 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, + 0x02, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x73, + 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x12, 0x52, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x5f, + 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, + 0x79, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x57, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x02, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x34, 0x0a, 0x14, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, + 0x4a, 0x01, 0x52, 0x11, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x12, + 0x5e, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, + 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, 0x4d, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb6, + 0x02, 0x0a, 0x10, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x5d, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x73, 0x6b, 0x53, + 0x70, 0x65, 0x63, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x69, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, + 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, + 0x12, 0x28, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x14, 0x52, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, + 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x42, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x26, 0x0a, 0x0c, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd3, 0x02, + 0x0a, 0x16, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, + 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, + 0x54, 0x45, 0x10, 0x02, 0x42, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, + 0x02, 0x08, 0x01, 0x22, 0xe9, 0x02, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x11, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, + 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, + 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, + 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, + 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x08, 0x2a, + 0x2f, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x43, + 0x4f, 0x56, 0x45, 0x52, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x01, + 0x42, 0x6b, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x0d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_instance_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_instance_proto_rawDescData = file_nebius_compute_v1alpha1_instance_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_instance_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_instance_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_instance_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_instance_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_nebius_compute_v1alpha1_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_compute_v1alpha1_instance_proto_goTypes = []any{ + (InstanceRecoveryPolicy)(0), // 0: nebius.compute.v1alpha1.InstanceRecoveryPolicy + (AttachedDiskSpec_AttachMode)(0), // 1: nebius.compute.v1alpha1.AttachedDiskSpec.AttachMode + (AttachedFilesystemSpec_AttachMode)(0), // 2: nebius.compute.v1alpha1.AttachedFilesystemSpec.AttachMode + (InstanceStatus_InstanceState)(0), // 3: nebius.compute.v1alpha1.InstanceStatus.InstanceState + (*Instance)(nil), // 4: nebius.compute.v1alpha1.Instance + (*InstanceSpec)(nil), // 5: nebius.compute.v1alpha1.InstanceSpec + (*ResourcesSpec)(nil), // 6: nebius.compute.v1alpha1.ResourcesSpec + (*InstanceGpuClusterSpec)(nil), // 7: nebius.compute.v1alpha1.InstanceGpuClusterSpec + (*AttachedDiskSpec)(nil), // 8: nebius.compute.v1alpha1.AttachedDiskSpec + (*ExistingDisk)(nil), // 9: nebius.compute.v1alpha1.ExistingDisk + (*ExistingFilesystem)(nil), // 10: nebius.compute.v1alpha1.ExistingFilesystem + (*AttachedFilesystemSpec)(nil), // 11: nebius.compute.v1alpha1.AttachedFilesystemSpec + (*InstanceStatus)(nil), // 12: nebius.compute.v1alpha1.InstanceStatus + (*v1.ResourceMetadata)(nil), // 13: nebius.common.v1.ResourceMetadata + (*v1alpha1.NetworkInterfaceSpec)(nil), // 14: nebius.vpc.v1alpha1.NetworkInterfaceSpec + (*v1alpha1.NetworkInterfaceStatus)(nil), // 15: nebius.vpc.v1alpha1.NetworkInterfaceStatus +} +var file_nebius_compute_v1alpha1_instance_proto_depIdxs = []int32{ + 13, // 0: nebius.compute.v1alpha1.Instance.metadata:type_name -> nebius.common.v1.ResourceMetadata + 5, // 1: nebius.compute.v1alpha1.Instance.spec:type_name -> nebius.compute.v1alpha1.InstanceSpec + 12, // 2: nebius.compute.v1alpha1.Instance.status:type_name -> nebius.compute.v1alpha1.InstanceStatus + 6, // 3: nebius.compute.v1alpha1.InstanceSpec.resources:type_name -> nebius.compute.v1alpha1.ResourcesSpec + 7, // 4: nebius.compute.v1alpha1.InstanceSpec.gpu_cluster:type_name -> nebius.compute.v1alpha1.InstanceGpuClusterSpec + 14, // 5: nebius.compute.v1alpha1.InstanceSpec.network_interfaces:type_name -> nebius.vpc.v1alpha1.NetworkInterfaceSpec + 8, // 6: nebius.compute.v1alpha1.InstanceSpec.boot_disk:type_name -> nebius.compute.v1alpha1.AttachedDiskSpec + 8, // 7: nebius.compute.v1alpha1.InstanceSpec.secondary_disks:type_name -> nebius.compute.v1alpha1.AttachedDiskSpec + 11, // 8: nebius.compute.v1alpha1.InstanceSpec.filesystems:type_name -> nebius.compute.v1alpha1.AttachedFilesystemSpec + 0, // 9: nebius.compute.v1alpha1.InstanceSpec.recovery_policy:type_name -> nebius.compute.v1alpha1.InstanceRecoveryPolicy + 1, // 10: nebius.compute.v1alpha1.AttachedDiskSpec.attach_mode:type_name -> nebius.compute.v1alpha1.AttachedDiskSpec.AttachMode + 9, // 11: nebius.compute.v1alpha1.AttachedDiskSpec.existing_disk:type_name -> nebius.compute.v1alpha1.ExistingDisk + 2, // 12: nebius.compute.v1alpha1.AttachedFilesystemSpec.attach_mode:type_name -> nebius.compute.v1alpha1.AttachedFilesystemSpec.AttachMode + 10, // 13: nebius.compute.v1alpha1.AttachedFilesystemSpec.existing_filesystem:type_name -> nebius.compute.v1alpha1.ExistingFilesystem + 3, // 14: nebius.compute.v1alpha1.InstanceStatus.state:type_name -> nebius.compute.v1alpha1.InstanceStatus.InstanceState + 15, // 15: nebius.compute.v1alpha1.InstanceStatus.network_interfaces:type_name -> nebius.vpc.v1alpha1.NetworkInterfaceStatus + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_instance_proto_init() } +func file_nebius_compute_v1alpha1_instance_proto_init() { + if File_nebius_compute_v1alpha1_instance_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_instance_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Instance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*InstanceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ResourcesSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*InstanceGpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*AttachedDiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ExistingDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ExistingFilesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*AttachedFilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*InstanceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[2].OneofWrappers = []any{ + (*ResourcesSpec_Preset)(nil), + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[4].OneofWrappers = []any{ + (*AttachedDiskSpec_ExistingDisk)(nil), + } + file_nebius_compute_v1alpha1_instance_proto_msgTypes[7].OneofWrappers = []any{ + (*AttachedFilesystemSpec_ExistingFilesystem)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_instance_proto_rawDesc, + NumEnums: 4, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_compute_v1alpha1_instance_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_instance_proto_depIdxs, + EnumInfos: file_nebius_compute_v1alpha1_instance_proto_enumTypes, + MessageInfos: file_nebius_compute_v1alpha1_instance_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_instance_proto = out.File + file_nebius_compute_v1alpha1_instance_proto_rawDesc = nil + file_nebius_compute_v1alpha1_instance_proto_goTypes = nil + file_nebius_compute_v1alpha1_instance_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/instance.sensitive.pb.go b/proto/nebius/compute/v1alpha1/instance.sensitive.pb.go new file mode 100644 index 0000000..f72732b --- /dev/null +++ b/proto/nebius/compute/v1alpha1/instance.sensitive.pb.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Instance] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Instance) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Instance]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Instance +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Instance], use the following code: +// +// var original *Instance +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Instance) +func (x *Instance) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Instance) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInstance)(c)) +} + +// wrapperInstance is used to return [Instance] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInstance Instance + +func (w *wrapperInstance) String() string { + return (*Instance)(w).String() +} + +func (*wrapperInstance) ProtoMessage() {} + +func (w *wrapperInstance) ProtoReflect() protoreflect.Message { + return (*Instance)(w).ProtoReflect() +} + +// Sanitize mutates [InstanceSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *InstanceSpec) Sanitize() { + if x == nil { + return + } + x.CloudInitUserData = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [InstanceSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *InstanceSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [InstanceSpec], use the following code: +// +// var original *InstanceSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*InstanceSpec) +func (x *InstanceSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*InstanceSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInstanceSpec)(c)) +} + +// wrapperInstanceSpec is used to return [InstanceSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInstanceSpec InstanceSpec + +func (w *wrapperInstanceSpec) String() string { + return (*InstanceSpec)(w).String() +} + +func (*wrapperInstanceSpec) ProtoMessage() {} + +func (w *wrapperInstanceSpec) ProtoReflect() protoreflect.Message { + return (*InstanceSpec)(w).ProtoReflect() +} + +// func (x *ResourcesSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourcesSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InstanceGpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *InstanceGpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedDiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedDiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingDisk) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingDisk) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingFilesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingFilesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedFilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedFilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *InstanceStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *InstanceStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/instance_service.pb.go b/proto/nebius/compute/v1alpha1/instance_service.pb.go new file mode 100644 index 0000000..88aa77b --- /dev/null +++ b/proto/nebius/compute/v1alpha1/instance_service.pb.go @@ -0,0 +1,784 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// nebius/compute/v1alpha1/instance_service.proto is a deprecated file. + +package v1alpha1 + +import ( + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type GetInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetInstanceRequest) Reset() { + *x = GetInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstanceRequest) ProtoMessage() {} + +func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead. +func (*GetInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *GetInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type ListInstancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListInstancesRequest) Reset() { + *x = ListInstancesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesRequest) ProtoMessage() {} + +func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesRequest.ProtoReflect.Descriptor instead. +func (*ListInstancesRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{1} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *ListInstancesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *ListInstancesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *ListInstancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type CreateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateInstanceRequest) Reset() { + *x = CreateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInstanceRequest) ProtoMessage() {} + +func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead. +func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{2} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *CreateInstanceRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *CreateInstanceRequest) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type UpdateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Spec *InstanceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateInstanceRequest) Reset() { + *x = UpdateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInstanceRequest) ProtoMessage() {} + +func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInstanceRequest.ProtoReflect.Descriptor instead. +func (*UpdateInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *UpdateInstanceRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *UpdateInstanceRequest) GetSpec() *InstanceSpec { + if x != nil { + return x.Spec + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type DeleteInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteInstanceRequest) Reset() { + *x = DeleteInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInstanceRequest) ProtoMessage() {} + +func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInstanceRequest.ProtoReflect.Descriptor instead. +func (*DeleteInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{4} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *DeleteInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type ListInstancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Items []*Instance `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListInstancesResponse) Reset() { + *x = ListInstancesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesResponse) ProtoMessage() {} + +func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesResponse.ProtoReflect.Descriptor instead. +func (*ListInstancesResponse) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *ListInstancesResponse) GetItems() []*Instance { + if x != nil { + return x.Items + } + return nil +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *ListInstancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type StartInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *StartInstanceRequest) Reset() { + *x = StartInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartInstanceRequest) ProtoMessage() {} + +func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartInstanceRequest.ProtoReflect.Descriptor instead. +func (*StartInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{6} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *StartInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +type StopInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *StopInstanceRequest) Reset() { + *x = StopInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopInstanceRequest) ProtoMessage() {} + +func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopInstanceRequest.ProtoReflect.Descriptor instead. +func (*StopInstanceRequest) Descriptor() ([]byte, []int) { + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP(), []int{7} +} + +// Deprecated: The entire proto file nebius/compute/v1alpha1/instance_service.proto is marked as deprecated. +func (x *StopInstanceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_compute_v1alpha1_instance_service_proto protoreflect.FileDescriptor + +var file_nebius_compute_v1alpha1_instance_service_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x17, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x6f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x27, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x78, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x26, + 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0xf4, 0x06, + 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x55, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x2c, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, + 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x03, 0x88, 0x02, 0x01, 0x42, 0x72, 0x0a, 0x1e, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_compute_v1alpha1_instance_service_proto_rawDescOnce sync.Once + file_nebius_compute_v1alpha1_instance_service_proto_rawDescData = file_nebius_compute_v1alpha1_instance_service_proto_rawDesc +) + +func file_nebius_compute_v1alpha1_instance_service_proto_rawDescGZIP() []byte { + file_nebius_compute_v1alpha1_instance_service_proto_rawDescOnce.Do(func() { + file_nebius_compute_v1alpha1_instance_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_compute_v1alpha1_instance_service_proto_rawDescData) + }) + return file_nebius_compute_v1alpha1_instance_service_proto_rawDescData +} + +var file_nebius_compute_v1alpha1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_nebius_compute_v1alpha1_instance_service_proto_goTypes = []any{ + (*GetInstanceRequest)(nil), // 0: nebius.compute.v1alpha1.GetInstanceRequest + (*ListInstancesRequest)(nil), // 1: nebius.compute.v1alpha1.ListInstancesRequest + (*CreateInstanceRequest)(nil), // 2: nebius.compute.v1alpha1.CreateInstanceRequest + (*UpdateInstanceRequest)(nil), // 3: nebius.compute.v1alpha1.UpdateInstanceRequest + (*DeleteInstanceRequest)(nil), // 4: nebius.compute.v1alpha1.DeleteInstanceRequest + (*ListInstancesResponse)(nil), // 5: nebius.compute.v1alpha1.ListInstancesResponse + (*StartInstanceRequest)(nil), // 6: nebius.compute.v1alpha1.StartInstanceRequest + (*StopInstanceRequest)(nil), // 7: nebius.compute.v1alpha1.StopInstanceRequest + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*InstanceSpec)(nil), // 9: nebius.compute.v1alpha1.InstanceSpec + (*Instance)(nil), // 10: nebius.compute.v1alpha1.Instance + (*v1.GetByNameRequest)(nil), // 11: nebius.common.v1.GetByNameRequest + (*v1alpha1.ListOperationsByParentRequest)(nil), // 12: nebius.common.v1alpha1.ListOperationsByParentRequest + (*v1alpha1.Operation)(nil), // 13: nebius.common.v1alpha1.Operation + (*v1alpha1.ListOperationsResponse)(nil), // 14: nebius.common.v1alpha1.ListOperationsResponse +} +var file_nebius_compute_v1alpha1_instance_service_proto_depIdxs = []int32{ + 8, // 0: nebius.compute.v1alpha1.CreateInstanceRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 1: nebius.compute.v1alpha1.CreateInstanceRequest.spec:type_name -> nebius.compute.v1alpha1.InstanceSpec + 8, // 2: nebius.compute.v1alpha1.UpdateInstanceRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 3: nebius.compute.v1alpha1.UpdateInstanceRequest.spec:type_name -> nebius.compute.v1alpha1.InstanceSpec + 10, // 4: nebius.compute.v1alpha1.ListInstancesResponse.items:type_name -> nebius.compute.v1alpha1.Instance + 0, // 5: nebius.compute.v1alpha1.InstanceService.Get:input_type -> nebius.compute.v1alpha1.GetInstanceRequest + 11, // 6: nebius.compute.v1alpha1.InstanceService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.compute.v1alpha1.InstanceService.List:input_type -> nebius.compute.v1alpha1.ListInstancesRequest + 2, // 8: nebius.compute.v1alpha1.InstanceService.Create:input_type -> nebius.compute.v1alpha1.CreateInstanceRequest + 3, // 9: nebius.compute.v1alpha1.InstanceService.Update:input_type -> nebius.compute.v1alpha1.UpdateInstanceRequest + 4, // 10: nebius.compute.v1alpha1.InstanceService.Delete:input_type -> nebius.compute.v1alpha1.DeleteInstanceRequest + 6, // 11: nebius.compute.v1alpha1.InstanceService.Start:input_type -> nebius.compute.v1alpha1.StartInstanceRequest + 7, // 12: nebius.compute.v1alpha1.InstanceService.Stop:input_type -> nebius.compute.v1alpha1.StopInstanceRequest + 12, // 13: nebius.compute.v1alpha1.InstanceService.ListOperationsByParent:input_type -> nebius.common.v1alpha1.ListOperationsByParentRequest + 10, // 14: nebius.compute.v1alpha1.InstanceService.Get:output_type -> nebius.compute.v1alpha1.Instance + 10, // 15: nebius.compute.v1alpha1.InstanceService.GetByName:output_type -> nebius.compute.v1alpha1.Instance + 5, // 16: nebius.compute.v1alpha1.InstanceService.List:output_type -> nebius.compute.v1alpha1.ListInstancesResponse + 13, // 17: nebius.compute.v1alpha1.InstanceService.Create:output_type -> nebius.common.v1alpha1.Operation + 13, // 18: nebius.compute.v1alpha1.InstanceService.Update:output_type -> nebius.common.v1alpha1.Operation + 13, // 19: nebius.compute.v1alpha1.InstanceService.Delete:output_type -> nebius.common.v1alpha1.Operation + 13, // 20: nebius.compute.v1alpha1.InstanceService.Start:output_type -> nebius.common.v1alpha1.Operation + 13, // 21: nebius.compute.v1alpha1.InstanceService.Stop:output_type -> nebius.common.v1alpha1.Operation + 14, // 22: nebius.compute.v1alpha1.InstanceService.ListOperationsByParent:output_type -> nebius.common.v1alpha1.ListOperationsResponse + 14, // [14:23] is the sub-list for method output_type + 5, // [5:14] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_compute_v1alpha1_instance_service_proto_init() } +func file_nebius_compute_v1alpha1_instance_service_proto_init() { + if File_nebius_compute_v1alpha1_instance_service_proto != nil { + return + } + file_nebius_compute_v1alpha1_instance_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListInstancesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListInstancesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*StartInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_compute_v1alpha1_instance_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*StopInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_compute_v1alpha1_instance_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_compute_v1alpha1_instance_service_proto_goTypes, + DependencyIndexes: file_nebius_compute_v1alpha1_instance_service_proto_depIdxs, + MessageInfos: file_nebius_compute_v1alpha1_instance_service_proto_msgTypes, + }.Build() + File_nebius_compute_v1alpha1_instance_service_proto = out.File + file_nebius_compute_v1alpha1_instance_service_proto_rawDesc = nil + file_nebius_compute_v1alpha1_instance_service_proto_goTypes = nil + file_nebius_compute_v1alpha1_instance_service_proto_depIdxs = nil +} diff --git a/proto/nebius/compute/v1alpha1/instance_service.sensitive.pb.go b/proto/nebius/compute/v1alpha1/instance_service.sensitive.pb.go new file mode 100644 index 0000000..3813a0f --- /dev/null +++ b/proto/nebius/compute/v1alpha1/instance_service.sensitive.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListInstancesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListInstancesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [CreateInstanceRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateInstanceRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateInstanceRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateInstanceRequest], use the following code: +// +// var original *CreateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateInstanceRequest) +func (x *CreateInstanceRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateInstanceRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateInstanceRequest)(c)) +} + +// wrapperCreateInstanceRequest is used to return [CreateInstanceRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateInstanceRequest CreateInstanceRequest + +func (w *wrapperCreateInstanceRequest) String() string { + return (*CreateInstanceRequest)(w).String() +} + +func (*wrapperCreateInstanceRequest) ProtoMessage() {} + +func (w *wrapperCreateInstanceRequest) ProtoReflect() protoreflect.Message { + return (*CreateInstanceRequest)(w).ProtoReflect() +} + +// Sanitize mutates [UpdateInstanceRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateInstanceRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateInstanceRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateInstanceRequest], use the following code: +// +// var original *UpdateInstanceRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateInstanceRequest) +func (x *UpdateInstanceRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateInstanceRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateInstanceRequest)(c)) +} + +// wrapperUpdateInstanceRequest is used to return [UpdateInstanceRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateInstanceRequest UpdateInstanceRequest + +func (w *wrapperUpdateInstanceRequest) String() string { + return (*UpdateInstanceRequest)(w).String() +} + +func (*wrapperUpdateInstanceRequest) ProtoMessage() {} + +func (w *wrapperUpdateInstanceRequest) ProtoReflect() protoreflect.Message { + return (*UpdateInstanceRequest)(w).ProtoReflect() +} + +// func (x *DeleteInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListInstancesResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListInstancesResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListInstancesResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListInstancesResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListInstancesResponse], use the following code: +// +// var original *ListInstancesResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListInstancesResponse) +func (x *ListInstancesResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListInstancesResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListInstancesResponse)(c)) +} + +// wrapperListInstancesResponse is used to return [ListInstancesResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListInstancesResponse ListInstancesResponse + +func (w *wrapperListInstancesResponse) String() string { + return (*ListInstancesResponse)(w).String() +} + +func (*wrapperListInstancesResponse) ProtoMessage() {} + +func (w *wrapperListInstancesResponse) ProtoReflect() protoreflect.Message { + return (*ListInstancesResponse)(w).ProtoReflect() +} + +// func (x *StartInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *StartInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *StopInstanceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *StopInstanceRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/compute/v1alpha1/instance_service_grpc.pb.go b/proto/nebius/compute/v1alpha1/instance_service_grpc.pb.go new file mode 100644 index 0000000..904c18c --- /dev/null +++ b/proto/nebius/compute/v1alpha1/instance_service_grpc.pb.go @@ -0,0 +1,411 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// nebius/compute/v1alpha1/instance_service.proto is a deprecated file. + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + InstanceService_Get_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Get" + InstanceService_GetByName_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/GetByName" + InstanceService_List_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/List" + InstanceService_Create_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Create" + InstanceService_Update_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Update" + InstanceService_Delete_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Delete" + InstanceService_Start_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Start" + InstanceService_Stop_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/Stop" + InstanceService_ListOperationsByParent_FullMethodName = "/nebius.compute.v1alpha1.InstanceService/ListOperationsByParent" +) + +// InstanceServiceClient is the client API for InstanceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type InstanceServiceClient interface { + Get(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Instance, error) + List(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) + Create(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Start(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Stop(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) +} + +type instanceServiceClient struct { + cc grpc.ClientConnInterface +} + +// Deprecated: Do not use. +func NewInstanceServiceClient(cc grpc.ClientConnInterface) InstanceServiceClient { + return &instanceServiceClient{cc} +} + +func (c *instanceServiceClient) Get(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) { + out := new(Instance) + err := c.cc.Invoke(ctx, InstanceService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Instance, error) { + out := new(Instance) + err := c.cc.Invoke(ctx, InstanceService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) List(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) { + out := new(ListInstancesResponse) + err := c.cc.Invoke(ctx, InstanceService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Create(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Update(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Delete(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Start(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Start_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) Stop(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, InstanceService_Stop_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *instanceServiceClient) ListOperationsByParent(ctx context.Context, in *v1alpha1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha1.ListOperationsResponse, error) { + out := new(v1alpha1.ListOperationsResponse) + err := c.cc.Invoke(ctx, InstanceService_ListOperationsByParent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InstanceServiceServer is the server API for InstanceService service. +// All implementations should embed UnimplementedInstanceServiceServer +// for forward compatibility +// +// Deprecated: Do not use. +type InstanceServiceServer interface { + Get(context.Context, *GetInstanceRequest) (*Instance, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Instance, error) + List(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) + Create(context.Context, *CreateInstanceRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateInstanceRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteInstanceRequest) (*v1alpha1.Operation, error) + Start(context.Context, *StartInstanceRequest) (*v1alpha1.Operation, error) + Stop(context.Context, *StopInstanceRequest) (*v1alpha1.Operation, error) + ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) +} + +// UnimplementedInstanceServiceServer should be embedded to have forward compatible implementations. +type UnimplementedInstanceServiceServer struct { +} + +func (UnimplementedInstanceServiceServer) Get(context.Context, *GetInstanceRequest) (*Instance, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedInstanceServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Instance, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedInstanceServiceServer) List(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedInstanceServiceServer) Create(context.Context, *CreateInstanceRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedInstanceServiceServer) Update(context.Context, *UpdateInstanceRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedInstanceServiceServer) Delete(context.Context, *DeleteInstanceRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedInstanceServiceServer) Start(context.Context, *StartInstanceRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") +} +func (UnimplementedInstanceServiceServer) Stop(context.Context, *StopInstanceRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedInstanceServiceServer) ListOperationsByParent(context.Context, *v1alpha1.ListOperationsByParentRequest) (*v1alpha1.ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperationsByParent not implemented") +} + +// UnsafeInstanceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InstanceServiceServer will +// result in compilation errors. +type UnsafeInstanceServiceServer interface { + mustEmbedUnimplementedInstanceServiceServer() +} + +// Deprecated: Do not use. +func RegisterInstanceServiceServer(s grpc.ServiceRegistrar, srv InstanceServiceServer) { + s.RegisterService(&InstanceService_ServiceDesc, srv) +} + +func _InstanceService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Get(ctx, req.(*GetInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInstancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).List(ctx, req.(*ListInstancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Create(ctx, req.(*CreateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Update(ctx, req.(*UpdateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Delete(ctx, req.(*DeleteInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Start(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Start_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Start(ctx, req.(*StartInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_Stop_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).Stop(ctx, req.(*StopInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InstanceService_ListOperationsByParent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.ListOperationsByParentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InstanceServiceServer).ListOperationsByParent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InstanceService_ListOperationsByParent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InstanceServiceServer).ListOperationsByParent(ctx, req.(*v1alpha1.ListOperationsByParentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InstanceService_ServiceDesc is the grpc.ServiceDesc for InstanceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InstanceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.compute.v1alpha1.InstanceService", + HandlerType: (*InstanceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _InstanceService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _InstanceService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _InstanceService_List_Handler, + }, + { + MethodName: "Create", + Handler: _InstanceService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _InstanceService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _InstanceService_Delete_Handler, + }, + { + MethodName: "Start", + Handler: _InstanceService_Start_Handler, + }, + { + MethodName: "Stop", + Handler: _InstanceService_Stop_Handler, + }, + { + MethodName: "ListOperationsByParent", + Handler: _InstanceService_ListOperationsByParent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/compute/v1alpha1/instance_service.proto", +} diff --git a/proto/nebius/iam/v1/access.pb.go b/proto/nebius/iam/v1/access.pb.go new file mode 100644 index 0000000..a58a446 --- /dev/null +++ b/proto/nebius/iam/v1/access.pb.go @@ -0,0 +1,394 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/access.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Account struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Account_UserAccount_ + // *Account_ServiceAccount_ + // *Account_AnonymousAccount_ + Type isAccount_Type `protobuf_oneof:"type"` +} + +func (x *Account) Reset() { + *x = Account{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_proto_rawDescGZIP(), []int{0} +} + +func (m *Account) GetType() isAccount_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Account) GetUserAccount() *Account_UserAccount { + if x, ok := x.GetType().(*Account_UserAccount_); ok { + return x.UserAccount + } + return nil +} + +func (x *Account) GetServiceAccount() *Account_ServiceAccount { + if x, ok := x.GetType().(*Account_ServiceAccount_); ok { + return x.ServiceAccount + } + return nil +} + +func (x *Account) GetAnonymousAccount() *Account_AnonymousAccount { + if x, ok := x.GetType().(*Account_AnonymousAccount_); ok { + return x.AnonymousAccount + } + return nil +} + +type isAccount_Type interface { + isAccount_Type() +} + +type Account_UserAccount_ struct { + UserAccount *Account_UserAccount `protobuf:"bytes,1,opt,name=user_account,json=userAccount,proto3,oneof"` +} + +type Account_ServiceAccount_ struct { + ServiceAccount *Account_ServiceAccount `protobuf:"bytes,2,opt,name=service_account,json=serviceAccount,proto3,oneof"` +} + +type Account_AnonymousAccount_ struct { + AnonymousAccount *Account_AnonymousAccount `protobuf:"bytes,3,opt,name=anonymous_account,json=anonymousAccount,proto3,oneof"` +} + +func (*Account_UserAccount_) isAccount_Type() {} + +func (*Account_ServiceAccount_) isAccount_Type() {} + +func (*Account_AnonymousAccount_) isAccount_Type() {} + +type Account_UserAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Account_UserAccount) Reset() { + *x = Account_UserAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account_UserAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account_UserAccount) ProtoMessage() {} + +func (x *Account_UserAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account_UserAccount.ProtoReflect.Descriptor instead. +func (*Account_UserAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Account_UserAccount) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Account_ServiceAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Account_ServiceAccount) Reset() { + *x = Account_ServiceAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account_ServiceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account_ServiceAccount) ProtoMessage() {} + +func (x *Account_ServiceAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account_ServiceAccount.ProtoReflect.Descriptor instead. +func (*Account_ServiceAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Account_ServiceAccount) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Account_AnonymousAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Account_AnonymousAccount) Reset() { + *x = Account_AnonymousAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account_AnonymousAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account_AnonymousAccount) ProtoMessage() {} + +func (x *Account_AnonymousAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account_AnonymousAccount.ProtoReflect.Descriptor instead. +func (*Account_AnonymousAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_proto_rawDescGZIP(), []int{0, 2} +} + +var File_nebius_iam_v1_access_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_access_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x22, 0xd9, 0x02, 0x0a, 0x07, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x50, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x11, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, + 0x6f, 0x75, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x1d, 0x0a, 0x0b, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x20, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x12, 0x0a, 0x10, 0x41, + 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x52, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, + 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_access_proto_rawDescOnce sync.Once + file_nebius_iam_v1_access_proto_rawDescData = file_nebius_iam_v1_access_proto_rawDesc +) + +func file_nebius_iam_v1_access_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_access_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_access_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_access_proto_rawDescData) + }) + return file_nebius_iam_v1_access_proto_rawDescData +} + +var file_nebius_iam_v1_access_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_iam_v1_access_proto_goTypes = []any{ + (*Account)(nil), // 0: nebius.iam.v1.Account + (*Account_UserAccount)(nil), // 1: nebius.iam.v1.Account.UserAccount + (*Account_ServiceAccount)(nil), // 2: nebius.iam.v1.Account.ServiceAccount + (*Account_AnonymousAccount)(nil), // 3: nebius.iam.v1.Account.AnonymousAccount +} +var file_nebius_iam_v1_access_proto_depIdxs = []int32{ + 1, // 0: nebius.iam.v1.Account.user_account:type_name -> nebius.iam.v1.Account.UserAccount + 2, // 1: nebius.iam.v1.Account.service_account:type_name -> nebius.iam.v1.Account.ServiceAccount + 3, // 2: nebius.iam.v1.Account.anonymous_account:type_name -> nebius.iam.v1.Account.AnonymousAccount + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_access_proto_init() } +func file_nebius_iam_v1_access_proto_init() { + if File_nebius_iam_v1_access_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_access_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Account); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Account_UserAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*Account_ServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Account_AnonymousAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_access_proto_msgTypes[0].OneofWrappers = []any{ + (*Account_UserAccount_)(nil), + (*Account_ServiceAccount_)(nil), + (*Account_AnonymousAccount_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_access_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_access_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_access_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_access_proto_msgTypes, + }.Build() + File_nebius_iam_v1_access_proto = out.File + file_nebius_iam_v1_access_proto_rawDesc = nil + file_nebius_iam_v1_access_proto_goTypes = nil + file_nebius_iam_v1_access_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/access.sensitive.pb.go b/proto/nebius/iam/v1/access.sensitive.pb.go new file mode 100644 index 0000000..6a7fb46 --- /dev/null +++ b/proto/nebius/iam/v1/access.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Account) Sanitize() // is not generated as no sensitive fields found +// func (x *Account) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/access_key.pb.go b/proto/nebius/iam/v1/access_key.pb.go new file mode 100644 index 0000000..3077073 --- /dev/null +++ b/proto/nebius/iam/v1/access_key.pb.go @@ -0,0 +1,467 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/access_key.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AccessKeyStatus_State int32 + +const ( + AccessKeyStatus_STATE_UNSPECIFIED AccessKeyStatus_State = 0 + AccessKeyStatus_ACTIVE AccessKeyStatus_State = 1 + AccessKeyStatus_INACTIVE AccessKeyStatus_State = 2 + AccessKeyStatus_EXPIRED AccessKeyStatus_State = 3 + AccessKeyStatus_DELETING AccessKeyStatus_State = 4 + AccessKeyStatus_DELETED AccessKeyStatus_State = 5 +) + +// Enum value maps for AccessKeyStatus_State. +var ( + AccessKeyStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ACTIVE", + 2: "INACTIVE", + 3: "EXPIRED", + 4: "DELETING", + 5: "DELETED", + } + AccessKeyStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "EXPIRED": 3, + "DELETING": 4, + "DELETED": 5, + } +) + +func (x AccessKeyStatus_State) Enum() *AccessKeyStatus_State { + p := new(AccessKeyStatus_State) + *p = x + return p +} + +func (x AccessKeyStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessKeyStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_access_key_proto_enumTypes[0].Descriptor() +} + +func (AccessKeyStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_access_key_proto_enumTypes[0] +} + +func (x AccessKeyStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccessKeyStatus_State.Descriptor instead. +func (AccessKeyStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_proto_rawDescGZIP(), []int{2, 0} +} + +type AccessKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AccessKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *AccessKeyStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *AccessKey) Reset() { + *x = AccessKey{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessKey) ProtoMessage() {} + +func (x *AccessKey) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessKey.ProtoReflect.Descriptor instead. +func (*AccessKey) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_proto_rawDescGZIP(), []int{0} +} + +func (x *AccessKey) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AccessKey) GetSpec() *AccessKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *AccessKey) GetStatus() *AccessKeyStatus { + if x != nil { + return x.Status + } + return nil +} + +type AccessKeySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *AccessKeySpec) Reset() { + *x = AccessKeySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessKeySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessKeySpec) ProtoMessage() {} + +func (x *AccessKeySpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessKeySpec.ProtoReflect.Descriptor instead. +func (*AccessKeySpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_proto_rawDescGZIP(), []int{1} +} + +func (x *AccessKeySpec) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *AccessKeySpec) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *AccessKeySpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type AccessKeyStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State AccessKeyStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.iam.v1.AccessKeyStatus_State" json:"state,omitempty"` + Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + KeySize int32 `protobuf:"varint,4,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"` + AwsAccessKeyId string `protobuf:"bytes,5,opt,name=aws_access_key_id,json=awsAccessKeyId,proto3" json:"aws_access_key_id,omitempty"` + Secret string `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *AccessKeyStatus) Reset() { + *x = AccessKeyStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessKeyStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessKeyStatus) ProtoMessage() {} + +func (x *AccessKeyStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessKeyStatus.ProtoReflect.Descriptor instead. +func (*AccessKeyStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_proto_rawDescGZIP(), []int{2} +} + +func (x *AccessKeyStatus) GetState() AccessKeyStatus_State { + if x != nil { + return x.State + } + return AccessKeyStatus_STATE_UNSPECIFIED +} + +func (x *AccessKeyStatus) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +func (x *AccessKeyStatus) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *AccessKeyStatus) GetKeySize() int32 { + if x != nil { + return x.KeySize + } + return 0 +} + +func (x *AccessKeyStatus) GetAwsAccessKeyId() string { + if x != nil { + return x.AwsAccessKeyId + } + return "" +} + +func (x *AccessKeyStatus) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +var File_nebius_iam_v1_access_key_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_access_key_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd2, 0x02, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, + 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x29, 0x0a, 0x11, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x77, 0x73, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, + 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x60, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, + 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0b, 0x0a, + 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x55, 0x0a, 0x14, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_access_key_proto_rawDescOnce sync.Once + file_nebius_iam_v1_access_key_proto_rawDescData = file_nebius_iam_v1_access_key_proto_rawDesc +) + +func file_nebius_iam_v1_access_key_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_access_key_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_access_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_access_key_proto_rawDescData) + }) + return file_nebius_iam_v1_access_key_proto_rawDescData +} + +var file_nebius_iam_v1_access_key_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_access_key_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_access_key_proto_goTypes = []any{ + (AccessKeyStatus_State)(0), // 0: nebius.iam.v1.AccessKeyStatus.State + (*AccessKey)(nil), // 1: nebius.iam.v1.AccessKey + (*AccessKeySpec)(nil), // 2: nebius.iam.v1.AccessKeySpec + (*AccessKeyStatus)(nil), // 3: nebius.iam.v1.AccessKeyStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata + (*Account)(nil), // 5: nebius.iam.v1.Account + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_nebius_iam_v1_access_key_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.AccessKey.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.iam.v1.AccessKey.spec:type_name -> nebius.iam.v1.AccessKeySpec + 3, // 2: nebius.iam.v1.AccessKey.status:type_name -> nebius.iam.v1.AccessKeyStatus + 5, // 3: nebius.iam.v1.AccessKeySpec.account:type_name -> nebius.iam.v1.Account + 6, // 4: nebius.iam.v1.AccessKeySpec.expires_at:type_name -> google.protobuf.Timestamp + 0, // 5: nebius.iam.v1.AccessKeyStatus.state:type_name -> nebius.iam.v1.AccessKeyStatus.State + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_access_key_proto_init() } +func file_nebius_iam_v1_access_key_proto_init() { + if File_nebius_iam_v1_access_key_proto != nil { + return + } + file_nebius_iam_v1_access_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_access_key_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AccessKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AccessKeySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AccessKeyStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_access_key_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_access_key_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_access_key_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_access_key_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_access_key_proto_msgTypes, + }.Build() + File_nebius_iam_v1_access_key_proto = out.File + file_nebius_iam_v1_access_key_proto_rawDesc = nil + file_nebius_iam_v1_access_key_proto_goTypes = nil + file_nebius_iam_v1_access_key_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/access_key.sensitive.pb.go b/proto/nebius/iam/v1/access_key.sensitive.pb.go new file mode 100644 index 0000000..943ce16 --- /dev/null +++ b/proto/nebius/iam/v1/access_key.sensitive.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [AccessKey] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *AccessKey) Sanitize() { + if x == nil { + return + } + x.Status.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [AccessKey]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *AccessKey +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [AccessKey], use the following code: +// +// var original *AccessKey +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*AccessKey) +func (x *AccessKey) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*AccessKey) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperAccessKey)(c)) +} + +// wrapperAccessKey is used to return [AccessKey] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperAccessKey AccessKey + +func (w *wrapperAccessKey) String() string { + return (*AccessKey)(w).String() +} + +func (*wrapperAccessKey) ProtoMessage() {} + +func (w *wrapperAccessKey) ProtoReflect() protoreflect.Message { + return (*AccessKey)(w).ProtoReflect() +} + +// func (x *AccessKeySpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AccessKeySpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [AccessKeyStatus] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *AccessKeyStatus) Sanitize() { + if x == nil { + return + } + x.Secret = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [AccessKeyStatus]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *AccessKeyStatus +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [AccessKeyStatus], use the following code: +// +// var original *AccessKeyStatus +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*AccessKeyStatus) +func (x *AccessKeyStatus) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*AccessKeyStatus) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperAccessKeyStatus)(c)) +} + +// wrapperAccessKeyStatus is used to return [AccessKeyStatus] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperAccessKeyStatus AccessKeyStatus + +func (w *wrapperAccessKeyStatus) String() string { + return (*AccessKeyStatus)(w).String() +} + +func (*wrapperAccessKeyStatus) ProtoMessage() {} + +func (w *wrapperAccessKeyStatus) ProtoReflect() protoreflect.Message { + return (*AccessKeyStatus)(w).ProtoReflect() +} diff --git a/proto/nebius/iam/v1/access_key_service.pb.go b/proto/nebius/iam/v1/access_key_service.pb.go new file mode 100644 index 0000000..c853be5 --- /dev/null +++ b/proto/nebius/iam/v1/access_key_service.pb.go @@ -0,0 +1,1171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/access_key_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateAccessKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AccessKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateAccessKeyRequest) Reset() { + *x = CreateAccessKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAccessKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccessKeyRequest) ProtoMessage() {} + +func (x *CreateAccessKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccessKeyRequest.ProtoReflect.Descriptor instead. +func (*CreateAccessKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateAccessKeyRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateAccessKeyRequest) GetSpec() *AccessKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +type KeyIdentity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Identity: + // + // *KeyIdentity_Id + // *KeyIdentity_AwsAccessKeyId + Identity isKeyIdentity_Identity `protobuf_oneof:"identity"` +} + +func (x *KeyIdentity) Reset() { + *x = KeyIdentity{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyIdentity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyIdentity) ProtoMessage() {} + +func (x *KeyIdentity) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyIdentity.ProtoReflect.Descriptor instead. +func (*KeyIdentity) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{1} +} + +func (m *KeyIdentity) GetIdentity() isKeyIdentity_Identity { + if m != nil { + return m.Identity + } + return nil +} + +func (x *KeyIdentity) GetId() string { + if x, ok := x.GetIdentity().(*KeyIdentity_Id); ok { + return x.Id + } + return "" +} + +func (x *KeyIdentity) GetAwsAccessKeyId() string { + if x, ok := x.GetIdentity().(*KeyIdentity_AwsAccessKeyId); ok { + return x.AwsAccessKeyId + } + return "" +} + +type isKeyIdentity_Identity interface { + isKeyIdentity_Identity() +} + +type KeyIdentity_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type KeyIdentity_AwsAccessKeyId struct { + AwsAccessKeyId string `protobuf:"bytes,2,opt,name=aws_access_key_id,json=awsAccessKeyId,proto3,oneof"` +} + +func (*KeyIdentity_Id) isKeyIdentity_Identity() {} + +func (*KeyIdentity_AwsAccessKeyId) isKeyIdentity_Identity() {} + +type GetAccessKeySecretOnceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAccessKeySecretOnceRequest) Reset() { + *x = GetAccessKeySecretOnceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessKeySecretOnceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessKeySecretOnceRequest) ProtoMessage() {} + +func (x *GetAccessKeySecretOnceRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccessKeySecretOnceRequest.ProtoReflect.Descriptor instead. +func (*GetAccessKeySecretOnceRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetAccessKeySecretOnceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetAccessKeyByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAccessKeyByIdRequest) Reset() { + *x = GetAccessKeyByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessKeyByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessKeyByIdRequest) ProtoMessage() {} + +func (x *GetAccessKeyByIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccessKeyByIdRequest.ProtoReflect.Descriptor instead. +func (*GetAccessKeyByIdRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetAccessKeyByIdRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetAccessKeyByAwsIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AwsAccessKeyId string `protobuf:"bytes,1,opt,name=aws_access_key_id,json=awsAccessKeyId,proto3" json:"aws_access_key_id,omitempty"` +} + +func (x *GetAccessKeyByAwsIdRequest) Reset() { + *x = GetAccessKeyByAwsIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessKeyByAwsIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessKeyByAwsIdRequest) ProtoMessage() {} + +func (x *GetAccessKeyByAwsIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccessKeyByAwsIdRequest.ProtoReflect.Descriptor instead. +func (*GetAccessKeyByAwsIdRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAccessKeyByAwsIdRequest) GetAwsAccessKeyId() string { + if x != nil { + return x.AwsAccessKeyId + } + return "" +} + +type ListAccessKeysRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the container ID. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListAccessKeysRequest) Reset() { + *x = ListAccessKeysRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccessKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessKeysRequest) ProtoMessage() {} + +func (x *ListAccessKeysRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessKeysRequest.ProtoReflect.Descriptor instead. +func (*ListAccessKeysRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListAccessKeysRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListAccessKeysRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListAccessKeysRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAccessKeysRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListAccessKeysByAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the parent account ID. + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListAccessKeysByAccountRequest) Reset() { + *x = ListAccessKeysByAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccessKeysByAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessKeysByAccountRequest) ProtoMessage() {} + +func (x *ListAccessKeysByAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessKeysByAccountRequest.ProtoReflect.Descriptor instead. +func (*ListAccessKeysByAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListAccessKeysByAccountRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *ListAccessKeysByAccountRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccessKeysByAccountRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAccessKeysByAccountRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type UpdateAccessKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AccessKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateAccessKeyRequest) Reset() { + *x = UpdateAccessKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAccessKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccessKeyRequest) ProtoMessage() {} + +func (x *UpdateAccessKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAccessKeyRequest.ProtoReflect.Descriptor instead. +func (*UpdateAccessKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateAccessKeyRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateAccessKeyRequest) GetSpec() *AccessKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +type ActivateAccessKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *KeyIdentity `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ActivateAccessKeyRequest) Reset() { + *x = ActivateAccessKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActivateAccessKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivateAccessKeyRequest) ProtoMessage() {} + +func (x *ActivateAccessKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivateAccessKeyRequest.ProtoReflect.Descriptor instead. +func (*ActivateAccessKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ActivateAccessKeyRequest) GetId() *KeyIdentity { + if x != nil { + return x.Id + } + return nil +} + +type DeactivateAccessKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *KeyIdentity `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeactivateAccessKeyRequest) Reset() { + *x = DeactivateAccessKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeactivateAccessKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateAccessKeyRequest) ProtoMessage() {} + +func (x *DeactivateAccessKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateAccessKeyRequest.ProtoReflect.Descriptor instead. +func (*DeactivateAccessKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{9} +} + +func (x *DeactivateAccessKeyRequest) GetId() *KeyIdentity { + if x != nil { + return x.Id + } + return nil +} + +type DeleteAccessKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *KeyIdentity `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteAccessKeyRequest) Reset() { + *x = DeleteAccessKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccessKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccessKeyRequest) ProtoMessage() {} + +func (x *DeleteAccessKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccessKeyRequest.ProtoReflect.Descriptor instead. +func (*DeleteAccessKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteAccessKeyRequest) GetId() *KeyIdentity { + if x != nil { + return x.Id + } + return nil +} + +type GetAccessKeySecretOnceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *GetAccessKeySecretOnceResponse) Reset() { + *x = GetAccessKeySecretOnceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessKeySecretOnceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessKeySecretOnceResponse) ProtoMessage() {} + +func (x *GetAccessKeySecretOnceResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccessKeySecretOnceResponse.ProtoReflect.Descriptor instead. +func (*GetAccessKeySecretOnceResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{11} +} + +func (x *GetAccessKeySecretOnceResponse) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +type ListAccessKeysResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of access keys returned in the response. The field should be named as `items` for consistency. + Items []*AccessKey `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAccessKeysResponse) Reset() { + *x = ListAccessKeysResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccessKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccessKeysResponse) ProtoMessage() {} + +func (x *ListAccessKeysResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_access_key_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccessKeysResponse.ProtoReflect.Descriptor instead. +func (*ListAccessKeysResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_access_key_service_proto_rawDescGZIP(), []int{12} +} + +func (x *ListAccessKeysResponse) GetItems() []*AccessKey { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListAccessKeysResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_access_key_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_access_key_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x58, 0x0a, + 0x0b, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, + 0x0a, 0x11, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x77, 0x73, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x2f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4f, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4b, 0x65, 0x79, 0x42, 0x79, 0x41, 0x77, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x29, 0x0a, 0x11, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x77, + 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x9b, 0x01, 0x0a, + 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x1e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x42, 0x79, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x30, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x22, 0x46, 0x0a, 0x18, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x52, 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x1a, 0x44, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x44, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4f, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x52, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x70, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xfa, 0x06, 0x0a, 0x10, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x73, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x79, 0x49, + 0x64, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x42, 0x79, + 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4b, 0x65, 0x79, 0x12, 0x51, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x79, 0x41, 0x77, 0x73, 0x49, + 0x64, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x42, 0x79, + 0x41, 0x77, 0x73, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x4f, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4f, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x06, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, + 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x5c, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x15, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_access_key_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_access_key_service_proto_rawDescData = file_nebius_iam_v1_access_key_service_proto_rawDesc +) + +func file_nebius_iam_v1_access_key_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_access_key_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_access_key_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_access_key_service_proto_rawDescData) + }) + return file_nebius_iam_v1_access_key_service_proto_rawDescData +} + +var file_nebius_iam_v1_access_key_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_nebius_iam_v1_access_key_service_proto_goTypes = []any{ + (*CreateAccessKeyRequest)(nil), // 0: nebius.iam.v1.CreateAccessKeyRequest + (*KeyIdentity)(nil), // 1: nebius.iam.v1.KeyIdentity + (*GetAccessKeySecretOnceRequest)(nil), // 2: nebius.iam.v1.GetAccessKeySecretOnceRequest + (*GetAccessKeyByIdRequest)(nil), // 3: nebius.iam.v1.GetAccessKeyByIdRequest + (*GetAccessKeyByAwsIdRequest)(nil), // 4: nebius.iam.v1.GetAccessKeyByAwsIdRequest + (*ListAccessKeysRequest)(nil), // 5: nebius.iam.v1.ListAccessKeysRequest + (*ListAccessKeysByAccountRequest)(nil), // 6: nebius.iam.v1.ListAccessKeysByAccountRequest + (*UpdateAccessKeyRequest)(nil), // 7: nebius.iam.v1.UpdateAccessKeyRequest + (*ActivateAccessKeyRequest)(nil), // 8: nebius.iam.v1.ActivateAccessKeyRequest + (*DeactivateAccessKeyRequest)(nil), // 9: nebius.iam.v1.DeactivateAccessKeyRequest + (*DeleteAccessKeyRequest)(nil), // 10: nebius.iam.v1.DeleteAccessKeyRequest + (*GetAccessKeySecretOnceResponse)(nil), // 11: nebius.iam.v1.GetAccessKeySecretOnceResponse + (*ListAccessKeysResponse)(nil), // 12: nebius.iam.v1.ListAccessKeysResponse + (*v1.ResourceMetadata)(nil), // 13: nebius.common.v1.ResourceMetadata + (*AccessKeySpec)(nil), // 14: nebius.iam.v1.AccessKeySpec + (*Account)(nil), // 15: nebius.iam.v1.Account + (*AccessKey)(nil), // 16: nebius.iam.v1.AccessKey + (*v1.Operation)(nil), // 17: nebius.common.v1.Operation +} +var file_nebius_iam_v1_access_key_service_proto_depIdxs = []int32{ + 13, // 0: nebius.iam.v1.CreateAccessKeyRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 14, // 1: nebius.iam.v1.CreateAccessKeyRequest.spec:type_name -> nebius.iam.v1.AccessKeySpec + 15, // 2: nebius.iam.v1.ListAccessKeysByAccountRequest.account:type_name -> nebius.iam.v1.Account + 13, // 3: nebius.iam.v1.UpdateAccessKeyRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 14, // 4: nebius.iam.v1.UpdateAccessKeyRequest.spec:type_name -> nebius.iam.v1.AccessKeySpec + 1, // 5: nebius.iam.v1.ActivateAccessKeyRequest.id:type_name -> nebius.iam.v1.KeyIdentity + 1, // 6: nebius.iam.v1.DeactivateAccessKeyRequest.id:type_name -> nebius.iam.v1.KeyIdentity + 1, // 7: nebius.iam.v1.DeleteAccessKeyRequest.id:type_name -> nebius.iam.v1.KeyIdentity + 16, // 8: nebius.iam.v1.ListAccessKeysResponse.items:type_name -> nebius.iam.v1.AccessKey + 0, // 9: nebius.iam.v1.AccessKeyService.Create:input_type -> nebius.iam.v1.CreateAccessKeyRequest + 5, // 10: nebius.iam.v1.AccessKeyService.List:input_type -> nebius.iam.v1.ListAccessKeysRequest + 6, // 11: nebius.iam.v1.AccessKeyService.ListByAccount:input_type -> nebius.iam.v1.ListAccessKeysByAccountRequest + 7, // 12: nebius.iam.v1.AccessKeyService.Update:input_type -> nebius.iam.v1.UpdateAccessKeyRequest + 3, // 13: nebius.iam.v1.AccessKeyService.GetById:input_type -> nebius.iam.v1.GetAccessKeyByIdRequest + 4, // 14: nebius.iam.v1.AccessKeyService.GetByAwsId:input_type -> nebius.iam.v1.GetAccessKeyByAwsIdRequest + 2, // 15: nebius.iam.v1.AccessKeyService.GetSecretOnce:input_type -> nebius.iam.v1.GetAccessKeySecretOnceRequest + 8, // 16: nebius.iam.v1.AccessKeyService.Activate:input_type -> nebius.iam.v1.ActivateAccessKeyRequest + 9, // 17: nebius.iam.v1.AccessKeyService.Deactivate:input_type -> nebius.iam.v1.DeactivateAccessKeyRequest + 10, // 18: nebius.iam.v1.AccessKeyService.Delete:input_type -> nebius.iam.v1.DeleteAccessKeyRequest + 17, // 19: nebius.iam.v1.AccessKeyService.Create:output_type -> nebius.common.v1.Operation + 12, // 20: nebius.iam.v1.AccessKeyService.List:output_type -> nebius.iam.v1.ListAccessKeysResponse + 12, // 21: nebius.iam.v1.AccessKeyService.ListByAccount:output_type -> nebius.iam.v1.ListAccessKeysResponse + 17, // 22: nebius.iam.v1.AccessKeyService.Update:output_type -> nebius.common.v1.Operation + 16, // 23: nebius.iam.v1.AccessKeyService.GetById:output_type -> nebius.iam.v1.AccessKey + 16, // 24: nebius.iam.v1.AccessKeyService.GetByAwsId:output_type -> nebius.iam.v1.AccessKey + 11, // 25: nebius.iam.v1.AccessKeyService.GetSecretOnce:output_type -> nebius.iam.v1.GetAccessKeySecretOnceResponse + 17, // 26: nebius.iam.v1.AccessKeyService.Activate:output_type -> nebius.common.v1.Operation + 17, // 27: nebius.iam.v1.AccessKeyService.Deactivate:output_type -> nebius.common.v1.Operation + 17, // 28: nebius.iam.v1.AccessKeyService.Delete:output_type -> nebius.common.v1.Operation + 19, // [19:29] is the sub-list for method output_type + 9, // [9:19] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_access_key_service_proto_init() } +func file_nebius_iam_v1_access_key_service_proto_init() { + if File_nebius_iam_v1_access_key_service_proto != nil { + return + } + file_nebius_iam_v1_access_key_proto_init() + file_nebius_iam_v1_access_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_access_key_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateAccessKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*KeyIdentity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetAccessKeySecretOnceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetAccessKeyByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetAccessKeyByAwsIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListAccessKeysRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListAccessKeysByAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAccessKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ActivateAccessKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*DeactivateAccessKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAccessKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*GetAccessKeySecretOnceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ListAccessKeysResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[1].OneofWrappers = []any{ + (*KeyIdentity_Id)(nil), + (*KeyIdentity_AwsAccessKeyId)(nil), + } + file_nebius_iam_v1_access_key_service_proto_msgTypes[5].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_access_key_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_access_key_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_access_key_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_access_key_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_access_key_service_proto = out.File + file_nebius_iam_v1_access_key_service_proto_rawDesc = nil + file_nebius_iam_v1_access_key_service_proto_goTypes = nil + file_nebius_iam_v1_access_key_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/access_key_service.sensitive.pb.go b/proto/nebius/iam/v1/access_key_service.sensitive.pb.go new file mode 100644 index 0000000..fba3b64 --- /dev/null +++ b/proto/nebius/iam/v1/access_key_service.sensitive.pb.go @@ -0,0 +1,132 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *CreateAccessKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateAccessKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *KeyIdentity) Sanitize() // is not generated as no sensitive fields found +// func (x *KeyIdentity) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAccessKeySecretOnceRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAccessKeySecretOnceRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAccessKeyByIdRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAccessKeyByIdRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAccessKeyByAwsIdRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAccessKeyByAwsIdRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAccessKeysRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAccessKeysRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAccessKeysByAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAccessKeysByAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateAccessKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateAccessKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ActivateAccessKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ActivateAccessKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeactivateAccessKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeactivateAccessKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteAccessKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteAccessKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [GetAccessKeySecretOnceResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *GetAccessKeySecretOnceResponse) Sanitize() { + if x == nil { + return + } + x.Secret = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [GetAccessKeySecretOnceResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *GetAccessKeySecretOnceResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [GetAccessKeySecretOnceResponse], use the following code: +// +// var original *GetAccessKeySecretOnceResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*GetAccessKeySecretOnceResponse) +func (x *GetAccessKeySecretOnceResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*GetAccessKeySecretOnceResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperGetAccessKeySecretOnceResponse)(c)) +} + +// wrapperGetAccessKeySecretOnceResponse is used to return [GetAccessKeySecretOnceResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperGetAccessKeySecretOnceResponse GetAccessKeySecretOnceResponse + +func (w *wrapperGetAccessKeySecretOnceResponse) String() string { + return (*GetAccessKeySecretOnceResponse)(w).String() +} + +func (*wrapperGetAccessKeySecretOnceResponse) ProtoMessage() {} + +func (w *wrapperGetAccessKeySecretOnceResponse) ProtoReflect() protoreflect.Message { + return (*GetAccessKeySecretOnceResponse)(w).ProtoReflect() +} + +// Sanitize mutates [ListAccessKeysResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListAccessKeysResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListAccessKeysResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListAccessKeysResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListAccessKeysResponse], use the following code: +// +// var original *ListAccessKeysResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListAccessKeysResponse) +func (x *ListAccessKeysResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListAccessKeysResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListAccessKeysResponse)(c)) +} + +// wrapperListAccessKeysResponse is used to return [ListAccessKeysResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListAccessKeysResponse ListAccessKeysResponse + +func (w *wrapperListAccessKeysResponse) String() string { + return (*ListAccessKeysResponse)(w).String() +} + +func (*wrapperListAccessKeysResponse) ProtoMessage() {} + +func (w *wrapperListAccessKeysResponse) ProtoReflect() protoreflect.Message { + return (*ListAccessKeysResponse)(w).ProtoReflect() +} diff --git a/proto/nebius/iam/v1/access_key_service_grpc.pb.go b/proto/nebius/iam/v1/access_key_service_grpc.pb.go new file mode 100644 index 0000000..b376cd7 --- /dev/null +++ b/proto/nebius/iam/v1/access_key_service_grpc.pb.go @@ -0,0 +1,441 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/access_key_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AccessKeyService_Create_FullMethodName = "/nebius.iam.v1.AccessKeyService/Create" + AccessKeyService_List_FullMethodName = "/nebius.iam.v1.AccessKeyService/List" + AccessKeyService_ListByAccount_FullMethodName = "/nebius.iam.v1.AccessKeyService/ListByAccount" + AccessKeyService_Update_FullMethodName = "/nebius.iam.v1.AccessKeyService/Update" + AccessKeyService_GetById_FullMethodName = "/nebius.iam.v1.AccessKeyService/GetById" + AccessKeyService_GetByAwsId_FullMethodName = "/nebius.iam.v1.AccessKeyService/GetByAwsId" + AccessKeyService_GetSecretOnce_FullMethodName = "/nebius.iam.v1.AccessKeyService/GetSecretOnce" + AccessKeyService_Activate_FullMethodName = "/nebius.iam.v1.AccessKeyService/Activate" + AccessKeyService_Deactivate_FullMethodName = "/nebius.iam.v1.AccessKeyService/Deactivate" + AccessKeyService_Delete_FullMethodName = "/nebius.iam.v1.AccessKeyService/Delete" +) + +// AccessKeyServiceClient is the client API for AccessKeyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AccessKeyServiceClient interface { + Create(ctx context.Context, in *CreateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + List(ctx context.Context, in *ListAccessKeysRequest, opts ...grpc.CallOption) (*ListAccessKeysResponse, error) + ListByAccount(ctx context.Context, in *ListAccessKeysByAccountRequest, opts ...grpc.CallOption) (*ListAccessKeysResponse, error) + Update(ctx context.Context, in *UpdateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + GetById(ctx context.Context, in *GetAccessKeyByIdRequest, opts ...grpc.CallOption) (*AccessKey, error) + GetByAwsId(ctx context.Context, in *GetAccessKeyByAwsIdRequest, opts ...grpc.CallOption) (*AccessKey, error) + GetSecretOnce(ctx context.Context, in *GetAccessKeySecretOnceRequest, opts ...grpc.CallOption) (*GetAccessKeySecretOnceResponse, error) + Activate(ctx context.Context, in *ActivateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Deactivate(ctx context.Context, in *DeactivateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type accessKeyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccessKeyServiceClient(cc grpc.ClientConnInterface) AccessKeyServiceClient { + return &accessKeyServiceClient{cc} +} + +func (c *accessKeyServiceClient) Create(ctx context.Context, in *CreateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AccessKeyService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) List(ctx context.Context, in *ListAccessKeysRequest, opts ...grpc.CallOption) (*ListAccessKeysResponse, error) { + out := new(ListAccessKeysResponse) + err := c.cc.Invoke(ctx, AccessKeyService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) ListByAccount(ctx context.Context, in *ListAccessKeysByAccountRequest, opts ...grpc.CallOption) (*ListAccessKeysResponse, error) { + out := new(ListAccessKeysResponse) + err := c.cc.Invoke(ctx, AccessKeyService_ListByAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) Update(ctx context.Context, in *UpdateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AccessKeyService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) GetById(ctx context.Context, in *GetAccessKeyByIdRequest, opts ...grpc.CallOption) (*AccessKey, error) { + out := new(AccessKey) + err := c.cc.Invoke(ctx, AccessKeyService_GetById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) GetByAwsId(ctx context.Context, in *GetAccessKeyByAwsIdRequest, opts ...grpc.CallOption) (*AccessKey, error) { + out := new(AccessKey) + err := c.cc.Invoke(ctx, AccessKeyService_GetByAwsId_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) GetSecretOnce(ctx context.Context, in *GetAccessKeySecretOnceRequest, opts ...grpc.CallOption) (*GetAccessKeySecretOnceResponse, error) { + out := new(GetAccessKeySecretOnceResponse) + err := c.cc.Invoke(ctx, AccessKeyService_GetSecretOnce_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) Activate(ctx context.Context, in *ActivateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AccessKeyService_Activate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) Deactivate(ctx context.Context, in *DeactivateAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AccessKeyService_Deactivate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accessKeyServiceClient) Delete(ctx context.Context, in *DeleteAccessKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AccessKeyService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccessKeyServiceServer is the server API for AccessKeyService service. +// All implementations should embed UnimplementedAccessKeyServiceServer +// for forward compatibility +type AccessKeyServiceServer interface { + Create(context.Context, *CreateAccessKeyRequest) (*v1.Operation, error) + List(context.Context, *ListAccessKeysRequest) (*ListAccessKeysResponse, error) + ListByAccount(context.Context, *ListAccessKeysByAccountRequest) (*ListAccessKeysResponse, error) + Update(context.Context, *UpdateAccessKeyRequest) (*v1.Operation, error) + GetById(context.Context, *GetAccessKeyByIdRequest) (*AccessKey, error) + GetByAwsId(context.Context, *GetAccessKeyByAwsIdRequest) (*AccessKey, error) + GetSecretOnce(context.Context, *GetAccessKeySecretOnceRequest) (*GetAccessKeySecretOnceResponse, error) + Activate(context.Context, *ActivateAccessKeyRequest) (*v1.Operation, error) + Deactivate(context.Context, *DeactivateAccessKeyRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteAccessKeyRequest) (*v1.Operation, error) +} + +// UnimplementedAccessKeyServiceServer should be embedded to have forward compatible implementations. +type UnimplementedAccessKeyServiceServer struct { +} + +func (UnimplementedAccessKeyServiceServer) Create(context.Context, *CreateAccessKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedAccessKeyServiceServer) List(context.Context, *ListAccessKeysRequest) (*ListAccessKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedAccessKeyServiceServer) ListByAccount(context.Context, *ListAccessKeysByAccountRequest) (*ListAccessKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByAccount not implemented") +} +func (UnimplementedAccessKeyServiceServer) Update(context.Context, *UpdateAccessKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedAccessKeyServiceServer) GetById(context.Context, *GetAccessKeyByIdRequest) (*AccessKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetById not implemented") +} +func (UnimplementedAccessKeyServiceServer) GetByAwsId(context.Context, *GetAccessKeyByAwsIdRequest) (*AccessKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByAwsId not implemented") +} +func (UnimplementedAccessKeyServiceServer) GetSecretOnce(context.Context, *GetAccessKeySecretOnceRequest) (*GetAccessKeySecretOnceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSecretOnce not implemented") +} +func (UnimplementedAccessKeyServiceServer) Activate(context.Context, *ActivateAccessKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") +} +func (UnimplementedAccessKeyServiceServer) Deactivate(context.Context, *DeactivateAccessKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented") +} +func (UnimplementedAccessKeyServiceServer) Delete(context.Context, *DeleteAccessKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeAccessKeyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccessKeyServiceServer will +// result in compilation errors. +type UnsafeAccessKeyServiceServer interface { + mustEmbedUnimplementedAccessKeyServiceServer() +} + +func RegisterAccessKeyServiceServer(s grpc.ServiceRegistrar, srv AccessKeyServiceServer) { + s.RegisterService(&AccessKeyService_ServiceDesc, srv) +} + +func _AccessKeyService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAccessKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).Create(ctx, req.(*CreateAccessKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccessKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).List(ctx, req.(*ListAccessKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_ListByAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccessKeysByAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).ListByAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_ListByAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).ListByAccount(ctx, req.(*ListAccessKeysByAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccessKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).Update(ctx, req.(*UpdateAccessKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_GetById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccessKeyByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).GetById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_GetById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).GetById(ctx, req.(*GetAccessKeyByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_GetByAwsId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccessKeyByAwsIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).GetByAwsId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_GetByAwsId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).GetByAwsId(ctx, req.(*GetAccessKeyByAwsIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_GetSecretOnce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccessKeySecretOnceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).GetSecretOnce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_GetSecretOnce_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).GetSecretOnce(ctx, req.(*GetAccessKeySecretOnceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActivateAccessKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).Activate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_Activate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).Activate(ctx, req.(*ActivateAccessKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeactivateAccessKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).Deactivate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_Deactivate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).Deactivate(ctx, req.(*DeactivateAccessKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccessKeyService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAccessKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccessKeyServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccessKeyService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccessKeyServiceServer).Delete(ctx, req.(*DeleteAccessKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AccessKeyService_ServiceDesc is the grpc.ServiceDesc for AccessKeyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AccessKeyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.AccessKeyService", + HandlerType: (*AccessKeyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _AccessKeyService_Create_Handler, + }, + { + MethodName: "List", + Handler: _AccessKeyService_List_Handler, + }, + { + MethodName: "ListByAccount", + Handler: _AccessKeyService_ListByAccount_Handler, + }, + { + MethodName: "Update", + Handler: _AccessKeyService_Update_Handler, + }, + { + MethodName: "GetById", + Handler: _AccessKeyService_GetById_Handler, + }, + { + MethodName: "GetByAwsId", + Handler: _AccessKeyService_GetByAwsId_Handler, + }, + { + MethodName: "GetSecretOnce", + Handler: _AccessKeyService_GetSecretOnce_Handler, + }, + { + MethodName: "Activate", + Handler: _AccessKeyService_Activate_Handler, + }, + { + MethodName: "Deactivate", + Handler: _AccessKeyService_Deactivate_Handler, + }, + { + MethodName: "Delete", + Handler: _AccessKeyService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/access_key_service.proto", +} diff --git a/proto/nebius/iam/v1/auth_public_key.pb.go b/proto/nebius/iam/v1/auth_public_key.pb.go new file mode 100644 index 0000000..8cd83bc --- /dev/null +++ b/proto/nebius/iam/v1/auth_public_key.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/auth_public_key.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AuthPublicKeyStatus_State int32 + +const ( + AuthPublicKeyStatus_STATE_UNSPECIFIED AuthPublicKeyStatus_State = 0 + AuthPublicKeyStatus_ACTIVE AuthPublicKeyStatus_State = 1 + AuthPublicKeyStatus_INACTIVE AuthPublicKeyStatus_State = 2 + AuthPublicKeyStatus_EXPIRED AuthPublicKeyStatus_State = 3 + AuthPublicKeyStatus_DELETING AuthPublicKeyStatus_State = 4 + AuthPublicKeyStatus_DELETED AuthPublicKeyStatus_State = 5 +) + +// Enum value maps for AuthPublicKeyStatus_State. +var ( + AuthPublicKeyStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ACTIVE", + 2: "INACTIVE", + 3: "EXPIRED", + 4: "DELETING", + 5: "DELETED", + } + AuthPublicKeyStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "EXPIRED": 3, + "DELETING": 4, + "DELETED": 5, + } +) + +func (x AuthPublicKeyStatus_State) Enum() *AuthPublicKeyStatus_State { + p := new(AuthPublicKeyStatus_State) + *p = x + return p +} + +func (x AuthPublicKeyStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AuthPublicKeyStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_auth_public_key_proto_enumTypes[0].Descriptor() +} + +func (AuthPublicKeyStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_auth_public_key_proto_enumTypes[0] +} + +func (x AuthPublicKeyStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AuthPublicKeyStatus_State.Descriptor instead. +func (AuthPublicKeyStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_proto_rawDescGZIP(), []int{2, 0} +} + +type AuthPublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AuthPublicKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *AuthPublicKeyStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *AuthPublicKey) Reset() { + *x = AuthPublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthPublicKey) ProtoMessage() {} + +func (x *AuthPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthPublicKey.ProtoReflect.Descriptor instead. +func (*AuthPublicKey) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_proto_rawDescGZIP(), []int{0} +} + +func (x *AuthPublicKey) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AuthPublicKey) GetSpec() *AuthPublicKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *AuthPublicKey) GetStatus() *AuthPublicKeyStatus { + if x != nil { + return x.Status + } + return nil +} + +type AuthPublicKeySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *AuthPublicKeySpec) Reset() { + *x = AuthPublicKeySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthPublicKeySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthPublicKeySpec) ProtoMessage() {} + +func (x *AuthPublicKeySpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthPublicKeySpec.ProtoReflect.Descriptor instead. +func (*AuthPublicKeySpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthPublicKeySpec) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *AuthPublicKeySpec) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *AuthPublicKeySpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AuthPublicKeySpec) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +type AuthPublicKeyStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State AuthPublicKeyStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.iam.v1.AuthPublicKeyStatus_State" json:"state,omitempty"` + Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + KeySize int32 `protobuf:"varint,4,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"` +} + +func (x *AuthPublicKeyStatus) Reset() { + *x = AuthPublicKeyStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthPublicKeyStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthPublicKeyStatus) ProtoMessage() {} + +func (x *AuthPublicKeyStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthPublicKeyStatus.ProtoReflect.Descriptor instead. +func (*AuthPublicKeyStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_proto_rawDescGZIP(), []int{2} +} + +func (x *AuthPublicKeyStatus) GetState() AuthPublicKeyStatus_State { + if x != nil { + return x.State + } + return AuthPublicKeyStatus_STATE_UNSPECIFIED +} + +func (x *AuthPublicKeyStatus) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +func (x *AuthPublicKeyStatus) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *AuthPublicKeyStatus) GetKeySize() int32 { + if x != nil { + return x.KeySize + } + return 0 +} + +var File_nebius_iam_v1_auth_public_key_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_auth_public_key_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x41, 0x75, + 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x41, 0x75, + 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x36, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x92, 0x02, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x19, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x60, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x59, 0x0a, 0x14, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x42, 0x12, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_auth_public_key_proto_rawDescOnce sync.Once + file_nebius_iam_v1_auth_public_key_proto_rawDescData = file_nebius_iam_v1_auth_public_key_proto_rawDesc +) + +func file_nebius_iam_v1_auth_public_key_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_auth_public_key_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_auth_public_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_auth_public_key_proto_rawDescData) + }) + return file_nebius_iam_v1_auth_public_key_proto_rawDescData +} + +var file_nebius_iam_v1_auth_public_key_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_auth_public_key_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_auth_public_key_proto_goTypes = []any{ + (AuthPublicKeyStatus_State)(0), // 0: nebius.iam.v1.AuthPublicKeyStatus.State + (*AuthPublicKey)(nil), // 1: nebius.iam.v1.AuthPublicKey + (*AuthPublicKeySpec)(nil), // 2: nebius.iam.v1.AuthPublicKeySpec + (*AuthPublicKeyStatus)(nil), // 3: nebius.iam.v1.AuthPublicKeyStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata + (*Account)(nil), // 5: nebius.iam.v1.Account + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_nebius_iam_v1_auth_public_key_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.AuthPublicKey.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.iam.v1.AuthPublicKey.spec:type_name -> nebius.iam.v1.AuthPublicKeySpec + 3, // 2: nebius.iam.v1.AuthPublicKey.status:type_name -> nebius.iam.v1.AuthPublicKeyStatus + 5, // 3: nebius.iam.v1.AuthPublicKeySpec.account:type_name -> nebius.iam.v1.Account + 6, // 4: nebius.iam.v1.AuthPublicKeySpec.expires_at:type_name -> google.protobuf.Timestamp + 0, // 5: nebius.iam.v1.AuthPublicKeyStatus.state:type_name -> nebius.iam.v1.AuthPublicKeyStatus.State + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_auth_public_key_proto_init() } +func file_nebius_iam_v1_auth_public_key_proto_init() { + if File_nebius_iam_v1_auth_public_key_proto != nil { + return + } + file_nebius_iam_v1_access_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_auth_public_key_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AuthPublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AuthPublicKeySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AuthPublicKeyStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_auth_public_key_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_auth_public_key_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_auth_public_key_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_auth_public_key_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_auth_public_key_proto_msgTypes, + }.Build() + File_nebius_iam_v1_auth_public_key_proto = out.File + file_nebius_iam_v1_auth_public_key_proto_rawDesc = nil + file_nebius_iam_v1_auth_public_key_proto_goTypes = nil + file_nebius_iam_v1_auth_public_key_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/auth_public_key.sensitive.pb.go b/proto/nebius/iam/v1/auth_public_key.sensitive.pb.go new file mode 100644 index 0000000..d5fac0f --- /dev/null +++ b/proto/nebius/iam/v1/auth_public_key.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *AuthPublicKey) Sanitize() // is not generated as no sensitive fields found +// func (x *AuthPublicKey) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AuthPublicKeySpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AuthPublicKeySpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AuthPublicKeyStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *AuthPublicKeyStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/auth_public_key_service.pb.go b/proto/nebius/iam/v1/auth_public_key_service.pb.go new file mode 100644 index 0000000..81247a6 --- /dev/null +++ b/proto/nebius/iam/v1/auth_public_key_service.pb.go @@ -0,0 +1,857 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/auth_public_key_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AuthPublicKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateAuthPublicKeyRequest) Reset() { + *x = CreateAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAuthPublicKeyRequest) ProtoMessage() {} + +func (x *CreateAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*CreateAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateAuthPublicKeyRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateAuthPublicKeyRequest) GetSpec() *AuthPublicKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAuthPublicKeyRequest) Reset() { + *x = GetAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAuthPublicKeyRequest) ProtoMessage() {} + +func (x *GetAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*GetAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAuthPublicKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the container ID. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListAuthPublicKeyRequest) Reset() { + *x = ListAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuthPublicKeyRequest) ProtoMessage() {} + +func (x *ListAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*ListAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAuthPublicKeyRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListAuthPublicKeyRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListAuthPublicKeyRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAuthPublicKeyRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListAuthPublicKeyByAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the parent account ID. + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListAuthPublicKeyByAccountRequest) Reset() { + *x = ListAuthPublicKeyByAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAuthPublicKeyByAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuthPublicKeyByAccountRequest) ProtoMessage() {} + +func (x *ListAuthPublicKeyByAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuthPublicKeyByAccountRequest.ProtoReflect.Descriptor instead. +func (*ListAuthPublicKeyByAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAuthPublicKeyByAccountRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *ListAuthPublicKeyByAccountRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAuthPublicKeyByAccountRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAuthPublicKeyByAccountRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type UpdateAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AuthPublicKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateAuthPublicKeyRequest) Reset() { + *x = UpdateAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAuthPublicKeyRequest) ProtoMessage() {} + +func (x *UpdateAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*UpdateAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateAuthPublicKeyRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateAuthPublicKeyRequest) GetSpec() *AuthPublicKeySpec { + if x != nil { + return x.Spec + } + return nil +} + +type ActivateAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ActivateAuthPublicKeyRequest) Reset() { + *x = ActivateAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActivateAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivateAuthPublicKeyRequest) ProtoMessage() {} + +func (x *ActivateAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivateAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*ActivateAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ActivateAuthPublicKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeactivateAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeactivateAuthPublicKeyRequest) Reset() { + *x = DeactivateAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeactivateAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateAuthPublicKeyRequest) ProtoMessage() {} + +func (x *DeactivateAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*DeactivateAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeactivateAuthPublicKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteAuthPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteAuthPublicKeyRequest) Reset() { + *x = DeleteAuthPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAuthPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAuthPublicKeyRequest) ProtoMessage() {} + +func (x *DeleteAuthPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAuthPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*DeleteAuthPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAuthPublicKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListAuthPublicKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of auth public keys returned in the response. The field should be named as `items` for consistency. + Items []*AuthPublicKey `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAuthPublicKeyResponse) Reset() { + *x = ListAuthPublicKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAuthPublicKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuthPublicKeyResponse) ProtoMessage() {} + +func (x *ListAuthPublicKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuthPublicKeyResponse.ProtoReflect.Descriptor instead. +func (*ListAuthPublicKeyResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ListAuthPublicKeyResponse) GetItems() []*AuthPublicKey { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListAuthPublicKeyResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_auth_public_key_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_auth_public_key_service_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x1a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, + 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x9e, 0x01, 0x0a, 0x18, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x21, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x30, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x92, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x2e, 0x0a, 0x1c, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x1e, + 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, + 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x77, 0x0a, 0x19, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xdd, 0x05, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x4b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x59, 0x0a, + 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, + 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, + 0x0a, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, + 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x60, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x19, 0x41, + 0x75, 0x74, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_auth_public_key_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_auth_public_key_service_proto_rawDescData = file_nebius_iam_v1_auth_public_key_service_proto_rawDesc +) + +func file_nebius_iam_v1_auth_public_key_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_auth_public_key_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_auth_public_key_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_auth_public_key_service_proto_rawDescData) + }) + return file_nebius_iam_v1_auth_public_key_service_proto_rawDescData +} + +var file_nebius_iam_v1_auth_public_key_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_iam_v1_auth_public_key_service_proto_goTypes = []any{ + (*CreateAuthPublicKeyRequest)(nil), // 0: nebius.iam.v1.CreateAuthPublicKeyRequest + (*GetAuthPublicKeyRequest)(nil), // 1: nebius.iam.v1.GetAuthPublicKeyRequest + (*ListAuthPublicKeyRequest)(nil), // 2: nebius.iam.v1.ListAuthPublicKeyRequest + (*ListAuthPublicKeyByAccountRequest)(nil), // 3: nebius.iam.v1.ListAuthPublicKeyByAccountRequest + (*UpdateAuthPublicKeyRequest)(nil), // 4: nebius.iam.v1.UpdateAuthPublicKeyRequest + (*ActivateAuthPublicKeyRequest)(nil), // 5: nebius.iam.v1.ActivateAuthPublicKeyRequest + (*DeactivateAuthPublicKeyRequest)(nil), // 6: nebius.iam.v1.DeactivateAuthPublicKeyRequest + (*DeleteAuthPublicKeyRequest)(nil), // 7: nebius.iam.v1.DeleteAuthPublicKeyRequest + (*ListAuthPublicKeyResponse)(nil), // 8: nebius.iam.v1.ListAuthPublicKeyResponse + (*v1.ResourceMetadata)(nil), // 9: nebius.common.v1.ResourceMetadata + (*AuthPublicKeySpec)(nil), // 10: nebius.iam.v1.AuthPublicKeySpec + (*Account)(nil), // 11: nebius.iam.v1.Account + (*AuthPublicKey)(nil), // 12: nebius.iam.v1.AuthPublicKey + (*v1.Operation)(nil), // 13: nebius.common.v1.Operation +} +var file_nebius_iam_v1_auth_public_key_service_proto_depIdxs = []int32{ + 9, // 0: nebius.iam.v1.CreateAuthPublicKeyRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 10, // 1: nebius.iam.v1.CreateAuthPublicKeyRequest.spec:type_name -> nebius.iam.v1.AuthPublicKeySpec + 11, // 2: nebius.iam.v1.ListAuthPublicKeyByAccountRequest.account:type_name -> nebius.iam.v1.Account + 9, // 3: nebius.iam.v1.UpdateAuthPublicKeyRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 10, // 4: nebius.iam.v1.UpdateAuthPublicKeyRequest.spec:type_name -> nebius.iam.v1.AuthPublicKeySpec + 12, // 5: nebius.iam.v1.ListAuthPublicKeyResponse.items:type_name -> nebius.iam.v1.AuthPublicKey + 0, // 6: nebius.iam.v1.AuthPublicKeyService.Create:input_type -> nebius.iam.v1.CreateAuthPublicKeyRequest + 1, // 7: nebius.iam.v1.AuthPublicKeyService.Get:input_type -> nebius.iam.v1.GetAuthPublicKeyRequest + 2, // 8: nebius.iam.v1.AuthPublicKeyService.List:input_type -> nebius.iam.v1.ListAuthPublicKeyRequest + 3, // 9: nebius.iam.v1.AuthPublicKeyService.ListByAccount:input_type -> nebius.iam.v1.ListAuthPublicKeyByAccountRequest + 4, // 10: nebius.iam.v1.AuthPublicKeyService.Update:input_type -> nebius.iam.v1.UpdateAuthPublicKeyRequest + 5, // 11: nebius.iam.v1.AuthPublicKeyService.Activate:input_type -> nebius.iam.v1.ActivateAuthPublicKeyRequest + 6, // 12: nebius.iam.v1.AuthPublicKeyService.Deactivate:input_type -> nebius.iam.v1.DeactivateAuthPublicKeyRequest + 7, // 13: nebius.iam.v1.AuthPublicKeyService.Delete:input_type -> nebius.iam.v1.DeleteAuthPublicKeyRequest + 13, // 14: nebius.iam.v1.AuthPublicKeyService.Create:output_type -> nebius.common.v1.Operation + 12, // 15: nebius.iam.v1.AuthPublicKeyService.Get:output_type -> nebius.iam.v1.AuthPublicKey + 8, // 16: nebius.iam.v1.AuthPublicKeyService.List:output_type -> nebius.iam.v1.ListAuthPublicKeyResponse + 8, // 17: nebius.iam.v1.AuthPublicKeyService.ListByAccount:output_type -> nebius.iam.v1.ListAuthPublicKeyResponse + 13, // 18: nebius.iam.v1.AuthPublicKeyService.Update:output_type -> nebius.common.v1.Operation + 13, // 19: nebius.iam.v1.AuthPublicKeyService.Activate:output_type -> nebius.common.v1.Operation + 13, // 20: nebius.iam.v1.AuthPublicKeyService.Deactivate:output_type -> nebius.common.v1.Operation + 13, // 21: nebius.iam.v1.AuthPublicKeyService.Delete:output_type -> nebius.common.v1.Operation + 14, // [14:22] is the sub-list for method output_type + 6, // [6:14] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_auth_public_key_service_proto_init() } +func file_nebius_iam_v1_auth_public_key_service_proto_init() { + if File_nebius_iam_v1_auth_public_key_service_proto != nil { + return + } + file_nebius_iam_v1_auth_public_key_proto_init() + file_nebius_iam_v1_access_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListAuthPublicKeyByAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ActivateAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeactivateAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAuthPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListAuthPublicKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_auth_public_key_service_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_auth_public_key_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_auth_public_key_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_auth_public_key_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_auth_public_key_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_auth_public_key_service_proto = out.File + file_nebius_iam_v1_auth_public_key_service_proto_rawDesc = nil + file_nebius_iam_v1_auth_public_key_service_proto_goTypes = nil + file_nebius_iam_v1_auth_public_key_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/auth_public_key_service.sensitive.pb.go b/proto/nebius/iam/v1/auth_public_key_service.sensitive.pb.go new file mode 100644 index 0000000..79fc901 --- /dev/null +++ b/proto/nebius/iam/v1/auth_public_key_service.sensitive.pb.go @@ -0,0 +1,30 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAuthPublicKeyByAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAuthPublicKeyByAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ActivateAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ActivateAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeactivateAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeactivateAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteAuthPublicKeyRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteAuthPublicKeyRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAuthPublicKeyResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAuthPublicKeyResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/auth_public_key_service_grpc.pb.go b/proto/nebius/iam/v1/auth_public_key_service_grpc.pb.go new file mode 100644 index 0000000..4421fe1 --- /dev/null +++ b/proto/nebius/iam/v1/auth_public_key_service_grpc.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/auth_public_key_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AuthPublicKeyService_Create_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Create" + AuthPublicKeyService_Get_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Get" + AuthPublicKeyService_List_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/List" + AuthPublicKeyService_ListByAccount_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/ListByAccount" + AuthPublicKeyService_Update_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Update" + AuthPublicKeyService_Activate_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Activate" + AuthPublicKeyService_Deactivate_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Deactivate" + AuthPublicKeyService_Delete_FullMethodName = "/nebius.iam.v1.AuthPublicKeyService/Delete" +) + +// AuthPublicKeyServiceClient is the client API for AuthPublicKeyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthPublicKeyServiceClient interface { + Create(ctx context.Context, in *CreateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetAuthPublicKeyRequest, opts ...grpc.CallOption) (*AuthPublicKey, error) + List(ctx context.Context, in *ListAuthPublicKeyRequest, opts ...grpc.CallOption) (*ListAuthPublicKeyResponse, error) + ListByAccount(ctx context.Context, in *ListAuthPublicKeyByAccountRequest, opts ...grpc.CallOption) (*ListAuthPublicKeyResponse, error) + Update(ctx context.Context, in *UpdateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Activate(ctx context.Context, in *ActivateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Deactivate(ctx context.Context, in *DeactivateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type authPublicKeyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthPublicKeyServiceClient(cc grpc.ClientConnInterface) AuthPublicKeyServiceClient { + return &authPublicKeyServiceClient{cc} +} + +func (c *authPublicKeyServiceClient) Create(ctx context.Context, in *CreateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) Get(ctx context.Context, in *GetAuthPublicKeyRequest, opts ...grpc.CallOption) (*AuthPublicKey, error) { + out := new(AuthPublicKey) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) List(ctx context.Context, in *ListAuthPublicKeyRequest, opts ...grpc.CallOption) (*ListAuthPublicKeyResponse, error) { + out := new(ListAuthPublicKeyResponse) + err := c.cc.Invoke(ctx, AuthPublicKeyService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) ListByAccount(ctx context.Context, in *ListAuthPublicKeyByAccountRequest, opts ...grpc.CallOption) (*ListAuthPublicKeyResponse, error) { + out := new(ListAuthPublicKeyResponse) + err := c.cc.Invoke(ctx, AuthPublicKeyService_ListByAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) Update(ctx context.Context, in *UpdateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) Activate(ctx context.Context, in *ActivateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Activate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) Deactivate(ctx context.Context, in *DeactivateAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Deactivate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authPublicKeyServiceClient) Delete(ctx context.Context, in *DeleteAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AuthPublicKeyService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthPublicKeyServiceServer is the server API for AuthPublicKeyService service. +// All implementations should embed UnimplementedAuthPublicKeyServiceServer +// for forward compatibility +type AuthPublicKeyServiceServer interface { + Create(context.Context, *CreateAuthPublicKeyRequest) (*v1.Operation, error) + Get(context.Context, *GetAuthPublicKeyRequest) (*AuthPublicKey, error) + List(context.Context, *ListAuthPublicKeyRequest) (*ListAuthPublicKeyResponse, error) + ListByAccount(context.Context, *ListAuthPublicKeyByAccountRequest) (*ListAuthPublicKeyResponse, error) + Update(context.Context, *UpdateAuthPublicKeyRequest) (*v1.Operation, error) + Activate(context.Context, *ActivateAuthPublicKeyRequest) (*v1.Operation, error) + Deactivate(context.Context, *DeactivateAuthPublicKeyRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteAuthPublicKeyRequest) (*v1.Operation, error) +} + +// UnimplementedAuthPublicKeyServiceServer should be embedded to have forward compatible implementations. +type UnimplementedAuthPublicKeyServiceServer struct { +} + +func (UnimplementedAuthPublicKeyServiceServer) Create(context.Context, *CreateAuthPublicKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) Get(context.Context, *GetAuthPublicKeyRequest) (*AuthPublicKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) List(context.Context, *ListAuthPublicKeyRequest) (*ListAuthPublicKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) ListByAccount(context.Context, *ListAuthPublicKeyByAccountRequest) (*ListAuthPublicKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByAccount not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) Update(context.Context, *UpdateAuthPublicKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) Activate(context.Context, *ActivateAuthPublicKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) Deactivate(context.Context, *DeactivateAuthPublicKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented") +} +func (UnimplementedAuthPublicKeyServiceServer) Delete(context.Context, *DeleteAuthPublicKeyRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeAuthPublicKeyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthPublicKeyServiceServer will +// result in compilation errors. +type UnsafeAuthPublicKeyServiceServer interface { + mustEmbedUnimplementedAuthPublicKeyServiceServer() +} + +func RegisterAuthPublicKeyServiceServer(s grpc.ServiceRegistrar, srv AuthPublicKeyServiceServer) { + s.RegisterService(&AuthPublicKeyService_ServiceDesc, srv) +} + +func _AuthPublicKeyService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Create(ctx, req.(*CreateAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Get(ctx, req.(*GetAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).List(ctx, req.(*ListAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_ListByAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAuthPublicKeyByAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).ListByAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_ListByAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).ListByAccount(ctx, req.(*ListAuthPublicKeyByAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Update(ctx, req.(*UpdateAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActivateAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Activate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Activate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Activate(ctx, req.(*ActivateAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeactivateAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Deactivate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Deactivate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Deactivate(ctx, req.(*DeactivateAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthPublicKeyService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAuthPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthPublicKeyServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthPublicKeyService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthPublicKeyServiceServer).Delete(ctx, req.(*DeleteAuthPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AuthPublicKeyService_ServiceDesc is the grpc.ServiceDesc for AuthPublicKeyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AuthPublicKeyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.AuthPublicKeyService", + HandlerType: (*AuthPublicKeyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _AuthPublicKeyService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _AuthPublicKeyService_Get_Handler, + }, + { + MethodName: "List", + Handler: _AuthPublicKeyService_List_Handler, + }, + { + MethodName: "ListByAccount", + Handler: _AuthPublicKeyService_ListByAccount_Handler, + }, + { + MethodName: "Update", + Handler: _AuthPublicKeyService_Update_Handler, + }, + { + MethodName: "Activate", + Handler: _AuthPublicKeyService_Activate_Handler, + }, + { + MethodName: "Deactivate", + Handler: _AuthPublicKeyService_Deactivate_Handler, + }, + { + MethodName: "Delete", + Handler: _AuthPublicKeyService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/auth_public_key_service.proto", +} diff --git a/proto/nebius/iam/v1/container.pb.go b/proto/nebius/iam/v1/container.pb.go new file mode 100644 index 0000000..6bf32f7 --- /dev/null +++ b/proto/nebius/iam/v1/container.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/container.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Container struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ContainerSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ContainerStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Container) Reset() { + *x = Container{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_container_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Container) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Container) ProtoMessage() {} + +func (x *Container) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_container_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Container.ProtoReflect.Descriptor instead. +func (*Container) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_container_proto_rawDescGZIP(), []int{0} +} + +func (x *Container) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Container) GetSpec() *ContainerSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Container) GetStatus() *ContainerStatus { + if x != nil { + return x.Status + } + return nil +} + +type ContainerSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ContainerSpec) Reset() { + *x = ContainerSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_container_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerSpec) ProtoMessage() {} + +func (x *ContainerSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_container_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerSpec.ProtoReflect.Descriptor instead. +func (*ContainerSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_container_proto_rawDescGZIP(), []int{1} +} + +type ContainerStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SuspensionState SuspensionState `protobuf:"varint,2,opt,name=suspension_state,json=suspensionState,proto3,enum=nebius.iam.v1.SuspensionState" json:"suspension_state,omitempty"` + ContainerState State `protobuf:"varint,3,opt,name=container_state,json=containerState,proto3,enum=nebius.iam.v1.State" json:"container_state,omitempty"` +} + +func (x *ContainerStatus) Reset() { + *x = ContainerStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_container_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerStatus) ProtoMessage() {} + +func (x *ContainerStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_container_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerStatus.ProtoReflect.Descriptor instead. +func (*ContainerStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_container_proto_rawDescGZIP(), []int{2} +} + +func (x *ContainerStatus) GetSuspensionState() SuspensionState { + if x != nil { + return x.SuspensionState + } + return SuspensionState_SUSPENSION_STATE_UNSPECIFIED +} + +func (x *ContainerStatus) GetContainerState() State { + if x != nil { + return x.ContainerState + } + return State_STATE_UNSPECIFIED +} + +var File_nebius_iam_v1_container_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_container_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x22, 0x9b, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x42, 0x55, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_container_proto_rawDescOnce sync.Once + file_nebius_iam_v1_container_proto_rawDescData = file_nebius_iam_v1_container_proto_rawDesc +) + +func file_nebius_iam_v1_container_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_container_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_container_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_container_proto_rawDescData) + }) + return file_nebius_iam_v1_container_proto_rawDescData +} + +var file_nebius_iam_v1_container_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_container_proto_goTypes = []any{ + (*Container)(nil), // 0: nebius.iam.v1.Container + (*ContainerSpec)(nil), // 1: nebius.iam.v1.ContainerSpec + (*ContainerStatus)(nil), // 2: nebius.iam.v1.ContainerStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata + (SuspensionState)(0), // 4: nebius.iam.v1.SuspensionState + (State)(0), // 5: nebius.iam.v1.State +} +var file_nebius_iam_v1_container_proto_depIdxs = []int32{ + 3, // 0: nebius.iam.v1.Container.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.iam.v1.Container.spec:type_name -> nebius.iam.v1.ContainerSpec + 2, // 2: nebius.iam.v1.Container.status:type_name -> nebius.iam.v1.ContainerStatus + 4, // 3: nebius.iam.v1.ContainerStatus.suspension_state:type_name -> nebius.iam.v1.SuspensionState + 5, // 4: nebius.iam.v1.ContainerStatus.container_state:type_name -> nebius.iam.v1.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_container_proto_init() } +func file_nebius_iam_v1_container_proto_init() { + if File_nebius_iam_v1_container_proto != nil { + return + } + file_nebius_iam_v1_state_proto_init() + file_nebius_iam_v1_suspension_state_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_container_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Container); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_container_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ContainerSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_container_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ContainerStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_container_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_container_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_container_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_container_proto_msgTypes, + }.Build() + File_nebius_iam_v1_container_proto = out.File + file_nebius_iam_v1_container_proto_rawDesc = nil + file_nebius_iam_v1_container_proto_goTypes = nil + file_nebius_iam_v1_container_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/container.sensitive.pb.go b/proto/nebius/iam/v1/container.sensitive.pb.go new file mode 100644 index 0000000..4c0cf87 --- /dev/null +++ b/proto/nebius/iam/v1/container.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Container) Sanitize() // is not generated as no sensitive fields found +// func (x *Container) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ContainerSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ContainerSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ContainerStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ContainerStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/federation.pb.go b/proto/nebius/iam/v1/federation.pb.go new file mode 100644 index 0000000..04fad02 --- /dev/null +++ b/proto/nebius/iam/v1/federation.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/federation.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Federation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *FederationStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Federation) Reset() { + *x = Federation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Federation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Federation) ProtoMessage() {} + +func (x *Federation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Federation.ProtoReflect.Descriptor instead. +func (*Federation) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_proto_rawDescGZIP(), []int{0} +} + +func (x *Federation) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Federation) GetSpec() *FederationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Federation) GetStatus() *FederationStatus { + if x != nil { + return x.Status + } + return nil +} + +type FederationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserAccountAutoCreation bool `protobuf:"varint,1,opt,name=user_account_auto_creation,json=userAccountAutoCreation,proto3" json:"user_account_auto_creation,omitempty"` + Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` + // Types that are assignable to Settings: + // + // *FederationSpec_SamlSettings + Settings isFederationSpec_Settings `protobuf_oneof:"settings"` +} + +func (x *FederationSpec) Reset() { + *x = FederationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FederationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FederationSpec) ProtoMessage() {} + +func (x *FederationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FederationSpec.ProtoReflect.Descriptor instead. +func (*FederationSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_proto_rawDescGZIP(), []int{1} +} + +func (x *FederationSpec) GetUserAccountAutoCreation() bool { + if x != nil { + return x.UserAccountAutoCreation + } + return false +} + +func (x *FederationSpec) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (m *FederationSpec) GetSettings() isFederationSpec_Settings { + if m != nil { + return m.Settings + } + return nil +} + +func (x *FederationSpec) GetSamlSettings() *SamlSettings { + if x, ok := x.GetSettings().(*FederationSpec_SamlSettings); ok { + return x.SamlSettings + } + return nil +} + +type isFederationSpec_Settings interface { + isFederationSpec_Settings() +} + +type FederationSpec_SamlSettings struct { + SamlSettings *SamlSettings `protobuf:"bytes,10,opt,name=saml_settings,json=samlSettings,proto3,oneof"` +} + +func (*FederationSpec_SamlSettings) isFederationSpec_Settings() {} + +type SamlSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdpIssuer string `protobuf:"bytes,1,opt,name=idp_issuer,json=idpIssuer,proto3" json:"idp_issuer,omitempty"` + SsoUrl string `protobuf:"bytes,2,opt,name=sso_url,json=ssoUrl,proto3" json:"sso_url,omitempty"` +} + +func (x *SamlSettings) Reset() { + *x = SamlSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SamlSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SamlSettings) ProtoMessage() {} + +func (x *SamlSettings) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SamlSettings.ProtoReflect.Descriptor instead. +func (*SamlSettings) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_proto_rawDescGZIP(), []int{2} +} + +func (x *SamlSettings) GetIdpIssuer() string { + if x != nil { + return x.IdpIssuer + } + return "" +} + +func (x *SamlSettings) GetSsoUrl() string { + if x != nil { + return x.SsoUrl + } + return "" +} + +type FederationStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FederationStatus) Reset() { + *x = FederationStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FederationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FederationStatus) ProtoMessage() {} + +func (x *FederationStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FederationStatus.ProtoReflect.Descriptor instead. +func (*FederationStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_proto_rawDescGZIP(), []int{3} +} + +var File_nebius_iam_v1_federation_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_federation_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0a, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xc2, + 0x01, 0x0a, 0x0e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x3b, 0x0a, 0x1a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x73, 0x61, 0x6d, 0x6c, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x6d, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x61, + 0x6d, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x11, 0x0a, 0x08, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x22, 0x46, 0x0a, 0x0c, 0x53, 0x61, 0x6d, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x64, 0x70, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x64, 0x70, 0x49, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x6f, 0x55, 0x72, 0x6c, 0x22, 0x12, 0x0a, 0x10, 0x46, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x56, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_federation_proto_rawDescOnce sync.Once + file_nebius_iam_v1_federation_proto_rawDescData = file_nebius_iam_v1_federation_proto_rawDesc +) + +func file_nebius_iam_v1_federation_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_federation_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_federation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_federation_proto_rawDescData) + }) + return file_nebius_iam_v1_federation_proto_rawDescData +} + +var file_nebius_iam_v1_federation_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_iam_v1_federation_proto_goTypes = []any{ + (*Federation)(nil), // 0: nebius.iam.v1.Federation + (*FederationSpec)(nil), // 1: nebius.iam.v1.FederationSpec + (*SamlSettings)(nil), // 2: nebius.iam.v1.SamlSettings + (*FederationStatus)(nil), // 3: nebius.iam.v1.FederationStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata +} +var file_nebius_iam_v1_federation_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.Federation.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.iam.v1.Federation.spec:type_name -> nebius.iam.v1.FederationSpec + 3, // 2: nebius.iam.v1.Federation.status:type_name -> nebius.iam.v1.FederationStatus + 2, // 3: nebius.iam.v1.FederationSpec.saml_settings:type_name -> nebius.iam.v1.SamlSettings + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_federation_proto_init() } +func file_nebius_iam_v1_federation_proto_init() { + if File_nebius_iam_v1_federation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_federation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Federation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FederationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*SamlSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*FederationStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_federation_proto_msgTypes[1].OneofWrappers = []any{ + (*FederationSpec_SamlSettings)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_federation_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_federation_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_federation_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_federation_proto_msgTypes, + }.Build() + File_nebius_iam_v1_federation_proto = out.File + file_nebius_iam_v1_federation_proto_rawDesc = nil + file_nebius_iam_v1_federation_proto_goTypes = nil + file_nebius_iam_v1_federation_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/federation.sensitive.pb.go b/proto/nebius/iam/v1/federation.sensitive.pb.go new file mode 100644 index 0000000..978ff2a --- /dev/null +++ b/proto/nebius/iam/v1/federation.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Federation) Sanitize() // is not generated as no sensitive fields found +// func (x *Federation) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FederationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *FederationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SamlSettings) Sanitize() // is not generated as no sensitive fields found +// func (x *SamlSettings) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FederationStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *FederationStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/federation_certificate.pb.go b/proto/nebius/iam/v1/federation_certificate.pb.go new file mode 100644 index 0000000..f72f845 --- /dev/null +++ b/proto/nebius/iam/v1/federation_certificate.pb.go @@ -0,0 +1,436 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/federation_certificate.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FederationCertificateStatus_State int32 + +const ( + FederationCertificateStatus_STATE_UNSPECIFIED FederationCertificateStatus_State = 0 + FederationCertificateStatus_ACTIVE FederationCertificateStatus_State = 1 + FederationCertificateStatus_EXPIRED FederationCertificateStatus_State = 2 +) + +// Enum value maps for FederationCertificateStatus_State. +var ( + FederationCertificateStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ACTIVE", + 2: "EXPIRED", + } + FederationCertificateStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "EXPIRED": 2, + } +) + +func (x FederationCertificateStatus_State) Enum() *FederationCertificateStatus_State { + p := new(FederationCertificateStatus_State) + *p = x + return p +} + +func (x FederationCertificateStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FederationCertificateStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_federation_certificate_proto_enumTypes[0].Descriptor() +} + +func (FederationCertificateStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_federation_certificate_proto_enumTypes[0] +} + +func (x FederationCertificateStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FederationCertificateStatus_State.Descriptor instead. +func (FederationCertificateStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_proto_rawDescGZIP(), []int{2, 0} +} + +type FederationCertificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationCertificateSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *FederationCertificateStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *FederationCertificate) Reset() { + *x = FederationCertificate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FederationCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FederationCertificate) ProtoMessage() {} + +func (x *FederationCertificate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FederationCertificate.ProtoReflect.Descriptor instead. +func (*FederationCertificate) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_proto_rawDescGZIP(), []int{0} +} + +func (x *FederationCertificate) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *FederationCertificate) GetSpec() *FederationCertificateSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *FederationCertificate) GetStatus() *FederationCertificateStatus { + if x != nil { + return x.Status + } + return nil +} + +type FederationCertificateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *FederationCertificateSpec) Reset() { + *x = FederationCertificateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FederationCertificateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FederationCertificateSpec) ProtoMessage() {} + +func (x *FederationCertificateSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FederationCertificateSpec.ProtoReflect.Descriptor instead. +func (*FederationCertificateSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_proto_rawDescGZIP(), []int{1} +} + +func (x *FederationCertificateSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *FederationCertificateSpec) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +type FederationCertificateStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State FederationCertificateStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.iam.v1.FederationCertificateStatus_State" json:"state,omitempty"` + Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + KeySize int64 `protobuf:"varint,4,opt,name=key_size,json=keySize,proto3" json:"key_size,omitempty"` + NotBefore *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"` + NotAfter *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"` +} + +func (x *FederationCertificateStatus) Reset() { + *x = FederationCertificateStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FederationCertificateStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FederationCertificateStatus) ProtoMessage() {} + +func (x *FederationCertificateStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FederationCertificateStatus.ProtoReflect.Descriptor instead. +func (*FederationCertificateStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_proto_rawDescGZIP(), []int{2} +} + +func (x *FederationCertificateStatus) GetState() FederationCertificateStatus_State { + if x != nil { + return x.State + } + return FederationCertificateStatus_STATE_UNSPECIFIED +} + +func (x *FederationCertificateStatus) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *FederationCertificateStatus) GetKeySize() int64 { + if x != nil { + return x.KeySize + } + return 0 +} + +func (x *FederationCertificateStatus) GetNotBefore() *timestamppb.Timestamp { + if x != nil { + return x.NotBefore + } + return nil +} + +func (x *FederationCertificateStatus) GetNotAfter() *timestamppb.Timestamp { + if x != nil { + return x.NotAfter + } + return nil +} + +var File_nebius_iam_v1_federation_certificate_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_federation_certificate_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x46, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x48, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0x57, 0x0a, 0x19, + 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcb, 0x02, 0x0a, 0x1b, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6b, + 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, + 0x44, 0x10, 0x02, 0x42, 0x61, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x1a, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_federation_certificate_proto_rawDescOnce sync.Once + file_nebius_iam_v1_federation_certificate_proto_rawDescData = file_nebius_iam_v1_federation_certificate_proto_rawDesc +) + +func file_nebius_iam_v1_federation_certificate_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_federation_certificate_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_federation_certificate_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_federation_certificate_proto_rawDescData) + }) + return file_nebius_iam_v1_federation_certificate_proto_rawDescData +} + +var file_nebius_iam_v1_federation_certificate_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_federation_certificate_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_federation_certificate_proto_goTypes = []any{ + (FederationCertificateStatus_State)(0), // 0: nebius.iam.v1.FederationCertificateStatus.State + (*FederationCertificate)(nil), // 1: nebius.iam.v1.FederationCertificate + (*FederationCertificateSpec)(nil), // 2: nebius.iam.v1.FederationCertificateSpec + (*FederationCertificateStatus)(nil), // 3: nebius.iam.v1.FederationCertificateStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_nebius_iam_v1_federation_certificate_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.FederationCertificate.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.iam.v1.FederationCertificate.spec:type_name -> nebius.iam.v1.FederationCertificateSpec + 3, // 2: nebius.iam.v1.FederationCertificate.status:type_name -> nebius.iam.v1.FederationCertificateStatus + 0, // 3: nebius.iam.v1.FederationCertificateStatus.state:type_name -> nebius.iam.v1.FederationCertificateStatus.State + 5, // 4: nebius.iam.v1.FederationCertificateStatus.not_before:type_name -> google.protobuf.Timestamp + 5, // 5: nebius.iam.v1.FederationCertificateStatus.not_after:type_name -> google.protobuf.Timestamp + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_federation_certificate_proto_init() } +func file_nebius_iam_v1_federation_certificate_proto_init() { + if File_nebius_iam_v1_federation_certificate_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_federation_certificate_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FederationCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FederationCertificateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FederationCertificateStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_federation_certificate_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_federation_certificate_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_federation_certificate_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_federation_certificate_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_federation_certificate_proto_msgTypes, + }.Build() + File_nebius_iam_v1_federation_certificate_proto = out.File + file_nebius_iam_v1_federation_certificate_proto_rawDesc = nil + file_nebius_iam_v1_federation_certificate_proto_goTypes = nil + file_nebius_iam_v1_federation_certificate_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/federation_certificate.sensitive.pb.go b/proto/nebius/iam/v1/federation_certificate.sensitive.pb.go new file mode 100644 index 0000000..efa49db --- /dev/null +++ b/proto/nebius/iam/v1/federation_certificate.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *FederationCertificate) Sanitize() // is not generated as no sensitive fields found +// func (x *FederationCertificate) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FederationCertificateSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *FederationCertificateSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FederationCertificateStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *FederationCertificateStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/federation_certificate_service.pb.go b/proto/nebius/iam/v1/federation_certificate_service.pb.go new file mode 100644 index 0000000..b4426f2 --- /dev/null +++ b/proto/nebius/iam/v1/federation_certificate_service.pb.go @@ -0,0 +1,603 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/federation_certificate_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateFederationCertificateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationCertificateSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateFederationCertificateRequest) Reset() { + *x = CreateFederationCertificateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFederationCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFederationCertificateRequest) ProtoMessage() {} + +func (x *CreateFederationCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFederationCertificateRequest.ProtoReflect.Descriptor instead. +func (*CreateFederationCertificateRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateFederationCertificateRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateFederationCertificateRequest) GetSpec() *FederationCertificateSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetFederationCertificateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetFederationCertificateRequest) Reset() { + *x = GetFederationCertificateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFederationCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFederationCertificateRequest) ProtoMessage() {} + +func (x *GetFederationCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFederationCertificateRequest.ProtoReflect.Descriptor instead. +func (*GetFederationCertificateRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetFederationCertificateRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListFederationCertificateByFederationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the parent federation ID. Corresponds to the parent_id value. + FederationId string `protobuf:"bytes,1,opt,name=federation_id,json=federationId,proto3" json:"federation_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListFederationCertificateByFederationRequest) Reset() { + *x = ListFederationCertificateByFederationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFederationCertificateByFederationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFederationCertificateByFederationRequest) ProtoMessage() {} + +func (x *ListFederationCertificateByFederationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFederationCertificateByFederationRequest.ProtoReflect.Descriptor instead. +func (*ListFederationCertificateByFederationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListFederationCertificateByFederationRequest) GetFederationId() string { + if x != nil { + return x.FederationId + } + return "" +} + +func (x *ListFederationCertificateByFederationRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFederationCertificateByFederationRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type UpdateFederationCertificateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationCertificateSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateFederationCertificateRequest) Reset() { + *x = UpdateFederationCertificateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFederationCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFederationCertificateRequest) ProtoMessage() {} + +func (x *UpdateFederationCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFederationCertificateRequest.ProtoReflect.Descriptor instead. +func (*UpdateFederationCertificateRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateFederationCertificateRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateFederationCertificateRequest) GetSpec() *FederationCertificateSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteFederationCertificateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteFederationCertificateRequest) Reset() { + *x = DeleteFederationCertificateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFederationCertificateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFederationCertificateRequest) ProtoMessage() {} + +func (x *DeleteFederationCertificateRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFederationCertificateRequest.ProtoReflect.Descriptor instead. +func (*DeleteFederationCertificateRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteFederationCertificateRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListFederationCertificateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of public keys returned in the response. The field should be named as `items` for consistency. + Items []*FederationCertificate `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFederationCertificateResponse) Reset() { + *x = ListFederationCertificateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFederationCertificateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFederationCertificateResponse) ProtoMessage() {} + +func (x *ListFederationCertificateResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFederationCertificateResponse.ProtoReflect.Descriptor instead. +func (*ListFederationCertificateResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListFederationCertificateResponse) GetItems() []*FederationCertificate { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListFederationCertificateResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_federation_certificate_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_federation_certificate_service_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, + 0x22, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x31, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x8f, 0x01, 0x0a, 0x2c, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x42, 0x79, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa2, 0x01, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x34, 0x0a, 0x22, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x87, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x99, 0x04, 0x0a, 0x1c, + 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x06, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x46, 0x65, + 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x42, 0x79, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x31, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x58, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, 0xba, 0x4a, 0x07, + 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x68, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, + 0x21, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_federation_certificate_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_federation_certificate_service_proto_rawDescData = file_nebius_iam_v1_federation_certificate_service_proto_rawDesc +) + +func file_nebius_iam_v1_federation_certificate_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_federation_certificate_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_federation_certificate_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_federation_certificate_service_proto_rawDescData) + }) + return file_nebius_iam_v1_federation_certificate_service_proto_rawDescData +} + +var file_nebius_iam_v1_federation_certificate_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_iam_v1_federation_certificate_service_proto_goTypes = []any{ + (*CreateFederationCertificateRequest)(nil), // 0: nebius.iam.v1.CreateFederationCertificateRequest + (*GetFederationCertificateRequest)(nil), // 1: nebius.iam.v1.GetFederationCertificateRequest + (*ListFederationCertificateByFederationRequest)(nil), // 2: nebius.iam.v1.ListFederationCertificateByFederationRequest + (*UpdateFederationCertificateRequest)(nil), // 3: nebius.iam.v1.UpdateFederationCertificateRequest + (*DeleteFederationCertificateRequest)(nil), // 4: nebius.iam.v1.DeleteFederationCertificateRequest + (*ListFederationCertificateResponse)(nil), // 5: nebius.iam.v1.ListFederationCertificateResponse + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*FederationCertificateSpec)(nil), // 7: nebius.iam.v1.FederationCertificateSpec + (*FederationCertificate)(nil), // 8: nebius.iam.v1.FederationCertificate + (*v1.Operation)(nil), // 9: nebius.common.v1.Operation +} +var file_nebius_iam_v1_federation_certificate_service_proto_depIdxs = []int32{ + 6, // 0: nebius.iam.v1.CreateFederationCertificateRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.iam.v1.CreateFederationCertificateRequest.spec:type_name -> nebius.iam.v1.FederationCertificateSpec + 6, // 2: nebius.iam.v1.UpdateFederationCertificateRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 3: nebius.iam.v1.UpdateFederationCertificateRequest.spec:type_name -> nebius.iam.v1.FederationCertificateSpec + 8, // 4: nebius.iam.v1.ListFederationCertificateResponse.items:type_name -> nebius.iam.v1.FederationCertificate + 0, // 5: nebius.iam.v1.FederationCertificateService.Create:input_type -> nebius.iam.v1.CreateFederationCertificateRequest + 1, // 6: nebius.iam.v1.FederationCertificateService.Get:input_type -> nebius.iam.v1.GetFederationCertificateRequest + 2, // 7: nebius.iam.v1.FederationCertificateService.ListByFederation:input_type -> nebius.iam.v1.ListFederationCertificateByFederationRequest + 3, // 8: nebius.iam.v1.FederationCertificateService.Update:input_type -> nebius.iam.v1.UpdateFederationCertificateRequest + 4, // 9: nebius.iam.v1.FederationCertificateService.Delete:input_type -> nebius.iam.v1.DeleteFederationCertificateRequest + 9, // 10: nebius.iam.v1.FederationCertificateService.Create:output_type -> nebius.common.v1.Operation + 8, // 11: nebius.iam.v1.FederationCertificateService.Get:output_type -> nebius.iam.v1.FederationCertificate + 5, // 12: nebius.iam.v1.FederationCertificateService.ListByFederation:output_type -> nebius.iam.v1.ListFederationCertificateResponse + 9, // 13: nebius.iam.v1.FederationCertificateService.Update:output_type -> nebius.common.v1.Operation + 9, // 14: nebius.iam.v1.FederationCertificateService.Delete:output_type -> nebius.common.v1.Operation + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_federation_certificate_service_proto_init() } +func file_nebius_iam_v1_federation_certificate_service_proto_init() { + if File_nebius_iam_v1_federation_certificate_service_proto != nil { + return + } + file_nebius_iam_v1_federation_certificate_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateFederationCertificateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetFederationCertificateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListFederationCertificateByFederationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateFederationCertificateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFederationCertificateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_certificate_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListFederationCertificateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_federation_certificate_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_federation_certificate_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_federation_certificate_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_federation_certificate_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_federation_certificate_service_proto = out.File + file_nebius_iam_v1_federation_certificate_service_proto_rawDesc = nil + file_nebius_iam_v1_federation_certificate_service_proto_goTypes = nil + file_nebius_iam_v1_federation_certificate_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/federation_certificate_service.sensitive.pb.go b/proto/nebius/iam/v1/federation_certificate_service.sensitive.pb.go new file mode 100644 index 0000000..eae33dc --- /dev/null +++ b/proto/nebius/iam/v1/federation_certificate_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateFederationCertificateRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateFederationCertificateRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetFederationCertificateRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetFederationCertificateRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFederationCertificateByFederationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFederationCertificateByFederationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateFederationCertificateRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateFederationCertificateRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteFederationCertificateRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteFederationCertificateRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFederationCertificateResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFederationCertificateResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/federation_certificate_service_grpc.pb.go b/proto/nebius/iam/v1/federation_certificate_service_grpc.pb.go new file mode 100644 index 0000000..a421ef1 --- /dev/null +++ b/proto/nebius/iam/v1/federation_certificate_service_grpc.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/federation_certificate_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + FederationCertificateService_Create_FullMethodName = "/nebius.iam.v1.FederationCertificateService/Create" + FederationCertificateService_Get_FullMethodName = "/nebius.iam.v1.FederationCertificateService/Get" + FederationCertificateService_ListByFederation_FullMethodName = "/nebius.iam.v1.FederationCertificateService/ListByFederation" + FederationCertificateService_Update_FullMethodName = "/nebius.iam.v1.FederationCertificateService/Update" + FederationCertificateService_Delete_FullMethodName = "/nebius.iam.v1.FederationCertificateService/Delete" +) + +// FederationCertificateServiceClient is the client API for FederationCertificateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FederationCertificateServiceClient interface { + Create(ctx context.Context, in *CreateFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetFederationCertificateRequest, opts ...grpc.CallOption) (*FederationCertificate, error) + ListByFederation(ctx context.Context, in *ListFederationCertificateByFederationRequest, opts ...grpc.CallOption) (*ListFederationCertificateResponse, error) + Update(ctx context.Context, in *UpdateFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type federationCertificateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFederationCertificateServiceClient(cc grpc.ClientConnInterface) FederationCertificateServiceClient { + return &federationCertificateServiceClient{cc} +} + +func (c *federationCertificateServiceClient) Create(ctx context.Context, in *CreateFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationCertificateService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationCertificateServiceClient) Get(ctx context.Context, in *GetFederationCertificateRequest, opts ...grpc.CallOption) (*FederationCertificate, error) { + out := new(FederationCertificate) + err := c.cc.Invoke(ctx, FederationCertificateService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationCertificateServiceClient) ListByFederation(ctx context.Context, in *ListFederationCertificateByFederationRequest, opts ...grpc.CallOption) (*ListFederationCertificateResponse, error) { + out := new(ListFederationCertificateResponse) + err := c.cc.Invoke(ctx, FederationCertificateService_ListByFederation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationCertificateServiceClient) Update(ctx context.Context, in *UpdateFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationCertificateService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationCertificateServiceClient) Delete(ctx context.Context, in *DeleteFederationCertificateRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationCertificateService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FederationCertificateServiceServer is the server API for FederationCertificateService service. +// All implementations should embed UnimplementedFederationCertificateServiceServer +// for forward compatibility +type FederationCertificateServiceServer interface { + Create(context.Context, *CreateFederationCertificateRequest) (*v1.Operation, error) + Get(context.Context, *GetFederationCertificateRequest) (*FederationCertificate, error) + ListByFederation(context.Context, *ListFederationCertificateByFederationRequest) (*ListFederationCertificateResponse, error) + Update(context.Context, *UpdateFederationCertificateRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteFederationCertificateRequest) (*v1.Operation, error) +} + +// UnimplementedFederationCertificateServiceServer should be embedded to have forward compatible implementations. +type UnimplementedFederationCertificateServiceServer struct { +} + +func (UnimplementedFederationCertificateServiceServer) Create(context.Context, *CreateFederationCertificateRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedFederationCertificateServiceServer) Get(context.Context, *GetFederationCertificateRequest) (*FederationCertificate, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedFederationCertificateServiceServer) ListByFederation(context.Context, *ListFederationCertificateByFederationRequest) (*ListFederationCertificateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByFederation not implemented") +} +func (UnimplementedFederationCertificateServiceServer) Update(context.Context, *UpdateFederationCertificateRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedFederationCertificateServiceServer) Delete(context.Context, *DeleteFederationCertificateRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeFederationCertificateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FederationCertificateServiceServer will +// result in compilation errors. +type UnsafeFederationCertificateServiceServer interface { + mustEmbedUnimplementedFederationCertificateServiceServer() +} + +func RegisterFederationCertificateServiceServer(s grpc.ServiceRegistrar, srv FederationCertificateServiceServer) { + s.RegisterService(&FederationCertificateService_ServiceDesc, srv) +} + +func _FederationCertificateService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFederationCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationCertificateServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationCertificateService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationCertificateServiceServer).Create(ctx, req.(*CreateFederationCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationCertificateService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFederationCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationCertificateServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationCertificateService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationCertificateServiceServer).Get(ctx, req.(*GetFederationCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationCertificateService_ListByFederation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFederationCertificateByFederationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationCertificateServiceServer).ListByFederation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationCertificateService_ListByFederation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationCertificateServiceServer).ListByFederation(ctx, req.(*ListFederationCertificateByFederationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationCertificateService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFederationCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationCertificateServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationCertificateService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationCertificateServiceServer).Update(ctx, req.(*UpdateFederationCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationCertificateService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFederationCertificateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationCertificateServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationCertificateService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationCertificateServiceServer).Delete(ctx, req.(*DeleteFederationCertificateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FederationCertificateService_ServiceDesc is the grpc.ServiceDesc for FederationCertificateService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FederationCertificateService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.FederationCertificateService", + HandlerType: (*FederationCertificateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _FederationCertificateService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _FederationCertificateService_Get_Handler, + }, + { + MethodName: "ListByFederation", + Handler: _FederationCertificateService_ListByFederation_Handler, + }, + { + MethodName: "Update", + Handler: _FederationCertificateService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _FederationCertificateService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/federation_certificate_service.proto", +} diff --git a/proto/nebius/iam/v1/federation_service.pb.go b/proto/nebius/iam/v1/federation_service.pb.go new file mode 100644 index 0000000..0a66e4d --- /dev/null +++ b/proto/nebius/iam/v1/federation_service.pb.go @@ -0,0 +1,617 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/federation_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateFederationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateFederationRequest) Reset() { + *x = CreateFederationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFederationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFederationRequest) ProtoMessage() {} + +func (x *CreateFederationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFederationRequest.ProtoReflect.Descriptor instead. +func (*CreateFederationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateFederationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateFederationRequest) GetSpec() *FederationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetFederationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetFederationRequest) Reset() { + *x = GetFederationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFederationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFederationRequest) ProtoMessage() {} + +func (x *GetFederationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFederationRequest.ProtoReflect.Descriptor instead. +func (*GetFederationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetFederationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListFederationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Default value: 10 + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListFederationsRequest) Reset() { + *x = ListFederationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFederationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFederationsRequest) ProtoMessage() {} + +func (x *ListFederationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFederationsRequest.ProtoReflect.Descriptor instead. +func (*ListFederationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListFederationsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListFederationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFederationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListFederationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListFederationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Federation `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFederationsResponse) Reset() { + *x = ListFederationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFederationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFederationsResponse) ProtoMessage() {} + +func (x *ListFederationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFederationsResponse.ProtoReflect.Descriptor instead. +func (*ListFederationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListFederationsResponse) GetItems() []*Federation { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListFederationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdateFederationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *FederationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *FederationStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *UpdateFederationRequest) Reset() { + *x = UpdateFederationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFederationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFederationRequest) ProtoMessage() {} + +func (x *UpdateFederationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFederationRequest.ProtoReflect.Descriptor instead. +func (*UpdateFederationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateFederationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateFederationRequest) GetSpec() *FederationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *UpdateFederationRequest) GetStatus() *FederationStatus { + if x != nil { + return x.Status + } + return nil +} + +type DeleteFederationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteFederationRequest) Reset() { + *x = DeleteFederationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFederationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFederationRequest) ProtoMessage() {} + +func (x *DeleteFederationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_federation_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFederationRequest.ProtoReflect.Descriptor instead. +func (*DeleteFederationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_federation_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteFederationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_iam_v1_federation_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_federation_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x22, 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x91, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x72, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc5, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x32, 0xf6, 0x03, 0x0a, 0x11, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, + 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x5d, 0x0a, 0x14, + 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x46, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_federation_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_federation_service_proto_rawDescData = file_nebius_iam_v1_federation_service_proto_rawDesc +) + +func file_nebius_iam_v1_federation_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_federation_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_federation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_federation_service_proto_rawDescData) + }) + return file_nebius_iam_v1_federation_service_proto_rawDescData +} + +var file_nebius_iam_v1_federation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_iam_v1_federation_service_proto_goTypes = []any{ + (*CreateFederationRequest)(nil), // 0: nebius.iam.v1.CreateFederationRequest + (*GetFederationRequest)(nil), // 1: nebius.iam.v1.GetFederationRequest + (*ListFederationsRequest)(nil), // 2: nebius.iam.v1.ListFederationsRequest + (*ListFederationsResponse)(nil), // 3: nebius.iam.v1.ListFederationsResponse + (*UpdateFederationRequest)(nil), // 4: nebius.iam.v1.UpdateFederationRequest + (*DeleteFederationRequest)(nil), // 5: nebius.iam.v1.DeleteFederationRequest + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*FederationSpec)(nil), // 7: nebius.iam.v1.FederationSpec + (*Federation)(nil), // 8: nebius.iam.v1.Federation + (*FederationStatus)(nil), // 9: nebius.iam.v1.FederationStatus + (*v1.GetByNameRequest)(nil), // 10: nebius.common.v1.GetByNameRequest + (*v1.Operation)(nil), // 11: nebius.common.v1.Operation +} +var file_nebius_iam_v1_federation_service_proto_depIdxs = []int32{ + 6, // 0: nebius.iam.v1.CreateFederationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.iam.v1.CreateFederationRequest.spec:type_name -> nebius.iam.v1.FederationSpec + 8, // 2: nebius.iam.v1.ListFederationsResponse.items:type_name -> nebius.iam.v1.Federation + 6, // 3: nebius.iam.v1.UpdateFederationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 4: nebius.iam.v1.UpdateFederationRequest.spec:type_name -> nebius.iam.v1.FederationSpec + 9, // 5: nebius.iam.v1.UpdateFederationRequest.status:type_name -> nebius.iam.v1.FederationStatus + 0, // 6: nebius.iam.v1.FederationService.Create:input_type -> nebius.iam.v1.CreateFederationRequest + 1, // 7: nebius.iam.v1.FederationService.Get:input_type -> nebius.iam.v1.GetFederationRequest + 10, // 8: nebius.iam.v1.FederationService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 2, // 9: nebius.iam.v1.FederationService.List:input_type -> nebius.iam.v1.ListFederationsRequest + 4, // 10: nebius.iam.v1.FederationService.Update:input_type -> nebius.iam.v1.UpdateFederationRequest + 5, // 11: nebius.iam.v1.FederationService.Delete:input_type -> nebius.iam.v1.DeleteFederationRequest + 11, // 12: nebius.iam.v1.FederationService.Create:output_type -> nebius.common.v1.Operation + 8, // 13: nebius.iam.v1.FederationService.Get:output_type -> nebius.iam.v1.Federation + 8, // 14: nebius.iam.v1.FederationService.GetByName:output_type -> nebius.iam.v1.Federation + 3, // 15: nebius.iam.v1.FederationService.List:output_type -> nebius.iam.v1.ListFederationsResponse + 11, // 16: nebius.iam.v1.FederationService.Update:output_type -> nebius.common.v1.Operation + 11, // 17: nebius.iam.v1.FederationService.Delete:output_type -> nebius.common.v1.Operation + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_federation_service_proto_init() } +func file_nebius_iam_v1_federation_service_proto_init() { + if File_nebius_iam_v1_federation_service_proto != nil { + return + } + file_nebius_iam_v1_federation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_federation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateFederationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetFederationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListFederationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListFederationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateFederationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_federation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFederationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_federation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_federation_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_federation_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_federation_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_federation_service_proto = out.File + file_nebius_iam_v1_federation_service_proto_rawDesc = nil + file_nebius_iam_v1_federation_service_proto_goTypes = nil + file_nebius_iam_v1_federation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/federation_service.sensitive.pb.go b/proto/nebius/iam/v1/federation_service.sensitive.pb.go new file mode 100644 index 0000000..e1b382c --- /dev/null +++ b/proto/nebius/iam/v1/federation_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateFederationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateFederationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetFederationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetFederationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFederationsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFederationsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListFederationsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListFederationsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateFederationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateFederationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteFederationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteFederationRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/federation_service_grpc.pb.go b/proto/nebius/iam/v1/federation_service_grpc.pb.go new file mode 100644 index 0000000..fc8adc7 --- /dev/null +++ b/proto/nebius/iam/v1/federation_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/federation_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + FederationService_Create_FullMethodName = "/nebius.iam.v1.FederationService/Create" + FederationService_Get_FullMethodName = "/nebius.iam.v1.FederationService/Get" + FederationService_GetByName_FullMethodName = "/nebius.iam.v1.FederationService/GetByName" + FederationService_List_FullMethodName = "/nebius.iam.v1.FederationService/List" + FederationService_Update_FullMethodName = "/nebius.iam.v1.FederationService/Update" + FederationService_Delete_FullMethodName = "/nebius.iam.v1.FederationService/Delete" +) + +// FederationServiceClient is the client API for FederationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FederationServiceClient interface { + Create(ctx context.Context, in *CreateFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetFederationRequest, opts ...grpc.CallOption) (*Federation, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Federation, error) + List(ctx context.Context, in *ListFederationsRequest, opts ...grpc.CallOption) (*ListFederationsResponse, error) + Update(ctx context.Context, in *UpdateFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type federationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFederationServiceClient(cc grpc.ClientConnInterface) FederationServiceClient { + return &federationServiceClient{cc} +} + +func (c *federationServiceClient) Create(ctx context.Context, in *CreateFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationServiceClient) Get(ctx context.Context, in *GetFederationRequest, opts ...grpc.CallOption) (*Federation, error) { + out := new(Federation) + err := c.cc.Invoke(ctx, FederationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Federation, error) { + out := new(Federation) + err := c.cc.Invoke(ctx, FederationService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationServiceClient) List(ctx context.Context, in *ListFederationsRequest, opts ...grpc.CallOption) (*ListFederationsResponse, error) { + out := new(ListFederationsResponse) + err := c.cc.Invoke(ctx, FederationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationServiceClient) Update(ctx context.Context, in *UpdateFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *federationServiceClient) Delete(ctx context.Context, in *DeleteFederationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, FederationService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FederationServiceServer is the server API for FederationService service. +// All implementations should embed UnimplementedFederationServiceServer +// for forward compatibility +type FederationServiceServer interface { + Create(context.Context, *CreateFederationRequest) (*v1.Operation, error) + Get(context.Context, *GetFederationRequest) (*Federation, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Federation, error) + List(context.Context, *ListFederationsRequest) (*ListFederationsResponse, error) + Update(context.Context, *UpdateFederationRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteFederationRequest) (*v1.Operation, error) +} + +// UnimplementedFederationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedFederationServiceServer struct { +} + +func (UnimplementedFederationServiceServer) Create(context.Context, *CreateFederationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedFederationServiceServer) Get(context.Context, *GetFederationRequest) (*Federation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedFederationServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Federation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedFederationServiceServer) List(context.Context, *ListFederationsRequest) (*ListFederationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedFederationServiceServer) Update(context.Context, *UpdateFederationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedFederationServiceServer) Delete(context.Context, *DeleteFederationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeFederationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FederationServiceServer will +// result in compilation errors. +type UnsafeFederationServiceServer interface { + mustEmbedUnimplementedFederationServiceServer() +} + +func RegisterFederationServiceServer(s grpc.ServiceRegistrar, srv FederationServiceServer) { + s.RegisterService(&FederationService_ServiceDesc, srv) +} + +func _FederationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFederationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).Create(ctx, req.(*CreateFederationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFederationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).Get(ctx, req.(*GetFederationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFederationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).List(ctx, req.(*ListFederationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFederationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).Update(ctx, req.(*UpdateFederationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FederationService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFederationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FederationServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FederationService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FederationServiceServer).Delete(ctx, req.(*DeleteFederationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FederationService_ServiceDesc is the grpc.ServiceDesc for FederationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FederationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.FederationService", + HandlerType: (*FederationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _FederationService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _FederationService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _FederationService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _FederationService_List_Handler, + }, + { + MethodName: "Update", + Handler: _FederationService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _FederationService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/federation_service.proto", +} diff --git a/proto/nebius/iam/v1/group.pb.go b/proto/nebius/iam/v1/group.pb.go new file mode 100644 index 0000000..a8027b6 --- /dev/null +++ b/proto/nebius/iam/v1/group.pb.go @@ -0,0 +1,364 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/group.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GroupStatus_State int32 + +const ( + GroupStatus_UNSPECIFIED GroupStatus_State = 0 + GroupStatus_ACTIVE GroupStatus_State = 1 +) + +// Enum value maps for GroupStatus_State. +var ( + GroupStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "ACTIVE", + } + GroupStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "ACTIVE": 1, + } +) + +func (x GroupStatus_State) Enum() *GroupStatus_State { + p := new(GroupStatus_State) + *p = x + return p +} + +func (x GroupStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GroupStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_group_proto_enumTypes[0].Descriptor() +} + +func (GroupStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_group_proto_enumTypes[0] +} + +func (x GroupStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GroupStatus_State.Descriptor instead. +func (GroupStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_proto_rawDescGZIP(), []int{2, 0} +} + +type Group struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *GroupStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Group) Reset() { + *x = Group{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Group) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Group) ProtoMessage() {} + +func (x *Group) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Group.ProtoReflect.Descriptor instead. +func (*Group) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_proto_rawDescGZIP(), []int{0} +} + +func (x *Group) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Group) GetSpec() *GroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Group) GetStatus() *GroupStatus { + if x != nil { + return x.Status + } + return nil +} + +type GroupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GroupSpec) Reset() { + *x = GroupSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupSpec) ProtoMessage() {} + +func (x *GroupSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupSpec.ProtoReflect.Descriptor instead. +func (*GroupSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_proto_rawDescGZIP(), []int{1} +} + +type GroupStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State GroupStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.iam.v1.GroupStatus_State" json:"state,omitempty"` + MembersCount int32 `protobuf:"varint,2,opt,name=members_count,json=membersCount,proto3" json:"members_count,omitempty"` +} + +func (x *GroupStatus) Reset() { + *x = GroupStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupStatus) ProtoMessage() {} + +func (x *GroupStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupStatus.ProtoReflect.Descriptor instead. +func (*GroupStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupStatus) GetState() GroupStatus_State { + if x != nil { + return x.State + } + return GroupStatus_UNSPECIFIED +} + +func (x *GroupStatus) GetMembersCount() int32 { + if x != nil { + return x.MembersCount + } + return 0 +} + +var File_nebius_iam_v1_group_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_group_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x0b, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, + 0x63, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x24, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, + 0x56, 0x45, 0x10, 0x01, 0x42, 0x51, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_group_proto_rawDescOnce sync.Once + file_nebius_iam_v1_group_proto_rawDescData = file_nebius_iam_v1_group_proto_rawDesc +) + +func file_nebius_iam_v1_group_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_group_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_group_proto_rawDescData) + }) + return file_nebius_iam_v1_group_proto_rawDescData +} + +var file_nebius_iam_v1_group_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_group_proto_goTypes = []any{ + (GroupStatus_State)(0), // 0: nebius.iam.v1.GroupStatus.State + (*Group)(nil), // 1: nebius.iam.v1.Group + (*GroupSpec)(nil), // 2: nebius.iam.v1.GroupSpec + (*GroupStatus)(nil), // 3: nebius.iam.v1.GroupStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata +} +var file_nebius_iam_v1_group_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.Group.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.iam.v1.Group.spec:type_name -> nebius.iam.v1.GroupSpec + 3, // 2: nebius.iam.v1.Group.status:type_name -> nebius.iam.v1.GroupStatus + 0, // 3: nebius.iam.v1.GroupStatus.state:type_name -> nebius.iam.v1.GroupStatus.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_group_proto_init() } +func file_nebius_iam_v1_group_proto_init() { + if File_nebius_iam_v1_group_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_group_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GroupSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GroupStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_group_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_group_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_group_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_group_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_group_proto_msgTypes, + }.Build() + File_nebius_iam_v1_group_proto = out.File + file_nebius_iam_v1_group_proto_rawDesc = nil + file_nebius_iam_v1_group_proto_goTypes = nil + file_nebius_iam_v1_group_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/group.sensitive.pb.go b/proto/nebius/iam/v1/group.sensitive.pb.go new file mode 100644 index 0000000..1c6667d --- /dev/null +++ b/proto/nebius/iam/v1/group.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Group) Sanitize() // is not generated as no sensitive fields found +// func (x *Group) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GroupSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GroupSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GroupStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *GroupStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/group_membership.pb.go b/proto/nebius/iam/v1/group_membership.pb.go new file mode 100644 index 0000000..c2f59c3 --- /dev/null +++ b/proto/nebius/iam/v1/group_membership.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/group_membership.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GroupMembership struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GroupMembershipSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *GroupMembershipStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // Dummy field for compliance with terraform resource generator. + RevokeAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=revoke_at,json=revokeAt,proto3" json:"revoke_at,omitempty"` +} + +func (x *GroupMembership) Reset() { + *x = GroupMembership{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMembership) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMembership) ProtoMessage() {} + +func (x *GroupMembership) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupMembership.ProtoReflect.Descriptor instead. +func (*GroupMembership) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupMembership) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GroupMembership) GetSpec() *GroupMembershipSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *GroupMembership) GetStatus() *GroupMembershipStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *GroupMembership) GetRevokeAt() *timestamppb.Timestamp { + if x != nil { + return x.RevokeAt + } + return nil +} + +type GroupMembershipSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Member of the group. Can be tenant user account id or service account id. + MemberId string `protobuf:"bytes,1,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` +} + +func (x *GroupMembershipSpec) Reset() { + *x = GroupMembershipSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMembershipSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMembershipSpec) ProtoMessage() {} + +func (x *GroupMembershipSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupMembershipSpec.ProtoReflect.Descriptor instead. +func (*GroupMembershipSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_proto_rawDescGZIP(), []int{1} +} + +func (x *GroupMembershipSpec) GetMemberId() string { + if x != nil { + return x.MemberId + } + return "" +} + +type GroupMembershipStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GroupMembershipStatus) Reset() { + *x = GroupMembershipStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMembershipStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMembershipStatus) ProtoMessage() {} + +func (x *GroupMembershipStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupMembershipStatus.ProtoReflect.Descriptor instead. +func (*GroupMembershipStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_proto_rawDescGZIP(), []int{2} +} + +var File_nebius_iam_v1_group_membership_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_group_membership_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, + 0x02, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, + 0x0a, 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x74, 0x3a, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x09, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0x17, 0x0a, + 0x15, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x5b, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x14, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_group_membership_proto_rawDescOnce sync.Once + file_nebius_iam_v1_group_membership_proto_rawDescData = file_nebius_iam_v1_group_membership_proto_rawDesc +) + +func file_nebius_iam_v1_group_membership_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_group_membership_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_group_membership_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_group_membership_proto_rawDescData) + }) + return file_nebius_iam_v1_group_membership_proto_rawDescData +} + +var file_nebius_iam_v1_group_membership_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_group_membership_proto_goTypes = []any{ + (*GroupMembership)(nil), // 0: nebius.iam.v1.GroupMembership + (*GroupMembershipSpec)(nil), // 1: nebius.iam.v1.GroupMembershipSpec + (*GroupMembershipStatus)(nil), // 2: nebius.iam.v1.GroupMembershipStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_nebius_iam_v1_group_membership_proto_depIdxs = []int32{ + 3, // 0: nebius.iam.v1.GroupMembership.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.iam.v1.GroupMembership.spec:type_name -> nebius.iam.v1.GroupMembershipSpec + 2, // 2: nebius.iam.v1.GroupMembership.status:type_name -> nebius.iam.v1.GroupMembershipStatus + 4, // 3: nebius.iam.v1.GroupMembership.revoke_at:type_name -> google.protobuf.Timestamp + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_group_membership_proto_init() } +func file_nebius_iam_v1_group_membership_proto_init() { + if File_nebius_iam_v1_group_membership_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_group_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GroupMembership); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GroupMembershipSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GroupMembershipStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_group_membership_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_group_membership_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_group_membership_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_group_membership_proto_msgTypes, + }.Build() + File_nebius_iam_v1_group_membership_proto = out.File + file_nebius_iam_v1_group_membership_proto_rawDesc = nil + file_nebius_iam_v1_group_membership_proto_goTypes = nil + file_nebius_iam_v1_group_membership_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/group_membership.sensitive.pb.go b/proto/nebius/iam/v1/group_membership.sensitive.pb.go new file mode 100644 index 0000000..1c2a514 --- /dev/null +++ b/proto/nebius/iam/v1/group_membership.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GroupMembership) Sanitize() // is not generated as no sensitive fields found +// func (x *GroupMembership) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GroupMembershipSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GroupMembershipSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GroupMembershipStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *GroupMembershipStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/group_membership_service.pb.go b/proto/nebius/iam/v1/group_membership_service.pb.go new file mode 100644 index 0000000..9304b0f --- /dev/null +++ b/proto/nebius/iam/v1/group_membership_service.pb.go @@ -0,0 +1,716 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/group_membership_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateGroupMembershipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GroupMembershipSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + RevokeAfterHours int64 `protobuf:"varint,4,opt,name=revoke_after_hours,json=revokeAfterHours,proto3" json:"revoke_after_hours,omitempty"` +} + +func (x *CreateGroupMembershipRequest) Reset() { + *x = CreateGroupMembershipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGroupMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGroupMembershipRequest) ProtoMessage() {} + +func (x *CreateGroupMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGroupMembershipRequest.ProtoReflect.Descriptor instead. +func (*CreateGroupMembershipRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateGroupMembershipRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateGroupMembershipRequest) GetSpec() *GroupMembershipSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *CreateGroupMembershipRequest) GetRevokeAfterHours() int64 { + if x != nil { + return x.RevokeAfterHours + } + return 0 +} + +type DeleteGroupMembershipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteGroupMembershipRequest) Reset() { + *x = DeleteGroupMembershipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGroupMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGroupMembershipRequest) ProtoMessage() {} + +func (x *DeleteGroupMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteGroupMembershipRequest.ProtoReflect.Descriptor instead. +func (*DeleteGroupMembershipRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{1} +} + +func (x *DeleteGroupMembershipRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetGroupMembershipRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGroupMembershipRequest) Reset() { + *x = GetGroupMembershipRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupMembershipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupMembershipRequest) ProtoMessage() {} + +func (x *GetGroupMembershipRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupMembershipRequest.ProtoReflect.Descriptor instead. +func (*GetGroupMembershipRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetGroupMembershipRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListGroupMembershipsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListGroupMembershipsRequest) Reset() { + *x = ListGroupMembershipsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupMembershipsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupMembershipsRequest) ProtoMessage() {} + +func (x *ListGroupMembershipsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupMembershipsRequest.ProtoReflect.Descriptor instead. +func (*ListGroupMembershipsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListGroupMembershipsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListGroupMembershipsRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListGroupMembershipsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListGroupMembershipsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListMemberOfRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Requested subject id. Can be tenant user account id or service account id. + SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListMemberOfRequest) Reset() { + *x = ListMemberOfRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMemberOfRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMemberOfRequest) ProtoMessage() {} + +func (x *ListMemberOfRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMemberOfRequest.ProtoReflect.Descriptor instead. +func (*ListMemberOfRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListMemberOfRequest) GetSubjectId() string { + if x != nil { + return x.SubjectId + } + return "" +} + +func (x *ListMemberOfRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListMemberOfRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListMemberOfRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListGroupMembershipsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Members of the group. Can be tenant user account ids or service account ids. + Memberships []*GroupMembership `protobuf:"bytes,1,rep,name=memberships,proto3" json:"memberships,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGroupMembershipsResponse) Reset() { + *x = ListGroupMembershipsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupMembershipsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupMembershipsResponse) ProtoMessage() {} + +func (x *ListGroupMembershipsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupMembershipsResponse.ProtoReflect.Descriptor instead. +func (*ListGroupMembershipsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListGroupMembershipsResponse) GetMemberships() []*GroupMembership { + if x != nil { + return x.Memberships + } + return nil +} + +func (x *ListGroupMembershipsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type ListMemberOfResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Groups that requested entity is a member of + Items []*Group `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListMemberOfResponse) Reset() { + *x = ListMemberOfResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMemberOfResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMemberOfResponse) ProtoMessage() {} + +func (x *ListMemberOfResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_membership_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMemberOfResponse.ProtoReflect.Descriptor instead. +func (*ListMemberOfResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListMemberOfResponse) GetItems() []*Group { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListMemberOfResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_group_membership_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_group_membership_service_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, + 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x48, 0x6f, 0x75, 0x72, 0x73, 0x22, 0x36, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x02, 0x69, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, + 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0b, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x6a, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, + 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xde, 0x03, + 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, + 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x52, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x66, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x62, + 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x1b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_group_membership_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_group_membership_service_proto_rawDescData = file_nebius_iam_v1_group_membership_service_proto_rawDesc +) + +func file_nebius_iam_v1_group_membership_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_group_membership_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_group_membership_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_group_membership_service_proto_rawDescData) + }) + return file_nebius_iam_v1_group_membership_service_proto_rawDescData +} + +var file_nebius_iam_v1_group_membership_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_iam_v1_group_membership_service_proto_goTypes = []any{ + (*CreateGroupMembershipRequest)(nil), // 0: nebius.iam.v1.CreateGroupMembershipRequest + (*DeleteGroupMembershipRequest)(nil), // 1: nebius.iam.v1.DeleteGroupMembershipRequest + (*GetGroupMembershipRequest)(nil), // 2: nebius.iam.v1.GetGroupMembershipRequest + (*ListGroupMembershipsRequest)(nil), // 3: nebius.iam.v1.ListGroupMembershipsRequest + (*ListMemberOfRequest)(nil), // 4: nebius.iam.v1.ListMemberOfRequest + (*ListGroupMembershipsResponse)(nil), // 5: nebius.iam.v1.ListGroupMembershipsResponse + (*ListMemberOfResponse)(nil), // 6: nebius.iam.v1.ListMemberOfResponse + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*GroupMembershipSpec)(nil), // 8: nebius.iam.v1.GroupMembershipSpec + (*GroupMembership)(nil), // 9: nebius.iam.v1.GroupMembership + (*Group)(nil), // 10: nebius.iam.v1.Group + (*v1.Operation)(nil), // 11: nebius.common.v1.Operation +} +var file_nebius_iam_v1_group_membership_service_proto_depIdxs = []int32{ + 7, // 0: nebius.iam.v1.CreateGroupMembershipRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 1: nebius.iam.v1.CreateGroupMembershipRequest.spec:type_name -> nebius.iam.v1.GroupMembershipSpec + 9, // 2: nebius.iam.v1.ListGroupMembershipsResponse.memberships:type_name -> nebius.iam.v1.GroupMembership + 10, // 3: nebius.iam.v1.ListMemberOfResponse.items:type_name -> nebius.iam.v1.Group + 0, // 4: nebius.iam.v1.GroupMembershipService.Create:input_type -> nebius.iam.v1.CreateGroupMembershipRequest + 2, // 5: nebius.iam.v1.GroupMembershipService.Get:input_type -> nebius.iam.v1.GetGroupMembershipRequest + 1, // 6: nebius.iam.v1.GroupMembershipService.Delete:input_type -> nebius.iam.v1.DeleteGroupMembershipRequest + 3, // 7: nebius.iam.v1.GroupMembershipService.ListMembers:input_type -> nebius.iam.v1.ListGroupMembershipsRequest + 4, // 8: nebius.iam.v1.GroupMembershipService.ListMemberOf:input_type -> nebius.iam.v1.ListMemberOfRequest + 11, // 9: nebius.iam.v1.GroupMembershipService.Create:output_type -> nebius.common.v1.Operation + 9, // 10: nebius.iam.v1.GroupMembershipService.Get:output_type -> nebius.iam.v1.GroupMembership + 11, // 11: nebius.iam.v1.GroupMembershipService.Delete:output_type -> nebius.common.v1.Operation + 5, // 12: nebius.iam.v1.GroupMembershipService.ListMembers:output_type -> nebius.iam.v1.ListGroupMembershipsResponse + 6, // 13: nebius.iam.v1.GroupMembershipService.ListMemberOf:output_type -> nebius.iam.v1.ListMemberOfResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_group_membership_service_proto_init() } +func file_nebius_iam_v1_group_membership_service_proto_init() { + if File_nebius_iam_v1_group_membership_service_proto != nil { + return + } + file_nebius_iam_v1_group_membership_proto_init() + file_nebius_iam_v1_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_group_membership_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateGroupMembershipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DeleteGroupMembershipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetGroupMembershipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListGroupMembershipsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListMemberOfRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListGroupMembershipsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListMemberOfResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_group_membership_service_proto_msgTypes[3].OneofWrappers = []any{} + file_nebius_iam_v1_group_membership_service_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_group_membership_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_group_membership_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_group_membership_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_group_membership_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_group_membership_service_proto = out.File + file_nebius_iam_v1_group_membership_service_proto_rawDesc = nil + file_nebius_iam_v1_group_membership_service_proto_goTypes = nil + file_nebius_iam_v1_group_membership_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/group_membership_service.sensitive.pb.go b/proto/nebius/iam/v1/group_membership_service.sensitive.pb.go new file mode 100644 index 0000000..f9cb91b --- /dev/null +++ b/proto/nebius/iam/v1/group_membership_service.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateGroupMembershipRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateGroupMembershipRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteGroupMembershipRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteGroupMembershipRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetGroupMembershipRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetGroupMembershipRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGroupMembershipsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGroupMembershipsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListMemberOfRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListMemberOfRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGroupMembershipsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGroupMembershipsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListMemberOfResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListMemberOfResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/group_membership_service_grpc.pb.go b/proto/nebius/iam/v1/group_membership_service_grpc.pb.go new file mode 100644 index 0000000..ef8ba1c --- /dev/null +++ b/proto/nebius/iam/v1/group_membership_service_grpc.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/group_membership_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GroupMembershipService_Create_FullMethodName = "/nebius.iam.v1.GroupMembershipService/Create" + GroupMembershipService_Get_FullMethodName = "/nebius.iam.v1.GroupMembershipService/Get" + GroupMembershipService_Delete_FullMethodName = "/nebius.iam.v1.GroupMembershipService/Delete" + GroupMembershipService_ListMembers_FullMethodName = "/nebius.iam.v1.GroupMembershipService/ListMembers" + GroupMembershipService_ListMemberOf_FullMethodName = "/nebius.iam.v1.GroupMembershipService/ListMemberOf" +) + +// GroupMembershipServiceClient is the client API for GroupMembershipService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GroupMembershipServiceClient interface { + Create(ctx context.Context, in *CreateGroupMembershipRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetGroupMembershipRequest, opts ...grpc.CallOption) (*GroupMembership, error) + Delete(ctx context.Context, in *DeleteGroupMembershipRequest, opts ...grpc.CallOption) (*v1.Operation, error) + ListMembers(ctx context.Context, in *ListGroupMembershipsRequest, opts ...grpc.CallOption) (*ListGroupMembershipsResponse, error) + ListMemberOf(ctx context.Context, in *ListMemberOfRequest, opts ...grpc.CallOption) (*ListMemberOfResponse, error) +} + +type groupMembershipServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGroupMembershipServiceClient(cc grpc.ClientConnInterface) GroupMembershipServiceClient { + return &groupMembershipServiceClient{cc} +} + +func (c *groupMembershipServiceClient) Create(ctx context.Context, in *CreateGroupMembershipRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, GroupMembershipService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupMembershipServiceClient) Get(ctx context.Context, in *GetGroupMembershipRequest, opts ...grpc.CallOption) (*GroupMembership, error) { + out := new(GroupMembership) + err := c.cc.Invoke(ctx, GroupMembershipService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupMembershipServiceClient) Delete(ctx context.Context, in *DeleteGroupMembershipRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, GroupMembershipService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupMembershipServiceClient) ListMembers(ctx context.Context, in *ListGroupMembershipsRequest, opts ...grpc.CallOption) (*ListGroupMembershipsResponse, error) { + out := new(ListGroupMembershipsResponse) + err := c.cc.Invoke(ctx, GroupMembershipService_ListMembers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupMembershipServiceClient) ListMemberOf(ctx context.Context, in *ListMemberOfRequest, opts ...grpc.CallOption) (*ListMemberOfResponse, error) { + out := new(ListMemberOfResponse) + err := c.cc.Invoke(ctx, GroupMembershipService_ListMemberOf_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GroupMembershipServiceServer is the server API for GroupMembershipService service. +// All implementations should embed UnimplementedGroupMembershipServiceServer +// for forward compatibility +type GroupMembershipServiceServer interface { + Create(context.Context, *CreateGroupMembershipRequest) (*v1.Operation, error) + Get(context.Context, *GetGroupMembershipRequest) (*GroupMembership, error) + Delete(context.Context, *DeleteGroupMembershipRequest) (*v1.Operation, error) + ListMembers(context.Context, *ListGroupMembershipsRequest) (*ListGroupMembershipsResponse, error) + ListMemberOf(context.Context, *ListMemberOfRequest) (*ListMemberOfResponse, error) +} + +// UnimplementedGroupMembershipServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGroupMembershipServiceServer struct { +} + +func (UnimplementedGroupMembershipServiceServer) Create(context.Context, *CreateGroupMembershipRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedGroupMembershipServiceServer) Get(context.Context, *GetGroupMembershipRequest) (*GroupMembership, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedGroupMembershipServiceServer) Delete(context.Context, *DeleteGroupMembershipRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedGroupMembershipServiceServer) ListMembers(context.Context, *ListGroupMembershipsRequest) (*ListGroupMembershipsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMembers not implemented") +} +func (UnimplementedGroupMembershipServiceServer) ListMemberOf(context.Context, *ListMemberOfRequest) (*ListMemberOfResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMemberOf not implemented") +} + +// UnsafeGroupMembershipServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GroupMembershipServiceServer will +// result in compilation errors. +type UnsafeGroupMembershipServiceServer interface { + mustEmbedUnimplementedGroupMembershipServiceServer() +} + +func RegisterGroupMembershipServiceServer(s grpc.ServiceRegistrar, srv GroupMembershipServiceServer) { + s.RegisterService(&GroupMembershipService_ServiceDesc, srv) +} + +func _GroupMembershipService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGroupMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupMembershipServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupMembershipService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupMembershipServiceServer).Create(ctx, req.(*CreateGroupMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupMembershipService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupMembershipServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupMembershipService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupMembershipServiceServer).Get(ctx, req.(*GetGroupMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupMembershipService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGroupMembershipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupMembershipServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupMembershipService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupMembershipServiceServer).Delete(ctx, req.(*DeleteGroupMembershipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupMembershipService_ListMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupMembershipsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupMembershipServiceServer).ListMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupMembershipService_ListMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupMembershipServiceServer).ListMembers(ctx, req.(*ListGroupMembershipsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupMembershipService_ListMemberOf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMemberOfRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupMembershipServiceServer).ListMemberOf(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupMembershipService_ListMemberOf_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupMembershipServiceServer).ListMemberOf(ctx, req.(*ListMemberOfRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GroupMembershipService_ServiceDesc is the grpc.ServiceDesc for GroupMembershipService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GroupMembershipService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.GroupMembershipService", + HandlerType: (*GroupMembershipServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _GroupMembershipService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _GroupMembershipService_Get_Handler, + }, + { + MethodName: "Delete", + Handler: _GroupMembershipService_Delete_Handler, + }, + { + MethodName: "ListMembers", + Handler: _GroupMembershipService_ListMembers_Handler, + }, + { + MethodName: "ListMemberOf", + Handler: _GroupMembershipService_ListMemberOf_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/group_membership_service.proto", +} diff --git a/proto/nebius/iam/v1/group_service.pb.go b/proto/nebius/iam/v1/group_service.pb.go new file mode 100644 index 0000000..66294c0 --- /dev/null +++ b/proto/nebius/iam/v1/group_service.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/group_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGroupRequest) Reset() { + *x = GetGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupRequest) ProtoMessage() {} + +func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. +func (*GetGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetGroupByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetGroupByNameRequest) Reset() { + *x = GetGroupByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupByNameRequest) ProtoMessage() {} + +func (x *GetGroupByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupByNameRequest.ProtoReflect.Descriptor instead. +func (*GetGroupByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetGroupByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetGroupByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListGroupsRequest) Reset() { + *x = ListGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsRequest) ProtoMessage() {} + +func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListGroupsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListGroupsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListGroupsRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListGroupsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListGroupsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Group `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGroupsResponse) Reset() { + *x = ListGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsResponse) ProtoMessage() {} + +func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_group_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListGroupsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_group_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListGroupsResponse) GetItems() []*Group { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListGroupsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_group_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_group_service_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x58, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x68, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xed, 0x01, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1e, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x47, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4b, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, + 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x58, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_group_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_group_service_proto_rawDescData = file_nebius_iam_v1_group_service_proto_rawDesc +) + +func file_nebius_iam_v1_group_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_group_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_group_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_group_service_proto_rawDescData) + }) + return file_nebius_iam_v1_group_service_proto_rawDescData +} + +var file_nebius_iam_v1_group_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_iam_v1_group_service_proto_goTypes = []any{ + (*GetGroupRequest)(nil), // 0: nebius.iam.v1.GetGroupRequest + (*GetGroupByNameRequest)(nil), // 1: nebius.iam.v1.GetGroupByNameRequest + (*ListGroupsRequest)(nil), // 2: nebius.iam.v1.ListGroupsRequest + (*ListGroupsResponse)(nil), // 3: nebius.iam.v1.ListGroupsResponse + (*Group)(nil), // 4: nebius.iam.v1.Group +} +var file_nebius_iam_v1_group_service_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.ListGroupsResponse.items:type_name -> nebius.iam.v1.Group + 0, // 1: nebius.iam.v1.GroupService.Get:input_type -> nebius.iam.v1.GetGroupRequest + 1, // 2: nebius.iam.v1.GroupService.GetByName:input_type -> nebius.iam.v1.GetGroupByNameRequest + 2, // 3: nebius.iam.v1.GroupService.List:input_type -> nebius.iam.v1.ListGroupsRequest + 4, // 4: nebius.iam.v1.GroupService.Get:output_type -> nebius.iam.v1.Group + 4, // 5: nebius.iam.v1.GroupService.GetByName:output_type -> nebius.iam.v1.Group + 3, // 6: nebius.iam.v1.GroupService.List:output_type -> nebius.iam.v1.ListGroupsResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_group_service_proto_init() } +func file_nebius_iam_v1_group_service_proto_init() { + if File_nebius_iam_v1_group_service_proto != nil { + return + } + file_nebius_iam_v1_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_group_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetGroupByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_group_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_group_service_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_group_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_group_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_group_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_group_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_group_service_proto = out.File + file_nebius_iam_v1_group_service_proto_rawDesc = nil + file_nebius_iam_v1_group_service_proto_goTypes = nil + file_nebius_iam_v1_group_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/group_service.sensitive.pb.go b/proto/nebius/iam/v1/group_service.sensitive.pb.go new file mode 100644 index 0000000..185cca6 --- /dev/null +++ b/proto/nebius/iam/v1/group_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetGroupByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetGroupByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGroupsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGroupsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListGroupsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListGroupsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/group_service_grpc.pb.go b/proto/nebius/iam/v1/group_service_grpc.pb.go new file mode 100644 index 0000000..a3f8809 --- /dev/null +++ b/proto/nebius/iam/v1/group_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/group_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GroupService_Get_FullMethodName = "/nebius.iam.v1.GroupService/Get" + GroupService_GetByName_FullMethodName = "/nebius.iam.v1.GroupService/GetByName" + GroupService_List_FullMethodName = "/nebius.iam.v1.GroupService/List" +) + +// GroupServiceClient is the client API for GroupService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GroupServiceClient interface { + Get(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) + GetByName(ctx context.Context, in *GetGroupByNameRequest, opts ...grpc.CallOption) (*Group, error) + List(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) +} + +type groupServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { + return &groupServiceClient{cc} +} + +func (c *groupServiceClient) Get(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) { + out := new(Group) + err := c.cc.Invoke(ctx, GroupService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) GetByName(ctx context.Context, in *GetGroupByNameRequest, opts ...grpc.CallOption) (*Group, error) { + out := new(Group) + err := c.cc.Invoke(ctx, GroupService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) List(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { + out := new(ListGroupsResponse) + err := c.cc.Invoke(ctx, GroupService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GroupServiceServer is the server API for GroupService service. +// All implementations should embed UnimplementedGroupServiceServer +// for forward compatibility +type GroupServiceServer interface { + Get(context.Context, *GetGroupRequest) (*Group, error) + GetByName(context.Context, *GetGroupByNameRequest) (*Group, error) + List(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) +} + +// UnimplementedGroupServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGroupServiceServer struct { +} + +func (UnimplementedGroupServiceServer) Get(context.Context, *GetGroupRequest) (*Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedGroupServiceServer) GetByName(context.Context, *GetGroupByNameRequest) (*Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedGroupServiceServer) List(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeGroupServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GroupServiceServer will +// result in compilation errors. +type UnsafeGroupServiceServer interface { + mustEmbedUnimplementedGroupServiceServer() +} + +func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer) { + s.RegisterService(&GroupService_ServiceDesc, srv) +} + +func _GroupService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).Get(ctx, req.(*GetGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).GetByName(ctx, req.(*GetGroupByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).List(ctx, req.(*ListGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GroupService_ServiceDesc is the grpc.ServiceDesc for GroupService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GroupService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.GroupService", + HandlerType: (*GroupServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _GroupService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _GroupService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _GroupService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/group_service.proto", +} diff --git a/proto/nebius/iam/v1/identity_service.pb.go b/proto/nebius/iam/v1/identity_service.pb.go new file mode 100644 index 0000000..05780fe --- /dev/null +++ b/proto/nebius/iam/v1/identity_service.pb.go @@ -0,0 +1,87 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/identity_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_nebius_iam_v1_identity_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_identity_service_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x32, 0x7c, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x0f, 0xba, 0x4a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x69, 0x61, 0x6d, + 0x42, 0x5b, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_nebius_iam_v1_identity_service_proto_goTypes = []any{ + (*ExchangeTokenRequest)(nil), // 0: nebius.iam.v1.ExchangeTokenRequest + (*CreateTokenResponse)(nil), // 1: nebius.iam.v1.CreateTokenResponse +} +var file_nebius_iam_v1_identity_service_proto_depIdxs = []int32{ + 0, // 0: nebius.iam.v1.IdentityService.ExchangeToken:input_type -> nebius.iam.v1.ExchangeTokenRequest + 1, // 1: nebius.iam.v1.IdentityService.ExchangeToken:output_type -> nebius.iam.v1.CreateTokenResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_identity_service_proto_init() } +func file_nebius_iam_v1_identity_service_proto_init() { + if File_nebius_iam_v1_identity_service_proto != nil { + return + } + file_nebius_iam_v1_token_service_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_identity_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_identity_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_identity_service_proto_depIdxs, + }.Build() + File_nebius_iam_v1_identity_service_proto = out.File + file_nebius_iam_v1_identity_service_proto_rawDesc = nil + file_nebius_iam_v1_identity_service_proto_goTypes = nil + file_nebius_iam_v1_identity_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/identity_service.sensitive.pb.go b/proto/nebius/iam/v1/identity_service.sensitive.pb.go new file mode 100644 index 0000000..79ffd73 --- /dev/null +++ b/proto/nebius/iam/v1/identity_service.sensitive.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 diff --git a/proto/nebius/iam/v1/identity_service_grpc.pb.go b/proto/nebius/iam/v1/identity_service_grpc.pb.go new file mode 100644 index 0000000..ccce013 --- /dev/null +++ b/proto/nebius/iam/v1/identity_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/identity_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + IdentityService_ExchangeToken_FullMethodName = "/nebius.iam.v1.IdentityService/ExchangeToken" +) + +// IdentityServiceClient is the client API for IdentityService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type IdentityServiceClient interface { + ExchangeToken(ctx context.Context, in *ExchangeTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) +} + +type identityServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIdentityServiceClient(cc grpc.ClientConnInterface) IdentityServiceClient { + return &identityServiceClient{cc} +} + +func (c *identityServiceClient) ExchangeToken(ctx context.Context, in *ExchangeTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) { + out := new(CreateTokenResponse) + err := c.cc.Invoke(ctx, IdentityService_ExchangeToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IdentityServiceServer is the server API for IdentityService service. +// All implementations should embed UnimplementedIdentityServiceServer +// for forward compatibility +type IdentityServiceServer interface { + ExchangeToken(context.Context, *ExchangeTokenRequest) (*CreateTokenResponse, error) +} + +// UnimplementedIdentityServiceServer should be embedded to have forward compatible implementations. +type UnimplementedIdentityServiceServer struct { +} + +func (UnimplementedIdentityServiceServer) ExchangeToken(context.Context, *ExchangeTokenRequest) (*CreateTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExchangeToken not implemented") +} + +// UnsafeIdentityServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IdentityServiceServer will +// result in compilation errors. +type UnsafeIdentityServiceServer interface { + mustEmbedUnimplementedIdentityServiceServer() +} + +func RegisterIdentityServiceServer(s grpc.ServiceRegistrar, srv IdentityServiceServer) { + s.RegisterService(&IdentityService_ServiceDesc, srv) +} + +func _IdentityService_ExchangeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExchangeTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityServiceServer).ExchangeToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityService_ExchangeToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityServiceServer).ExchangeToken(ctx, req.(*ExchangeTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// IdentityService_ServiceDesc is the grpc.ServiceDesc for IdentityService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IdentityService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.IdentityService", + HandlerType: (*IdentityServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ExchangeToken", + Handler: _IdentityService_ExchangeToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/identity_service.proto", +} diff --git a/proto/nebius/iam/v1/invitation.pb.go b/proto/nebius/iam/v1/invitation.pb.go new file mode 100644 index 0000000..a5ae2a0 --- /dev/null +++ b/proto/nebius/iam/v1/invitation.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/invitation.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InvitationStatus_State int32 + +const ( + InvitationStatus_UNSPECIFIED InvitationStatus_State = 0 + InvitationStatus_CREATING InvitationStatus_State = 4 // contacts data is not stored in pds yet. probably will GC it later + InvitationStatus_CREATED InvitationStatus_State = 5 // notification is not sent yet + InvitationStatus_PENDING InvitationStatus_State = 1 // notification is sent, we are waiting for the user to approve the notification + InvitationStatus_EXPIRED InvitationStatus_State = 2 // notification is expired, accept is no longer possible + InvitationStatus_ACCEPTED InvitationStatus_State = 3 // notification is accepted +) + +// Enum value maps for InvitationStatus_State. +var ( + InvitationStatus_State_name = map[int32]string{ + 0: "UNSPECIFIED", + 4: "CREATING", + 5: "CREATED", + 1: "PENDING", + 2: "EXPIRED", + 3: "ACCEPTED", + } + InvitationStatus_State_value = map[string]int32{ + "UNSPECIFIED": 0, + "CREATING": 4, + "CREATED": 5, + "PENDING": 1, + "EXPIRED": 2, + "ACCEPTED": 3, + } +) + +func (x InvitationStatus_State) Enum() *InvitationStatus_State { + p := new(InvitationStatus_State) + *p = x + return p +} + +func (x InvitationStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InvitationStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_invitation_proto_enumTypes[0].Descriptor() +} + +func (InvitationStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_invitation_proto_enumTypes[0] +} + +func (x InvitationStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InvitationStatus_State.Descriptor instead. +func (InvitationStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_proto_rawDescGZIP(), []int{2, 0} +} + +type Invitation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InvitationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *InvitationStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Invitation) Reset() { + *x = Invitation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Invitation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Invitation) ProtoMessage() {} + +func (x *Invitation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Invitation.ProtoReflect.Descriptor instead. +func (*Invitation) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_proto_rawDescGZIP(), []int{0} +} + +func (x *Invitation) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Invitation) GetSpec() *InvitationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Invitation) GetStatus() *InvitationStatus { + if x != nil { + return x.Status + } + return nil +} + +type InvitationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Types that are assignable to Contact: + // + // *InvitationSpec_Email + Contact isInvitationSpec_Contact `protobuf_oneof:"contact"` +} + +func (x *InvitationSpec) Reset() { + *x = InvitationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvitationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvitationSpec) ProtoMessage() {} + +func (x *InvitationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvitationSpec.ProtoReflect.Descriptor instead. +func (*InvitationSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_proto_rawDescGZIP(), []int{1} +} + +func (x *InvitationSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (m *InvitationSpec) GetContact() isInvitationSpec_Contact { + if m != nil { + return m.Contact + } + return nil +} + +func (x *InvitationSpec) GetEmail() string { + if x, ok := x.GetContact().(*InvitationSpec_Email); ok { + return x.Email + } + return "" +} + +type isInvitationSpec_Contact interface { + isInvitationSpec_Contact() +} + +type InvitationSpec_Email struct { + Email string `protobuf:"bytes,11,opt,name=email,proto3,oneof"` +} + +func (*InvitationSpec_Email) isInvitationSpec_Contact() {} + +type InvitationStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TenantUserAccountId string `protobuf:"bytes,1,opt,name=tenant_user_account_id,json=tenantUserAccountId,proto3" json:"tenant_user_account_id,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + State InvitationStatus_State `protobuf:"varint,3,opt,name=state,proto3,enum=nebius.iam.v1.InvitationStatus_State" json:"state,omitempty"` +} + +func (x *InvitationStatus) Reset() { + *x = InvitationStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvitationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvitationStatus) ProtoMessage() {} + +func (x *InvitationStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvitationStatus.ProtoReflect.Descriptor instead. +func (*InvitationStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_proto_rawDescGZIP(), []int{2} +} + +func (x *InvitationStatus) GetTenantUserAccountId() string { + if x != nil { + return x.TenantUserAccountId + } + return "" +} + +func (x *InvitationStatus) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *InvitationStatus) GetState() InvitationStatus_State { + if x != nil { + return x.State + } + return InvitationStatus_UNSPECIFIED +} + +var File_nebius_iam_v1_invitation_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_invitation_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, + 0x5a, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x22, 0x9c, 0x02, 0x0a, 0x10, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x33, 0x0a, 0x16, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, + 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x5b, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, + 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, + 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x03, 0x42, 0x56, 0x0a, 0x14, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x42, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_invitation_proto_rawDescOnce sync.Once + file_nebius_iam_v1_invitation_proto_rawDescData = file_nebius_iam_v1_invitation_proto_rawDesc +) + +func file_nebius_iam_v1_invitation_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_invitation_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_invitation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_invitation_proto_rawDescData) + }) + return file_nebius_iam_v1_invitation_proto_rawDescData +} + +var file_nebius_iam_v1_invitation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_invitation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_invitation_proto_goTypes = []any{ + (InvitationStatus_State)(0), // 0: nebius.iam.v1.InvitationStatus.State + (*Invitation)(nil), // 1: nebius.iam.v1.Invitation + (*InvitationSpec)(nil), // 2: nebius.iam.v1.InvitationSpec + (*InvitationStatus)(nil), // 3: nebius.iam.v1.InvitationStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_nebius_iam_v1_invitation_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.Invitation.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.iam.v1.Invitation.spec:type_name -> nebius.iam.v1.InvitationSpec + 3, // 2: nebius.iam.v1.Invitation.status:type_name -> nebius.iam.v1.InvitationStatus + 5, // 3: nebius.iam.v1.InvitationStatus.expires_at:type_name -> google.protobuf.Timestamp + 0, // 4: nebius.iam.v1.InvitationStatus.state:type_name -> nebius.iam.v1.InvitationStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_invitation_proto_init() } +func file_nebius_iam_v1_invitation_proto_init() { + if File_nebius_iam_v1_invitation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_invitation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Invitation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*InvitationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*InvitationStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_invitation_proto_msgTypes[1].OneofWrappers = []any{ + (*InvitationSpec_Email)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_invitation_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_invitation_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_invitation_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_invitation_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_invitation_proto_msgTypes, + }.Build() + File_nebius_iam_v1_invitation_proto = out.File + file_nebius_iam_v1_invitation_proto_rawDesc = nil + file_nebius_iam_v1_invitation_proto_goTypes = nil + file_nebius_iam_v1_invitation_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/invitation.sensitive.pb.go b/proto/nebius/iam/v1/invitation.sensitive.pb.go new file mode 100644 index 0000000..cfd619b --- /dev/null +++ b/proto/nebius/iam/v1/invitation.sensitive.pb.go @@ -0,0 +1,102 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Invitation] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Invitation) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Invitation]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Invitation +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Invitation], use the following code: +// +// var original *Invitation +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Invitation) +func (x *Invitation) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Invitation) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInvitation)(c)) +} + +// wrapperInvitation is used to return [Invitation] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInvitation Invitation + +func (w *wrapperInvitation) String() string { + return (*Invitation)(w).String() +} + +func (*wrapperInvitation) ProtoMessage() {} + +func (w *wrapperInvitation) ProtoReflect() protoreflect.Message { + return (*Invitation)(w).ProtoReflect() +} + +// Sanitize mutates [InvitationSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *InvitationSpec) Sanitize() { + if x == nil { + return + } + if o, ok := x.Contact.(*InvitationSpec_Email); ok && o != nil { + o.Email = "***" + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [InvitationSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *InvitationSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [InvitationSpec], use the following code: +// +// var original *InvitationSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*InvitationSpec) +func (x *InvitationSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*InvitationSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperInvitationSpec)(c)) +} + +// wrapperInvitationSpec is used to return [InvitationSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperInvitationSpec InvitationSpec + +func (w *wrapperInvitationSpec) String() string { + return (*InvitationSpec)(w).String() +} + +func (*wrapperInvitationSpec) ProtoMessage() {} + +func (w *wrapperInvitationSpec) ProtoReflect() protoreflect.Message { + return (*InvitationSpec)(w).ProtoReflect() +} + +// func (x *InvitationStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *InvitationStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/invitation_service.pb.go b/proto/nebius/iam/v1/invitation_service.pb.go new file mode 100644 index 0000000..b7c3f72 --- /dev/null +++ b/proto/nebius/iam/v1/invitation_service.pb.go @@ -0,0 +1,674 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/invitation_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateInvitationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InvitationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + NoSend bool `protobuf:"varint,3,opt,name=no_send,json=noSend,proto3" json:"no_send,omitempty"` // if set, no sending is attempted (it's supposed that later a Resend method is called) +} + +func (x *CreateInvitationRequest) Reset() { + *x = CreateInvitationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInvitationRequest) ProtoMessage() {} + +func (x *CreateInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInvitationRequest.ProtoReflect.Descriptor instead. +func (*CreateInvitationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateInvitationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateInvitationRequest) GetSpec() *InvitationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *CreateInvitationRequest) GetNoSend() bool { + if x != nil { + return x.NoSend + } + return false +} + +type GetInvitationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetInvitationRequest) Reset() { + *x = GetInvitationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInvitationRequest) ProtoMessage() {} + +func (x *GetInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInvitationRequest.ProtoReflect.Descriptor instead. +func (*GetInvitationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetInvitationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListInvitationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListInvitationsRequest) Reset() { + *x = ListInvitationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInvitationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitationsRequest) ProtoMessage() {} + +func (x *ListInvitationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitationsRequest.ProtoReflect.Descriptor instead. +func (*ListInvitationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListInvitationsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListInvitationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListInvitationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListInvitationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListInvitationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Invitation `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListInvitationsResponse) Reset() { + *x = ListInvitationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInvitationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitationsResponse) ProtoMessage() {} + +func (x *ListInvitationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInvitationsResponse.ProtoReflect.Descriptor instead. +func (*ListInvitationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListInvitationsResponse) GetItems() []*Invitation { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListInvitationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteInvitationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteInvitationRequest) Reset() { + *x = DeleteInvitationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInvitationRequest) ProtoMessage() {} + +func (x *DeleteInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInvitationRequest.ProtoReflect.Descriptor instead. +func (*DeleteInvitationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteInvitationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UpdateInvitationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *InvitationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateInvitationRequest) Reset() { + *x = UpdateInvitationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInvitationRequest) ProtoMessage() {} + +func (x *UpdateInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInvitationRequest.ProtoReflect.Descriptor instead. +func (*UpdateInvitationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateInvitationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateInvitationRequest) GetSpec() *InvitationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type ResendInvitationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ResendInvitationRequest) Reset() { + *x = ResendInvitationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResendInvitationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendInvitationRequest) ProtoMessage() {} + +func (x *ResendInvitationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_invitation_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResendInvitationRequest.ProtoReflect.Descriptor instead. +func (*ResendInvitationRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_invitation_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ResendInvitationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_iam_v1_invitation_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_invitation_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x6e, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x22, 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0x72, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x31, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x65, + 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xf9, 0x03, 0x0a, 0x11, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x45, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, + 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, + 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, 0xba, 0x4a, 0x07, + 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x5d, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, + 0x16, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_invitation_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_invitation_service_proto_rawDescData = file_nebius_iam_v1_invitation_service_proto_rawDesc +) + +func file_nebius_iam_v1_invitation_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_invitation_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_invitation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_invitation_service_proto_rawDescData) + }) + return file_nebius_iam_v1_invitation_service_proto_rawDescData +} + +var file_nebius_iam_v1_invitation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_iam_v1_invitation_service_proto_goTypes = []any{ + (*CreateInvitationRequest)(nil), // 0: nebius.iam.v1.CreateInvitationRequest + (*GetInvitationRequest)(nil), // 1: nebius.iam.v1.GetInvitationRequest + (*ListInvitationsRequest)(nil), // 2: nebius.iam.v1.ListInvitationsRequest + (*ListInvitationsResponse)(nil), // 3: nebius.iam.v1.ListInvitationsResponse + (*DeleteInvitationRequest)(nil), // 4: nebius.iam.v1.DeleteInvitationRequest + (*UpdateInvitationRequest)(nil), // 5: nebius.iam.v1.UpdateInvitationRequest + (*ResendInvitationRequest)(nil), // 6: nebius.iam.v1.ResendInvitationRequest + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*InvitationSpec)(nil), // 8: nebius.iam.v1.InvitationSpec + (*Invitation)(nil), // 9: nebius.iam.v1.Invitation + (*v1.Operation)(nil), // 10: nebius.common.v1.Operation +} +var file_nebius_iam_v1_invitation_service_proto_depIdxs = []int32{ + 7, // 0: nebius.iam.v1.CreateInvitationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 1: nebius.iam.v1.CreateInvitationRequest.spec:type_name -> nebius.iam.v1.InvitationSpec + 9, // 2: nebius.iam.v1.ListInvitationsResponse.items:type_name -> nebius.iam.v1.Invitation + 7, // 3: nebius.iam.v1.UpdateInvitationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 4: nebius.iam.v1.UpdateInvitationRequest.spec:type_name -> nebius.iam.v1.InvitationSpec + 0, // 5: nebius.iam.v1.InvitationService.Create:input_type -> nebius.iam.v1.CreateInvitationRequest + 1, // 6: nebius.iam.v1.InvitationService.Get:input_type -> nebius.iam.v1.GetInvitationRequest + 2, // 7: nebius.iam.v1.InvitationService.List:input_type -> nebius.iam.v1.ListInvitationsRequest + 4, // 8: nebius.iam.v1.InvitationService.Delete:input_type -> nebius.iam.v1.DeleteInvitationRequest + 5, // 9: nebius.iam.v1.InvitationService.Update:input_type -> nebius.iam.v1.UpdateInvitationRequest + 6, // 10: nebius.iam.v1.InvitationService.Resend:input_type -> nebius.iam.v1.ResendInvitationRequest + 10, // 11: nebius.iam.v1.InvitationService.Create:output_type -> nebius.common.v1.Operation + 9, // 12: nebius.iam.v1.InvitationService.Get:output_type -> nebius.iam.v1.Invitation + 3, // 13: nebius.iam.v1.InvitationService.List:output_type -> nebius.iam.v1.ListInvitationsResponse + 10, // 14: nebius.iam.v1.InvitationService.Delete:output_type -> nebius.common.v1.Operation + 10, // 15: nebius.iam.v1.InvitationService.Update:output_type -> nebius.common.v1.Operation + 10, // 16: nebius.iam.v1.InvitationService.Resend:output_type -> nebius.common.v1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_invitation_service_proto_init() } +func file_nebius_iam_v1_invitation_service_proto_init() { + if File_nebius_iam_v1_invitation_service_proto != nil { + return + } + file_nebius_iam_v1_invitation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_invitation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListInvitationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListInvitationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_invitation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ResendInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_invitation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_invitation_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_invitation_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_invitation_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_invitation_service_proto = out.File + file_nebius_iam_v1_invitation_service_proto_rawDesc = nil + file_nebius_iam_v1_invitation_service_proto_goTypes = nil + file_nebius_iam_v1_invitation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/invitation_service.sensitive.pb.go b/proto/nebius/iam/v1/invitation_service.sensitive.pb.go new file mode 100644 index 0000000..3508db4 --- /dev/null +++ b/proto/nebius/iam/v1/invitation_service.sensitive.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [CreateInvitationRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateInvitationRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateInvitationRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateInvitationRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateInvitationRequest], use the following code: +// +// var original *CreateInvitationRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateInvitationRequest) +func (x *CreateInvitationRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateInvitationRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateInvitationRequest)(c)) +} + +// wrapperCreateInvitationRequest is used to return [CreateInvitationRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateInvitationRequest CreateInvitationRequest + +func (w *wrapperCreateInvitationRequest) String() string { + return (*CreateInvitationRequest)(w).String() +} + +func (*wrapperCreateInvitationRequest) ProtoMessage() {} + +func (w *wrapperCreateInvitationRequest) ProtoReflect() protoreflect.Message { + return (*CreateInvitationRequest)(w).ProtoReflect() +} + +// func (x *GetInvitationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetInvitationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListInvitationsRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListInvitationsRequest) Sanitize() { + if x == nil { + return + } + x.Filter = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListInvitationsRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListInvitationsRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListInvitationsRequest], use the following code: +// +// var original *ListInvitationsRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListInvitationsRequest) +func (x *ListInvitationsRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListInvitationsRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListInvitationsRequest)(c)) +} + +// wrapperListInvitationsRequest is used to return [ListInvitationsRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListInvitationsRequest ListInvitationsRequest + +func (w *wrapperListInvitationsRequest) String() string { + return (*ListInvitationsRequest)(w).String() +} + +func (*wrapperListInvitationsRequest) ProtoMessage() {} + +func (w *wrapperListInvitationsRequest) ProtoReflect() protoreflect.Message { + return (*ListInvitationsRequest)(w).ProtoReflect() +} + +// Sanitize mutates [ListInvitationsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListInvitationsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListInvitationsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListInvitationsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListInvitationsResponse], use the following code: +// +// var original *ListInvitationsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListInvitationsResponse) +func (x *ListInvitationsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListInvitationsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListInvitationsResponse)(c)) +} + +// wrapperListInvitationsResponse is used to return [ListInvitationsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListInvitationsResponse ListInvitationsResponse + +func (w *wrapperListInvitationsResponse) String() string { + return (*ListInvitationsResponse)(w).String() +} + +func (*wrapperListInvitationsResponse) ProtoMessage() {} + +func (w *wrapperListInvitationsResponse) ProtoReflect() protoreflect.Message { + return (*ListInvitationsResponse)(w).ProtoReflect() +} + +// func (x *DeleteInvitationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteInvitationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [UpdateInvitationRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateInvitationRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateInvitationRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateInvitationRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateInvitationRequest], use the following code: +// +// var original *UpdateInvitationRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateInvitationRequest) +func (x *UpdateInvitationRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateInvitationRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateInvitationRequest)(c)) +} + +// wrapperUpdateInvitationRequest is used to return [UpdateInvitationRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateInvitationRequest UpdateInvitationRequest + +func (w *wrapperUpdateInvitationRequest) String() string { + return (*UpdateInvitationRequest)(w).String() +} + +func (*wrapperUpdateInvitationRequest) ProtoMessage() {} + +func (w *wrapperUpdateInvitationRequest) ProtoReflect() protoreflect.Message { + return (*UpdateInvitationRequest)(w).ProtoReflect() +} + +// func (x *ResendInvitationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ResendInvitationRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/invitation_service_grpc.pb.go b/proto/nebius/iam/v1/invitation_service_grpc.pb.go new file mode 100644 index 0000000..ca8a068 --- /dev/null +++ b/proto/nebius/iam/v1/invitation_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/invitation_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + InvitationService_Create_FullMethodName = "/nebius.iam.v1.InvitationService/Create" + InvitationService_Get_FullMethodName = "/nebius.iam.v1.InvitationService/Get" + InvitationService_List_FullMethodName = "/nebius.iam.v1.InvitationService/List" + InvitationService_Delete_FullMethodName = "/nebius.iam.v1.InvitationService/Delete" + InvitationService_Update_FullMethodName = "/nebius.iam.v1.InvitationService/Update" + InvitationService_Resend_FullMethodName = "/nebius.iam.v1.InvitationService/Resend" +) + +// InvitationServiceClient is the client API for InvitationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InvitationServiceClient interface { + Create(ctx context.Context, in *CreateInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetInvitationRequest, opts ...grpc.CallOption) (*Invitation, error) + List(ctx context.Context, in *ListInvitationsRequest, opts ...grpc.CallOption) (*ListInvitationsResponse, error) + Delete(ctx context.Context, in *DeleteInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Resend(ctx context.Context, in *ResendInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type invitationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInvitationServiceClient(cc grpc.ClientConnInterface) InvitationServiceClient { + return &invitationServiceClient{cc} +} + +func (c *invitationServiceClient) Create(ctx context.Context, in *CreateInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InvitationService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *invitationServiceClient) Get(ctx context.Context, in *GetInvitationRequest, opts ...grpc.CallOption) (*Invitation, error) { + out := new(Invitation) + err := c.cc.Invoke(ctx, InvitationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *invitationServiceClient) List(ctx context.Context, in *ListInvitationsRequest, opts ...grpc.CallOption) (*ListInvitationsResponse, error) { + out := new(ListInvitationsResponse) + err := c.cc.Invoke(ctx, InvitationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *invitationServiceClient) Delete(ctx context.Context, in *DeleteInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InvitationService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *invitationServiceClient) Update(ctx context.Context, in *UpdateInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InvitationService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *invitationServiceClient) Resend(ctx context.Context, in *ResendInvitationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, InvitationService_Resend_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InvitationServiceServer is the server API for InvitationService service. +// All implementations should embed UnimplementedInvitationServiceServer +// for forward compatibility +type InvitationServiceServer interface { + Create(context.Context, *CreateInvitationRequest) (*v1.Operation, error) + Get(context.Context, *GetInvitationRequest) (*Invitation, error) + List(context.Context, *ListInvitationsRequest) (*ListInvitationsResponse, error) + Delete(context.Context, *DeleteInvitationRequest) (*v1.Operation, error) + Update(context.Context, *UpdateInvitationRequest) (*v1.Operation, error) + Resend(context.Context, *ResendInvitationRequest) (*v1.Operation, error) +} + +// UnimplementedInvitationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedInvitationServiceServer struct { +} + +func (UnimplementedInvitationServiceServer) Create(context.Context, *CreateInvitationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedInvitationServiceServer) Get(context.Context, *GetInvitationRequest) (*Invitation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedInvitationServiceServer) List(context.Context, *ListInvitationsRequest) (*ListInvitationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedInvitationServiceServer) Delete(context.Context, *DeleteInvitationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedInvitationServiceServer) Update(context.Context, *UpdateInvitationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedInvitationServiceServer) Resend(context.Context, *ResendInvitationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resend not implemented") +} + +// UnsafeInvitationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InvitationServiceServer will +// result in compilation errors. +type UnsafeInvitationServiceServer interface { + mustEmbedUnimplementedInvitationServiceServer() +} + +func RegisterInvitationServiceServer(s grpc.ServiceRegistrar, srv InvitationServiceServer) { + s.RegisterService(&InvitationService_ServiceDesc, srv) +} + +func _InvitationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateInvitationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).Create(ctx, req.(*CreateInvitationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InvitationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInvitationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).Get(ctx, req.(*GetInvitationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InvitationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInvitationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).List(ctx, req.(*ListInvitationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InvitationService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteInvitationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).Delete(ctx, req.(*DeleteInvitationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InvitationService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateInvitationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).Update(ctx, req.(*UpdateInvitationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InvitationService_Resend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResendInvitationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InvitationServiceServer).Resend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InvitationService_Resend_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InvitationServiceServer).Resend(ctx, req.(*ResendInvitationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InvitationService_ServiceDesc is the grpc.ServiceDesc for InvitationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InvitationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.InvitationService", + HandlerType: (*InvitationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _InvitationService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _InvitationService_Get_Handler, + }, + { + MethodName: "List", + Handler: _InvitationService_List_Handler, + }, + { + MethodName: "Delete", + Handler: _InvitationService_Delete_Handler, + }, + { + MethodName: "Update", + Handler: _InvitationService_Update_Handler, + }, + { + MethodName: "Resend", + Handler: _InvitationService_Resend_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/invitation_service.proto", +} diff --git a/proto/nebius/iam/v1/profile_service.pb.go b/proto/nebius/iam/v1/profile_service.pb.go new file mode 100644 index 0000000..bb6d5fc --- /dev/null +++ b/proto/nebius/iam/v1/profile_service.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/profile_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetProfileRequest) Reset() { + *x = GetProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileRequest) ProtoMessage() {} + +func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. +func (*GetProfileRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{0} +} + +type GetProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Profile: + // + // *GetProfileResponse_UserProfile + // *GetProfileResponse_ServiceAccountProfile + // *GetProfileResponse_AnonymousProfile + Profile isGetProfileResponse_Profile `protobuf_oneof:"profile"` +} + +func (x *GetProfileResponse) Reset() { + *x = GetProfileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileResponse) ProtoMessage() {} + +func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead. +func (*GetProfileResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{1} +} + +func (m *GetProfileResponse) GetProfile() isGetProfileResponse_Profile { + if m != nil { + return m.Profile + } + return nil +} + +func (x *GetProfileResponse) GetUserProfile() *UserProfile { + if x, ok := x.GetProfile().(*GetProfileResponse_UserProfile); ok { + return x.UserProfile + } + return nil +} + +func (x *GetProfileResponse) GetServiceAccountProfile() *ServiceAccountProfile { + if x, ok := x.GetProfile().(*GetProfileResponse_ServiceAccountProfile); ok { + return x.ServiceAccountProfile + } + return nil +} + +func (x *GetProfileResponse) GetAnonymousProfile() *AnonymousAccount { + if x, ok := x.GetProfile().(*GetProfileResponse_AnonymousProfile); ok { + return x.AnonymousProfile + } + return nil +} + +type isGetProfileResponse_Profile interface { + isGetProfileResponse_Profile() +} + +type GetProfileResponse_UserProfile struct { + UserProfile *UserProfile `protobuf:"bytes,1,opt,name=user_profile,json=userProfile,proto3,oneof"` +} + +type GetProfileResponse_ServiceAccountProfile struct { + ServiceAccountProfile *ServiceAccountProfile `protobuf:"bytes,2,opt,name=service_account_profile,json=serviceAccountProfile,proto3,oneof"` +} + +type GetProfileResponse_AnonymousProfile struct { + AnonymousProfile *AnonymousAccount `protobuf:"bytes,3,opt,name=anonymous_profile,json=anonymousProfile,proto3,oneof"` +} + +func (*GetProfileResponse_UserProfile) isGetProfileResponse_Profile() {} + +func (*GetProfileResponse_ServiceAccountProfile) isGetProfileResponse_Profile() {} + +func (*GetProfileResponse_AnonymousProfile) isGetProfileResponse_Profile() {} + +type UserProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + FederationInfo *UserAccountExternalId `protobuf:"bytes,2,opt,name=federation_info,json=federationInfo,proto3" json:"federation_info,omitempty"` + // Types that are assignable to AttributesOptional: + // + // *UserProfile_Attributes + // *UserProfile_RetrievingError + AttributesOptional isUserProfile_AttributesOptional `protobuf_oneof:"attributes_optional"` + Tenants []*UserTenantInfo `protobuf:"bytes,5,rep,name=tenants,proto3" json:"tenants,omitempty"` +} + +func (x *UserProfile) Reset() { + *x = UserProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserProfile) ProtoMessage() {} + +func (x *UserProfile) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserProfile.ProtoReflect.Descriptor instead. +func (*UserProfile) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{2} +} + +func (x *UserProfile) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UserProfile) GetFederationInfo() *UserAccountExternalId { + if x != nil { + return x.FederationInfo + } + return nil +} + +func (m *UserProfile) GetAttributesOptional() isUserProfile_AttributesOptional { + if m != nil { + return m.AttributesOptional + } + return nil +} + +func (x *UserProfile) GetAttributes() *UserAttributes { + if x, ok := x.GetAttributesOptional().(*UserProfile_Attributes); ok { + return x.Attributes + } + return nil +} + +func (x *UserProfile) GetRetrievingError() *Error { + if x, ok := x.GetAttributesOptional().(*UserProfile_RetrievingError); ok { + return x.RetrievingError + } + return nil +} + +func (x *UserProfile) GetTenants() []*UserTenantInfo { + if x != nil { + return x.Tenants + } + return nil +} + +type isUserProfile_AttributesOptional interface { + isUserProfile_AttributesOptional() +} + +type UserProfile_Attributes struct { + Attributes *UserAttributes `protobuf:"bytes,3,opt,name=attributes,proto3,oneof"` +} + +type UserProfile_RetrievingError struct { + RetrievingError *Error `protobuf:"bytes,4,opt,name=retrieving_error,json=retrievingError,proto3,oneof"` +} + +func (*UserProfile_Attributes) isUserProfile_AttributesOptional() {} + +func (*UserProfile_RetrievingError) isUserProfile_AttributesOptional() {} + +type UserTenantInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` + TenantUserAccountId string `protobuf:"bytes,2,opt,name=tenant_user_account_id,json=tenantUserAccountId,proto3" json:"tenant_user_account_id,omitempty"` +} + +func (x *UserTenantInfo) Reset() { + *x = UserTenantInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserTenantInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserTenantInfo) ProtoMessage() {} + +func (x *UserTenantInfo) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserTenantInfo.ProtoReflect.Descriptor instead. +func (*UserTenantInfo) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UserTenantInfo) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *UserTenantInfo) GetTenantUserAccountId() string { + if x != nil { + return x.TenantUserAccountId + } + return "" +} + +type ServiceAccountProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *ServiceAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *ServiceAccountProfile) Reset() { + *x = ServiceAccountProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccountProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccountProfile) ProtoMessage() {} + +func (x *ServiceAccountProfile) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccountProfile.ProtoReflect.Descriptor instead. +func (*ServiceAccountProfile) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ServiceAccountProfile) GetInfo() *ServiceAccount { + if x != nil { + return x.Info + } + return nil +} + +type AnonymousAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AnonymousAccount) Reset() { + *x = AnonymousAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnonymousAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnonymousAccount) ProtoMessage() {} + +func (x *AnonymousAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_profile_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnonymousAccount.ProtoReflect.Descriptor instead. +func (*AnonymousAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_profile_service_proto_rawDescGZIP(), []int{5} +} + +var File_nebius_iam_v1_profile_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_profile_service_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x90, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0b, + 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x5e, 0x0a, 0x17, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x48, 0x00, 0x52, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x4e, 0x0a, 0x11, 0x61, + 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x61, 0x6e, 0x6f, 0x6e, 0x79, + 0x6d, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xc0, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x0f, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0e, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x76, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x62, 0x0a, 0x0e, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4a, 0x0a, + 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x41, 0x6e, 0x6f, + 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x68, 0x0a, + 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4a, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xba, 0x4a, 0x07, + 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x5a, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, + 0x13, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_profile_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_profile_service_proto_rawDescData = file_nebius_iam_v1_profile_service_proto_rawDesc +) + +func file_nebius_iam_v1_profile_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_profile_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_profile_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_profile_service_proto_rawDescData) + }) + return file_nebius_iam_v1_profile_service_proto_rawDescData +} + +var file_nebius_iam_v1_profile_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_iam_v1_profile_service_proto_goTypes = []any{ + (*GetProfileRequest)(nil), // 0: nebius.iam.v1.GetProfileRequest + (*GetProfileResponse)(nil), // 1: nebius.iam.v1.GetProfileResponse + (*UserProfile)(nil), // 2: nebius.iam.v1.UserProfile + (*UserTenantInfo)(nil), // 3: nebius.iam.v1.UserTenantInfo + (*ServiceAccountProfile)(nil), // 4: nebius.iam.v1.ServiceAccountProfile + (*AnonymousAccount)(nil), // 5: nebius.iam.v1.AnonymousAccount + (*UserAccountExternalId)(nil), // 6: nebius.iam.v1.UserAccountExternalId + (*UserAttributes)(nil), // 7: nebius.iam.v1.UserAttributes + (*Error)(nil), // 8: nebius.iam.v1.Error + (*ServiceAccount)(nil), // 9: nebius.iam.v1.ServiceAccount +} +var file_nebius_iam_v1_profile_service_proto_depIdxs = []int32{ + 2, // 0: nebius.iam.v1.GetProfileResponse.user_profile:type_name -> nebius.iam.v1.UserProfile + 4, // 1: nebius.iam.v1.GetProfileResponse.service_account_profile:type_name -> nebius.iam.v1.ServiceAccountProfile + 5, // 2: nebius.iam.v1.GetProfileResponse.anonymous_profile:type_name -> nebius.iam.v1.AnonymousAccount + 6, // 3: nebius.iam.v1.UserProfile.federation_info:type_name -> nebius.iam.v1.UserAccountExternalId + 7, // 4: nebius.iam.v1.UserProfile.attributes:type_name -> nebius.iam.v1.UserAttributes + 8, // 5: nebius.iam.v1.UserProfile.retrieving_error:type_name -> nebius.iam.v1.Error + 3, // 6: nebius.iam.v1.UserProfile.tenants:type_name -> nebius.iam.v1.UserTenantInfo + 9, // 7: nebius.iam.v1.ServiceAccountProfile.info:type_name -> nebius.iam.v1.ServiceAccount + 0, // 8: nebius.iam.v1.ProfileService.Get:input_type -> nebius.iam.v1.GetProfileRequest + 1, // 9: nebius.iam.v1.ProfileService.Get:output_type -> nebius.iam.v1.GetProfileResponse + 9, // [9:10] is the sub-list for method output_type + 8, // [8:9] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_profile_service_proto_init() } +func file_nebius_iam_v1_profile_service_proto_init() { + if File_nebius_iam_v1_profile_service_proto != nil { + return + } + file_nebius_iam_v1_tenant_user_account_proto_init() + file_nebius_iam_v1_service_account_proto_init() + file_nebius_iam_v1_user_account_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_profile_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*UserProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UserTenantInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ServiceAccountProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*AnonymousAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_profile_service_proto_msgTypes[1].OneofWrappers = []any{ + (*GetProfileResponse_UserProfile)(nil), + (*GetProfileResponse_ServiceAccountProfile)(nil), + (*GetProfileResponse_AnonymousProfile)(nil), + } + file_nebius_iam_v1_profile_service_proto_msgTypes[2].OneofWrappers = []any{ + (*UserProfile_Attributes)(nil), + (*UserProfile_RetrievingError)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_profile_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_profile_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_profile_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_profile_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_profile_service_proto = out.File + file_nebius_iam_v1_profile_service_proto_rawDesc = nil + file_nebius_iam_v1_profile_service_proto_goTypes = nil + file_nebius_iam_v1_profile_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/profile_service.sensitive.pb.go b/proto/nebius/iam/v1/profile_service.sensitive.pb.go new file mode 100644 index 0000000..629b861 --- /dev/null +++ b/proto/nebius/iam/v1/profile_service.sensitive.pb.go @@ -0,0 +1,114 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetProfileRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetProfileRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [GetProfileResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *GetProfileResponse) Sanitize() { + if x == nil { + return + } + if o, ok := x.Profile.(*GetProfileResponse_UserProfile); ok && o != nil { + o.UserProfile.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [GetProfileResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *GetProfileResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [GetProfileResponse], use the following code: +// +// var original *GetProfileResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*GetProfileResponse) +func (x *GetProfileResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*GetProfileResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperGetProfileResponse)(c)) +} + +// wrapperGetProfileResponse is used to return [GetProfileResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperGetProfileResponse GetProfileResponse + +func (w *wrapperGetProfileResponse) String() string { + return (*GetProfileResponse)(w).String() +} + +func (*wrapperGetProfileResponse) ProtoMessage() {} + +func (w *wrapperGetProfileResponse) ProtoReflect() protoreflect.Message { + return (*GetProfileResponse)(w).ProtoReflect() +} + +// Sanitize mutates [UserProfile] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UserProfile) Sanitize() { + if x == nil { + return + } + x.FederationInfo.Sanitize() + if o, ok := x.AttributesOptional.(*UserProfile_Attributes); ok && o != nil { + o.Attributes.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UserProfile]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UserProfile +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UserProfile], use the following code: +// +// var original *UserProfile +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UserProfile) +func (x *UserProfile) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UserProfile) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUserProfile)(c)) +} + +// wrapperUserProfile is used to return [UserProfile] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUserProfile UserProfile + +func (w *wrapperUserProfile) String() string { + return (*UserProfile)(w).String() +} + +func (*wrapperUserProfile) ProtoMessage() {} + +func (w *wrapperUserProfile) ProtoReflect() protoreflect.Message { + return (*UserProfile)(w).ProtoReflect() +} + +// func (x *UserTenantInfo) Sanitize() // is not generated as no sensitive fields found +// func (x *UserTenantInfo) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ServiceAccountProfile) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceAccountProfile) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AnonymousAccount) Sanitize() // is not generated as no sensitive fields found +// func (x *AnonymousAccount) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/profile_service_grpc.pb.go b/proto/nebius/iam/v1/profile_service_grpc.pb.go new file mode 100644 index 0000000..6207acb --- /dev/null +++ b/proto/nebius/iam/v1/profile_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/profile_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ProfileService_Get_FullMethodName = "/nebius.iam.v1.ProfileService/Get" +) + +// ProfileServiceClient is the client API for ProfileService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ProfileServiceClient interface { + Get(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) +} + +type profileServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProfileServiceClient(cc grpc.ClientConnInterface) ProfileServiceClient { + return &profileServiceClient{cc} +} + +func (c *profileServiceClient) Get(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) { + out := new(GetProfileResponse) + err := c.cc.Invoke(ctx, ProfileService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfileServiceServer is the server API for ProfileService service. +// All implementations should embed UnimplementedProfileServiceServer +// for forward compatibility +type ProfileServiceServer interface { + Get(context.Context, *GetProfileRequest) (*GetProfileResponse, error) +} + +// UnimplementedProfileServiceServer should be embedded to have forward compatible implementations. +type UnimplementedProfileServiceServer struct { +} + +func (UnimplementedProfileServiceServer) Get(context.Context, *GetProfileRequest) (*GetProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} + +// UnsafeProfileServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProfileServiceServer will +// result in compilation errors. +type UnsafeProfileServiceServer interface { + mustEmbedUnimplementedProfileServiceServer() +} + +func RegisterProfileServiceServer(s grpc.ServiceRegistrar, srv ProfileServiceServer) { + s.RegisterService(&ProfileService_ServiceDesc, srv) +} + +func _ProfileService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfileServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProfileService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfileServiceServer).Get(ctx, req.(*GetProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProfileService_ServiceDesc is the grpc.ServiceDesc for ProfileService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProfileService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.ProfileService", + HandlerType: (*ProfileServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ProfileService_Get_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/profile_service.proto", +} diff --git a/proto/nebius/iam/v1/project_service.pb.go b/proto/nebius/iam/v1/project_service.pb.go new file mode 100644 index 0000000..c02b3b4 --- /dev/null +++ b/proto/nebius/iam/v1/project_service.pb.go @@ -0,0 +1,430 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/project_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetProjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetProjectRequest) Reset() { + *x = GetProjectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectRequest) ProtoMessage() {} + +func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. +func (*GetProjectRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_project_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetProjectRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetProjectByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetProjectByNameRequest) Reset() { + *x = GetProjectByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProjectByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectByNameRequest) ProtoMessage() {} + +func (x *GetProjectByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectByNameRequest.ProtoReflect.Descriptor instead. +func (*GetProjectByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_project_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetProjectByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetProjectByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListProjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the container ID. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListProjectsRequest) Reset() { + *x = ListProjectsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListProjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectsRequest) ProtoMessage() {} + +func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. +func (*ListProjectsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_project_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListProjectsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListProjectsRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListProjectsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListProjectsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListProjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Container `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListProjectsResponse) Reset() { + *x = ListProjectsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListProjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListProjectsResponse) ProtoMessage() {} + +func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_project_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead. +func (*ListProjectsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_project_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListProjectsResponse) GetItems() []*Container { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListProjectsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_project_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_project_service_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x6e, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xff, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x03, 0x47, 0x65, + 0x74, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x4d, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xba, + 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x5a, 0x0a, 0x14, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x42, 0x13, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_project_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_project_service_proto_rawDescData = file_nebius_iam_v1_project_service_proto_rawDesc +) + +func file_nebius_iam_v1_project_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_project_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_project_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_project_service_proto_rawDescData) + }) + return file_nebius_iam_v1_project_service_proto_rawDescData +} + +var file_nebius_iam_v1_project_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_iam_v1_project_service_proto_goTypes = []any{ + (*GetProjectRequest)(nil), // 0: nebius.iam.v1.GetProjectRequest + (*GetProjectByNameRequest)(nil), // 1: nebius.iam.v1.GetProjectByNameRequest + (*ListProjectsRequest)(nil), // 2: nebius.iam.v1.ListProjectsRequest + (*ListProjectsResponse)(nil), // 3: nebius.iam.v1.ListProjectsResponse + (*Container)(nil), // 4: nebius.iam.v1.Container +} +var file_nebius_iam_v1_project_service_proto_depIdxs = []int32{ + 4, // 0: nebius.iam.v1.ListProjectsResponse.items:type_name -> nebius.iam.v1.Container + 0, // 1: nebius.iam.v1.ProjectService.Get:input_type -> nebius.iam.v1.GetProjectRequest + 1, // 2: nebius.iam.v1.ProjectService.GetByName:input_type -> nebius.iam.v1.GetProjectByNameRequest + 2, // 3: nebius.iam.v1.ProjectService.List:input_type -> nebius.iam.v1.ListProjectsRequest + 4, // 4: nebius.iam.v1.ProjectService.Get:output_type -> nebius.iam.v1.Container + 4, // 5: nebius.iam.v1.ProjectService.GetByName:output_type -> nebius.iam.v1.Container + 3, // 6: nebius.iam.v1.ProjectService.List:output_type -> nebius.iam.v1.ListProjectsResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_project_service_proto_init() } +func file_nebius_iam_v1_project_service_proto_init() { + if File_nebius_iam_v1_project_service_proto != nil { + return + } + file_nebius_iam_v1_container_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_project_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetProjectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_project_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetProjectByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_project_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListProjectsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_project_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListProjectsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_project_service_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_project_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_project_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_project_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_project_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_project_service_proto = out.File + file_nebius_iam_v1_project_service_proto_rawDesc = nil + file_nebius_iam_v1_project_service_proto_goTypes = nil + file_nebius_iam_v1_project_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/project_service.sensitive.pb.go b/proto/nebius/iam/v1/project_service.sensitive.pb.go new file mode 100644 index 0000000..261d8a6 --- /dev/null +++ b/proto/nebius/iam/v1/project_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetProjectRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetProjectRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetProjectByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetProjectByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListProjectsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListProjectsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListProjectsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListProjectsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/project_service_grpc.pb.go b/proto/nebius/iam/v1/project_service_grpc.pb.go new file mode 100644 index 0000000..5aaae45 --- /dev/null +++ b/proto/nebius/iam/v1/project_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/project_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ProjectService_Get_FullMethodName = "/nebius.iam.v1.ProjectService/Get" + ProjectService_GetByName_FullMethodName = "/nebius.iam.v1.ProjectService/GetByName" + ProjectService_List_FullMethodName = "/nebius.iam.v1.ProjectService/List" +) + +// ProjectServiceClient is the client API for ProjectService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ProjectServiceClient interface { + Get(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*Container, error) + GetByName(ctx context.Context, in *GetProjectByNameRequest, opts ...grpc.CallOption) (*Container, error) + List(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) +} + +type projectServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProjectServiceClient(cc grpc.ClientConnInterface) ProjectServiceClient { + return &projectServiceClient{cc} +} + +func (c *projectServiceClient) Get(ctx context.Context, in *GetProjectRequest, opts ...grpc.CallOption) (*Container, error) { + out := new(Container) + err := c.cc.Invoke(ctx, ProjectService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) GetByName(ctx context.Context, in *GetProjectByNameRequest, opts ...grpc.CallOption) (*Container, error) { + out := new(Container) + err := c.cc.Invoke(ctx, ProjectService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *projectServiceClient) List(ctx context.Context, in *ListProjectsRequest, opts ...grpc.CallOption) (*ListProjectsResponse, error) { + out := new(ListProjectsResponse) + err := c.cc.Invoke(ctx, ProjectService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProjectServiceServer is the server API for ProjectService service. +// All implementations should embed UnimplementedProjectServiceServer +// for forward compatibility +type ProjectServiceServer interface { + Get(context.Context, *GetProjectRequest) (*Container, error) + GetByName(context.Context, *GetProjectByNameRequest) (*Container, error) + List(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error) +} + +// UnimplementedProjectServiceServer should be embedded to have forward compatible implementations. +type UnimplementedProjectServiceServer struct { +} + +func (UnimplementedProjectServiceServer) Get(context.Context, *GetProjectRequest) (*Container, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedProjectServiceServer) GetByName(context.Context, *GetProjectByNameRequest) (*Container, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedProjectServiceServer) List(context.Context, *ListProjectsRequest) (*ListProjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeProjectServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProjectServiceServer will +// result in compilation errors. +type UnsafeProjectServiceServer interface { + mustEmbedUnimplementedProjectServiceServer() +} + +func RegisterProjectServiceServer(s grpc.ServiceRegistrar, srv ProjectServiceServer) { + s.RegisterService(&ProjectService_ServiceDesc, srv) +} + +func _ProjectService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).Get(ctx, req.(*GetProjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProjectByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).GetByName(ctx, req.(*GetProjectByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProjectService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListProjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProjectService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).List(ctx, req.(*ListProjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProjectService_ServiceDesc is the grpc.ServiceDesc for ProjectService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProjectService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.ProjectService", + HandlerType: (*ProjectServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ProjectService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ProjectService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ProjectService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/project_service.proto", +} diff --git a/proto/nebius/iam/v1/service_account.pb.go b/proto/nebius/iam/v1/service_account.pb.go new file mode 100644 index 0000000..15011e8 --- /dev/null +++ b/proto/nebius/iam/v1/service_account.pb.go @@ -0,0 +1,315 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/service_account.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ServiceAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ServiceAccountSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ServiceAccountStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ServiceAccount) Reset() { + *x = ServiceAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccount) ProtoMessage() {} + +func (x *ServiceAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead. +func (*ServiceAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_proto_rawDescGZIP(), []int{0} +} + +func (x *ServiceAccount) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ServiceAccount) GetSpec() *ServiceAccountSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *ServiceAccount) GetStatus() *ServiceAccountStatus { + if x != nil { + return x.Status + } + return nil +} + +type ServiceAccountSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *ServiceAccountSpec) Reset() { + *x = ServiceAccountSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccountSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccountSpec) ProtoMessage() {} + +func (x *ServiceAccountSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccountSpec.ProtoReflect.Descriptor instead. +func (*ServiceAccountSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_proto_rawDescGZIP(), []int{1} +} + +func (x *ServiceAccountSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type ServiceAccountStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` +} + +func (x *ServiceAccountStatus) Reset() { + *x = ServiceAccountStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccountStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccountStatus) ProtoMessage() {} + +func (x *ServiceAccountStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccountStatus.ProtoReflect.Descriptor instead. +func (*ServiceAccountStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_proto_rawDescGZIP(), []int{2} +} + +func (x *ServiceAccountStatus) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +var File_nebius_iam_v1_service_account_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_service_account_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, + 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x36, 0x0a, 0x12, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x42, 0x5a, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_service_account_proto_rawDescOnce sync.Once + file_nebius_iam_v1_service_account_proto_rawDescData = file_nebius_iam_v1_service_account_proto_rawDesc +) + +func file_nebius_iam_v1_service_account_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_service_account_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_service_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_service_account_proto_rawDescData) + }) + return file_nebius_iam_v1_service_account_proto_rawDescData +} + +var file_nebius_iam_v1_service_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_service_account_proto_goTypes = []any{ + (*ServiceAccount)(nil), // 0: nebius.iam.v1.ServiceAccount + (*ServiceAccountSpec)(nil), // 1: nebius.iam.v1.ServiceAccountSpec + (*ServiceAccountStatus)(nil), // 2: nebius.iam.v1.ServiceAccountStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata +} +var file_nebius_iam_v1_service_account_proto_depIdxs = []int32{ + 3, // 0: nebius.iam.v1.ServiceAccount.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.iam.v1.ServiceAccount.spec:type_name -> nebius.iam.v1.ServiceAccountSpec + 2, // 2: nebius.iam.v1.ServiceAccount.status:type_name -> nebius.iam.v1.ServiceAccountStatus + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_service_account_proto_init() } +func file_nebius_iam_v1_service_account_proto_init() { + if File_nebius_iam_v1_service_account_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_service_account_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ServiceAccountSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ServiceAccountStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_service_account_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_service_account_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_service_account_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_service_account_proto_msgTypes, + }.Build() + File_nebius_iam_v1_service_account_proto = out.File + file_nebius_iam_v1_service_account_proto_rawDesc = nil + file_nebius_iam_v1_service_account_proto_goTypes = nil + file_nebius_iam_v1_service_account_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/service_account.sensitive.pb.go b/proto/nebius/iam/v1/service_account.sensitive.pb.go new file mode 100644 index 0000000..fd90767 --- /dev/null +++ b/proto/nebius/iam/v1/service_account.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *ServiceAccount) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceAccount) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ServiceAccountSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceAccountSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ServiceAccountStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ServiceAccountStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/service_account_service.pb.go b/proto/nebius/iam/v1/service_account_service.pb.go new file mode 100644 index 0000000..54890ea --- /dev/null +++ b/proto/nebius/iam/v1/service_account_service.pb.go @@ -0,0 +1,689 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/service_account_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateServiceAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ServiceAccountSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateServiceAccountRequest) Reset() { + *x = CreateServiceAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateServiceAccountRequest) ProtoMessage() {} + +func (x *CreateServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateServiceAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateServiceAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateServiceAccountRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateServiceAccountRequest) GetSpec() *ServiceAccountSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetServiceAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetServiceAccountRequest) Reset() { + *x = GetServiceAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServiceAccountRequest) ProtoMessage() {} + +func (x *GetServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetServiceAccountRequest.ProtoReflect.Descriptor instead. +func (*GetServiceAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetServiceAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetServiceAccountByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetServiceAccountByNameRequest) Reset() { + *x = GetServiceAccountByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServiceAccountByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServiceAccountByNameRequest) ProtoMessage() {} + +func (x *GetServiceAccountByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetServiceAccountByNameRequest.ProtoReflect.Descriptor instead. +func (*GetServiceAccountByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetServiceAccountByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetServiceAccountByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListServiceAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the container ID. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListServiceAccountRequest) Reset() { + *x = ListServiceAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServiceAccountRequest) ProtoMessage() {} + +func (x *ListServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListServiceAccountRequest.ProtoReflect.Descriptor instead. +func (*ListServiceAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListServiceAccountRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListServiceAccountRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListServiceAccountRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListServiceAccountRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type UpdateServiceAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ServiceAccountSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateServiceAccountRequest) Reset() { + *x = UpdateServiceAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServiceAccountRequest) ProtoMessage() {} + +func (x *UpdateServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServiceAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateServiceAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateServiceAccountRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateServiceAccountRequest) GetSpec() *ServiceAccountSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteServiceAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteServiceAccountRequest) Reset() { + *x = DeleteServiceAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteServiceAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteServiceAccountRequest) ProtoMessage() {} + +func (x *DeleteServiceAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteServiceAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteServiceAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteServiceAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListServiceAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of service accounts returned in the response. The field should be named as `items` for consistency. + Items []*ServiceAccount `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListServiceAccountResponse) Reset() { + *x = ListServiceAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServiceAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServiceAccountResponse) ProtoMessage() {} + +func (x *ListServiceAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_service_account_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListServiceAccountResponse.ProtoReflect.Descriptor instead. +func (*ListServiceAccountResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_service_account_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListServiceAccountResponse) GetItems() []*ServiceAccount { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListServiceAccountResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_service_account_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_service_account_service_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x1b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x61, + 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x2d, 0x0a, 0x1b, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x79, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa3, 0x04, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, + 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4d, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, + 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x61, 0x0a, 0x14, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x42, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_service_account_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_service_account_service_proto_rawDescData = file_nebius_iam_v1_service_account_service_proto_rawDesc +) + +func file_nebius_iam_v1_service_account_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_service_account_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_service_account_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_service_account_service_proto_rawDescData) + }) + return file_nebius_iam_v1_service_account_service_proto_rawDescData +} + +var file_nebius_iam_v1_service_account_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_iam_v1_service_account_service_proto_goTypes = []any{ + (*CreateServiceAccountRequest)(nil), // 0: nebius.iam.v1.CreateServiceAccountRequest + (*GetServiceAccountRequest)(nil), // 1: nebius.iam.v1.GetServiceAccountRequest + (*GetServiceAccountByNameRequest)(nil), // 2: nebius.iam.v1.GetServiceAccountByNameRequest + (*ListServiceAccountRequest)(nil), // 3: nebius.iam.v1.ListServiceAccountRequest + (*UpdateServiceAccountRequest)(nil), // 4: nebius.iam.v1.UpdateServiceAccountRequest + (*DeleteServiceAccountRequest)(nil), // 5: nebius.iam.v1.DeleteServiceAccountRequest + (*ListServiceAccountResponse)(nil), // 6: nebius.iam.v1.ListServiceAccountResponse + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*ServiceAccountSpec)(nil), // 8: nebius.iam.v1.ServiceAccountSpec + (*ServiceAccount)(nil), // 9: nebius.iam.v1.ServiceAccount + (*v1.Operation)(nil), // 10: nebius.common.v1.Operation +} +var file_nebius_iam_v1_service_account_service_proto_depIdxs = []int32{ + 7, // 0: nebius.iam.v1.CreateServiceAccountRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 1: nebius.iam.v1.CreateServiceAccountRequest.spec:type_name -> nebius.iam.v1.ServiceAccountSpec + 7, // 2: nebius.iam.v1.UpdateServiceAccountRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 3: nebius.iam.v1.UpdateServiceAccountRequest.spec:type_name -> nebius.iam.v1.ServiceAccountSpec + 9, // 4: nebius.iam.v1.ListServiceAccountResponse.items:type_name -> nebius.iam.v1.ServiceAccount + 0, // 5: nebius.iam.v1.ServiceAccountService.Create:input_type -> nebius.iam.v1.CreateServiceAccountRequest + 1, // 6: nebius.iam.v1.ServiceAccountService.Get:input_type -> nebius.iam.v1.GetServiceAccountRequest + 2, // 7: nebius.iam.v1.ServiceAccountService.GetByName:input_type -> nebius.iam.v1.GetServiceAccountByNameRequest + 3, // 8: nebius.iam.v1.ServiceAccountService.List:input_type -> nebius.iam.v1.ListServiceAccountRequest + 4, // 9: nebius.iam.v1.ServiceAccountService.Update:input_type -> nebius.iam.v1.UpdateServiceAccountRequest + 5, // 10: nebius.iam.v1.ServiceAccountService.Delete:input_type -> nebius.iam.v1.DeleteServiceAccountRequest + 10, // 11: nebius.iam.v1.ServiceAccountService.Create:output_type -> nebius.common.v1.Operation + 9, // 12: nebius.iam.v1.ServiceAccountService.Get:output_type -> nebius.iam.v1.ServiceAccount + 9, // 13: nebius.iam.v1.ServiceAccountService.GetByName:output_type -> nebius.iam.v1.ServiceAccount + 6, // 14: nebius.iam.v1.ServiceAccountService.List:output_type -> nebius.iam.v1.ListServiceAccountResponse + 10, // 15: nebius.iam.v1.ServiceAccountService.Update:output_type -> nebius.common.v1.Operation + 10, // 16: nebius.iam.v1.ServiceAccountService.Delete:output_type -> nebius.common.v1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_service_account_service_proto_init() } +func file_nebius_iam_v1_service_account_service_proto_init() { + if File_nebius_iam_v1_service_account_service_proto != nil { + return + } + file_nebius_iam_v1_service_account_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_service_account_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetServiceAccountByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListServiceAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_service_account_service_proto_msgTypes[3].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_service_account_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_service_account_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_service_account_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_service_account_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_service_account_service_proto = out.File + file_nebius_iam_v1_service_account_service_proto_rawDesc = nil + file_nebius_iam_v1_service_account_service_proto_goTypes = nil + file_nebius_iam_v1_service_account_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/service_account_service.sensitive.pb.go b/proto/nebius/iam/v1/service_account_service.sensitive.pb.go new file mode 100644 index 0000000..64c9919 --- /dev/null +++ b/proto/nebius/iam/v1/service_account_service.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateServiceAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateServiceAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetServiceAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetServiceAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetServiceAccountByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetServiceAccountByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListServiceAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListServiceAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateServiceAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateServiceAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteServiceAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteServiceAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListServiceAccountResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListServiceAccountResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/service_account_service_grpc.pb.go b/proto/nebius/iam/v1/service_account_service_grpc.pb.go new file mode 100644 index 0000000..f682db5 --- /dev/null +++ b/proto/nebius/iam/v1/service_account_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/service_account_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ServiceAccountService_Create_FullMethodName = "/nebius.iam.v1.ServiceAccountService/Create" + ServiceAccountService_Get_FullMethodName = "/nebius.iam.v1.ServiceAccountService/Get" + ServiceAccountService_GetByName_FullMethodName = "/nebius.iam.v1.ServiceAccountService/GetByName" + ServiceAccountService_List_FullMethodName = "/nebius.iam.v1.ServiceAccountService/List" + ServiceAccountService_Update_FullMethodName = "/nebius.iam.v1.ServiceAccountService/Update" + ServiceAccountService_Delete_FullMethodName = "/nebius.iam.v1.ServiceAccountService/Delete" +) + +// ServiceAccountServiceClient is the client API for ServiceAccountService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServiceAccountServiceClient interface { + Create(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Get(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) + GetByName(ctx context.Context, in *GetServiceAccountByNameRequest, opts ...grpc.CallOption) (*ServiceAccount, error) + List(ctx context.Context, in *ListServiceAccountRequest, opts ...grpc.CallOption) (*ListServiceAccountResponse, error) + Update(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type serviceAccountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewServiceAccountServiceClient(cc grpc.ClientConnInterface) ServiceAccountServiceClient { + return &serviceAccountServiceClient{cc} +} + +func (c *serviceAccountServiceClient) Create(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ServiceAccountService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountServiceClient) Get(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) { + out := new(ServiceAccount) + err := c.cc.Invoke(ctx, ServiceAccountService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountServiceClient) GetByName(ctx context.Context, in *GetServiceAccountByNameRequest, opts ...grpc.CallOption) (*ServiceAccount, error) { + out := new(ServiceAccount) + err := c.cc.Invoke(ctx, ServiceAccountService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountServiceClient) List(ctx context.Context, in *ListServiceAccountRequest, opts ...grpc.CallOption) (*ListServiceAccountResponse, error) { + out := new(ListServiceAccountResponse) + err := c.cc.Invoke(ctx, ServiceAccountService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountServiceClient) Update(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ServiceAccountService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceAccountServiceClient) Delete(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ServiceAccountService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceAccountServiceServer is the server API for ServiceAccountService service. +// All implementations should embed UnimplementedServiceAccountServiceServer +// for forward compatibility +type ServiceAccountServiceServer interface { + Create(context.Context, *CreateServiceAccountRequest) (*v1.Operation, error) + Get(context.Context, *GetServiceAccountRequest) (*ServiceAccount, error) + GetByName(context.Context, *GetServiceAccountByNameRequest) (*ServiceAccount, error) + List(context.Context, *ListServiceAccountRequest) (*ListServiceAccountResponse, error) + Update(context.Context, *UpdateServiceAccountRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteServiceAccountRequest) (*v1.Operation, error) +} + +// UnimplementedServiceAccountServiceServer should be embedded to have forward compatible implementations. +type UnimplementedServiceAccountServiceServer struct { +} + +func (UnimplementedServiceAccountServiceServer) Create(context.Context, *CreateServiceAccountRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedServiceAccountServiceServer) Get(context.Context, *GetServiceAccountRequest) (*ServiceAccount, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedServiceAccountServiceServer) GetByName(context.Context, *GetServiceAccountByNameRequest) (*ServiceAccount, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedServiceAccountServiceServer) List(context.Context, *ListServiceAccountRequest) (*ListServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedServiceAccountServiceServer) Update(context.Context, *UpdateServiceAccountRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedServiceAccountServiceServer) Delete(context.Context, *DeleteServiceAccountRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeServiceAccountServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceAccountServiceServer will +// result in compilation errors. +type UnsafeServiceAccountServiceServer interface { + mustEmbedUnimplementedServiceAccountServiceServer() +} + +func RegisterServiceAccountServiceServer(s grpc.ServiceRegistrar, srv ServiceAccountServiceServer) { + s.RegisterService(&ServiceAccountService_ServiceDesc, srv) +} + +func _ServiceAccountService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).Create(ctx, req.(*CreateServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccountService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).Get(ctx, req.(*GetServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccountService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServiceAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).GetByName(ctx, req.(*GetServiceAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccountService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).List(ctx, req.(*ListServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccountService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).Update(ctx, req.(*UpdateServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceAccountService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceAccountServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceAccountService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceAccountServiceServer).Delete(ctx, req.(*DeleteServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ServiceAccountService_ServiceDesc is the grpc.ServiceDesc for ServiceAccountService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ServiceAccountService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.ServiceAccountService", + HandlerType: (*ServiceAccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _ServiceAccountService_Create_Handler, + }, + { + MethodName: "Get", + Handler: _ServiceAccountService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ServiceAccountService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ServiceAccountService_List_Handler, + }, + { + MethodName: "Update", + Handler: _ServiceAccountService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _ServiceAccountService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/service_account_service.proto", +} diff --git a/proto/nebius/iam/v1/session_management_service.pb.go b/proto/nebius/iam/v1/session_management_service.pb.go new file mode 100644 index 0000000..d4e8a82 --- /dev/null +++ b/proto/nebius/iam/v1/session_management_service.pb.go @@ -0,0 +1,276 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/session_management_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RevokeSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Revoke: + // + // *RevokeSessionRequest_ServiceAccountId + // *RevokeSessionRequest_AllMyActive + // *RevokeSessionRequest_TenantUserAccountId + Revoke isRevokeSessionRequest_Revoke `protobuf_oneof:"revoke"` +} + +func (x *RevokeSessionRequest) Reset() { + *x = RevokeSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_session_management_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeSessionRequest) ProtoMessage() {} + +func (x *RevokeSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_session_management_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeSessionRequest.ProtoReflect.Descriptor instead. +func (*RevokeSessionRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_session_management_service_proto_rawDescGZIP(), []int{0} +} + +func (m *RevokeSessionRequest) GetRevoke() isRevokeSessionRequest_Revoke { + if m != nil { + return m.Revoke + } + return nil +} + +func (x *RevokeSessionRequest) GetServiceAccountId() string { + if x, ok := x.GetRevoke().(*RevokeSessionRequest_ServiceAccountId); ok { + return x.ServiceAccountId + } + return "" +} + +func (x *RevokeSessionRequest) GetAllMyActive() bool { + if x, ok := x.GetRevoke().(*RevokeSessionRequest_AllMyActive); ok { + return x.AllMyActive + } + return false +} + +func (x *RevokeSessionRequest) GetTenantUserAccountId() string { + if x, ok := x.GetRevoke().(*RevokeSessionRequest_TenantUserAccountId); ok { + return x.TenantUserAccountId + } + return "" +} + +type isRevokeSessionRequest_Revoke interface { + isRevokeSessionRequest_Revoke() +} + +type RevokeSessionRequest_ServiceAccountId struct { + ServiceAccountId string `protobuf:"bytes,3,opt,name=service_account_id,json=serviceAccountId,proto3,oneof"` // revoke all for specific service account - to revoke logout from all sessions for user +} + +type RevokeSessionRequest_AllMyActive struct { + AllMyActive bool `protobuf:"varint,6,opt,name=all_my_active,json=allMyActive,proto3,oneof"` // revoke all active session of current user +} + +type RevokeSessionRequest_TenantUserAccountId struct { + TenantUserAccountId string `protobuf:"bytes,7,opt,name=tenant_user_account_id,json=tenantUserAccountId,proto3,oneof"` // revoke all for specific tenant user - to revoke logout from all sessions for user +} + +func (*RevokeSessionRequest_ServiceAccountId) isRevokeSessionRequest_Revoke() {} + +func (*RevokeSessionRequest_AllMyActive) isRevokeSessionRequest_Revoke() {} + +func (*RevokeSessionRequest_TenantUserAccountId) isRevokeSessionRequest_Revoke() {} + +type RevokeSessionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RevokeSessionResponse) Reset() { + *x = RevokeSessionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_session_management_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeSessionResponse) ProtoMessage() {} + +func (x *RevokeSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_session_management_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeSessionResponse.ProtoReflect.Descriptor instead. +func (*RevokeSessionResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_session_management_service_proto_rawDescGZIP(), []int{1} +} + +var File_nebius_iam_v1_session_management_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_session_management_service_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x01, 0x0a, 0x14, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x79, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x6c, + 0x4d, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x7b, 0x0a, 0x18, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, + 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, + 0x64, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x1d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_session_management_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_session_management_service_proto_rawDescData = file_nebius_iam_v1_session_management_service_proto_rawDesc +) + +func file_nebius_iam_v1_session_management_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_session_management_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_session_management_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_session_management_service_proto_rawDescData) + }) + return file_nebius_iam_v1_session_management_service_proto_rawDescData +} + +var file_nebius_iam_v1_session_management_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_iam_v1_session_management_service_proto_goTypes = []any{ + (*RevokeSessionRequest)(nil), // 0: nebius.iam.v1.RevokeSessionRequest + (*RevokeSessionResponse)(nil), // 1: nebius.iam.v1.RevokeSessionResponse +} +var file_nebius_iam_v1_session_management_service_proto_depIdxs = []int32{ + 0, // 0: nebius.iam.v1.SessionManagementService.Revoke:input_type -> nebius.iam.v1.RevokeSessionRequest + 1, // 1: nebius.iam.v1.SessionManagementService.Revoke:output_type -> nebius.iam.v1.RevokeSessionResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_session_management_service_proto_init() } +func file_nebius_iam_v1_session_management_service_proto_init() { + if File_nebius_iam_v1_session_management_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_session_management_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RevokeSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_session_management_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RevokeSessionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_session_management_service_proto_msgTypes[0].OneofWrappers = []any{ + (*RevokeSessionRequest_ServiceAccountId)(nil), + (*RevokeSessionRequest_AllMyActive)(nil), + (*RevokeSessionRequest_TenantUserAccountId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_session_management_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_session_management_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_session_management_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_session_management_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_session_management_service_proto = out.File + file_nebius_iam_v1_session_management_service_proto_rawDesc = nil + file_nebius_iam_v1_session_management_service_proto_goTypes = nil + file_nebius_iam_v1_session_management_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/session_management_service.sensitive.pb.go b/proto/nebius/iam/v1/session_management_service.sensitive.pb.go new file mode 100644 index 0000000..015abd3 --- /dev/null +++ b/proto/nebius/iam/v1/session_management_service.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *RevokeSessionRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *RevokeSessionRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *RevokeSessionResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *RevokeSessionResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/session_management_service_grpc.pb.go b/proto/nebius/iam/v1/session_management_service_grpc.pb.go new file mode 100644 index 0000000..027c211 --- /dev/null +++ b/proto/nebius/iam/v1/session_management_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/session_management_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SessionManagementService_Revoke_FullMethodName = "/nebius.iam.v1.SessionManagementService/Revoke" +) + +// SessionManagementServiceClient is the client API for SessionManagementService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SessionManagementServiceClient interface { + Revoke(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error) +} + +type sessionManagementServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSessionManagementServiceClient(cc grpc.ClientConnInterface) SessionManagementServiceClient { + return &sessionManagementServiceClient{cc} +} + +func (c *sessionManagementServiceClient) Revoke(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error) { + out := new(RevokeSessionResponse) + err := c.cc.Invoke(ctx, SessionManagementService_Revoke_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SessionManagementServiceServer is the server API for SessionManagementService service. +// All implementations should embed UnimplementedSessionManagementServiceServer +// for forward compatibility +type SessionManagementServiceServer interface { + Revoke(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error) +} + +// UnimplementedSessionManagementServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSessionManagementServiceServer struct { +} + +func (UnimplementedSessionManagementServiceServer) Revoke(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") +} + +// UnsafeSessionManagementServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SessionManagementServiceServer will +// result in compilation errors. +type UnsafeSessionManagementServiceServer interface { + mustEmbedUnimplementedSessionManagementServiceServer() +} + +func RegisterSessionManagementServiceServer(s grpc.ServiceRegistrar, srv SessionManagementServiceServer) { + s.RegisterService(&SessionManagementService_ServiceDesc, srv) +} + +func _SessionManagementService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionManagementServiceServer).Revoke(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionManagementService_Revoke_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionManagementServiceServer).Revoke(ctx, req.(*RevokeSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SessionManagementService_ServiceDesc is the grpc.ServiceDesc for SessionManagementService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SessionManagementService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.SessionManagementService", + HandlerType: (*SessionManagementServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Revoke", + Handler: _SessionManagementService_Revoke_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/session_management_service.proto", +} diff --git a/proto/nebius/iam/v1/state.pb.go b/proto/nebius/iam/v1/state.pb.go new file mode 100644 index 0000000..290732f --- /dev/null +++ b/proto/nebius/iam/v1/state.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/state.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type State int32 + +const ( + State_STATE_UNSPECIFIED State = 0 + State_ACTIVE State = 1 + State_SCHEDULING_FOR_DELETION State = 2 + State_SCHEDULED_FOR_DELETION State = 3 + State_SCHEDULING_FOR_DELETION_BY_PARENT State = 4 + State_SCHEDULED_FOR_DELETION_BY_PARENT State = 5 + State_UNDELETING State = 6 + State_PURGING State = 7 + State_PURGED State = 8 + // DRAFT = 1000; + State_CREATING State = 1001 +) + +// Enum value maps for State. +var ( + State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ACTIVE", + 2: "SCHEDULING_FOR_DELETION", + 3: "SCHEDULED_FOR_DELETION", + 4: "SCHEDULING_FOR_DELETION_BY_PARENT", + 5: "SCHEDULED_FOR_DELETION_BY_PARENT", + 6: "UNDELETING", + 7: "PURGING", + 8: "PURGED", + 1001: "CREATING", + } + State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "SCHEDULING_FOR_DELETION": 2, + "SCHEDULED_FOR_DELETION": 3, + "SCHEDULING_FOR_DELETION_BY_PARENT": 4, + "SCHEDULED_FOR_DELETION_BY_PARENT": 5, + "UNDELETING": 6, + "PURGING": 7, + "PURGED": 8, + "CREATING": 1001, + } +) + +func (x State) Enum() *State { + p := new(State) + *p = x + return p +} + +func (x State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_state_proto_enumTypes[0].Descriptor() +} + +func (State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_state_proto_enumTypes[0] +} + +func (x State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use State.Descriptor instead. +func (State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_state_proto_rawDescGZIP(), []int{0} +} + +var File_nebius_iam_v1_state_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_state_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2a, 0xe8, 0x01, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x43, 0x48, 0x45, 0x44, + 0x55, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, + 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, + 0x12, 0x25, 0x0a, 0x21, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x46, + 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x59, 0x5f, 0x50, + 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x43, 0x48, 0x45, 0x44, + 0x55, 0x4c, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x42, 0x59, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x4e, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x0b, 0x0a, + 0x07, 0x50, 0x55, 0x52, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, + 0x52, 0x47, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0xe9, 0x07, 0x42, 0x51, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, + 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_state_proto_rawDescOnce sync.Once + file_nebius_iam_v1_state_proto_rawDescData = file_nebius_iam_v1_state_proto_rawDesc +) + +func file_nebius_iam_v1_state_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_state_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_state_proto_rawDescData) + }) + return file_nebius_iam_v1_state_proto_rawDescData +} + +var file_nebius_iam_v1_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_state_proto_goTypes = []any{ + (State)(0), // 0: nebius.iam.v1.State +} +var file_nebius_iam_v1_state_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_state_proto_init() } +func file_nebius_iam_v1_state_proto_init() { + if File_nebius_iam_v1_state_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_state_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_state_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_state_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_state_proto_enumTypes, + }.Build() + File_nebius_iam_v1_state_proto = out.File + file_nebius_iam_v1_state_proto_rawDesc = nil + file_nebius_iam_v1_state_proto_goTypes = nil + file_nebius_iam_v1_state_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/state.sensitive.pb.go b/proto/nebius/iam/v1/state.sensitive.pb.go new file mode 100644 index 0000000..79ffd73 --- /dev/null +++ b/proto/nebius/iam/v1/state.sensitive.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 diff --git a/proto/nebius/iam/v1/suspension_state.pb.go b/proto/nebius/iam/v1/suspension_state.pb.go new file mode 100644 index 0000000..a7c8963 --- /dev/null +++ b/proto/nebius/iam/v1/suspension_state.pb.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/suspension_state.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SuspensionState int32 + +const ( + SuspensionState_SUSPENSION_STATE_UNSPECIFIED SuspensionState = 0 + SuspensionState_NONE SuspensionState = 1 + SuspensionState_SUSPENDING SuspensionState = 2 + SuspensionState_SUSPENDED SuspensionState = 3 + SuspensionState_RESUMING SuspensionState = 4 +) + +// Enum value maps for SuspensionState. +var ( + SuspensionState_name = map[int32]string{ + 0: "SUSPENSION_STATE_UNSPECIFIED", + 1: "NONE", + 2: "SUSPENDING", + 3: "SUSPENDED", + 4: "RESUMING", + } + SuspensionState_value = map[string]int32{ + "SUSPENSION_STATE_UNSPECIFIED": 0, + "NONE": 1, + "SUSPENDING": 2, + "SUSPENDED": 3, + "RESUMING": 4, + } +) + +func (x SuspensionState) Enum() *SuspensionState { + p := new(SuspensionState) + *p = x + return p +} + +func (x SuspensionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SuspensionState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_suspension_state_proto_enumTypes[0].Descriptor() +} + +func (SuspensionState) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_suspension_state_proto_enumTypes[0] +} + +func (x SuspensionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SuspensionState.Descriptor instead. +func (SuspensionState) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_suspension_state_proto_rawDescGZIP(), []int{0} +} + +var File_nebius_iam_v1_suspension_state_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_suspension_state_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2a, 0x6a, 0x0a, 0x0f, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x55, 0x53, 0x50, + 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, + 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x49, 0x4e, 0x47, 0x10, + 0x04, 0x42, 0x5b, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x53, 0x75, 0x73, 0x70, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_suspension_state_proto_rawDescOnce sync.Once + file_nebius_iam_v1_suspension_state_proto_rawDescData = file_nebius_iam_v1_suspension_state_proto_rawDesc +) + +func file_nebius_iam_v1_suspension_state_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_suspension_state_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_suspension_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_suspension_state_proto_rawDescData) + }) + return file_nebius_iam_v1_suspension_state_proto_rawDescData +} + +var file_nebius_iam_v1_suspension_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_suspension_state_proto_goTypes = []any{ + (SuspensionState)(0), // 0: nebius.iam.v1.SuspensionState +} +var file_nebius_iam_v1_suspension_state_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_suspension_state_proto_init() } +func file_nebius_iam_v1_suspension_state_proto_init() { + if File_nebius_iam_v1_suspension_state_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_suspension_state_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_suspension_state_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_suspension_state_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_suspension_state_proto_enumTypes, + }.Build() + File_nebius_iam_v1_suspension_state_proto = out.File + file_nebius_iam_v1_suspension_state_proto_rawDesc = nil + file_nebius_iam_v1_suspension_state_proto_goTypes = nil + file_nebius_iam_v1_suspension_state_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/suspension_state.sensitive.pb.go b/proto/nebius/iam/v1/suspension_state.sensitive.pb.go new file mode 100644 index 0000000..79ffd73 --- /dev/null +++ b/proto/nebius/iam/v1/suspension_state.sensitive.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 diff --git a/proto/nebius/iam/v1/tenant_service.pb.go b/proto/nebius/iam/v1/tenant_service.pb.go new file mode 100644 index 0000000..2c94a4d --- /dev/null +++ b/proto/nebius/iam/v1/tenant_service.pb.go @@ -0,0 +1,335 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/tenant_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetTenantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetTenantRequest) Reset() { + *x = GetTenantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTenantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTenantRequest) ProtoMessage() {} + +func (x *GetTenantRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTenantRequest.ProtoReflect.Descriptor instead. +func (*GetTenantRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTenantRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListTenantsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListTenantsRequest) Reset() { + *x = ListTenantsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantsRequest) ProtoMessage() {} + +func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantsRequest.ProtoReflect.Descriptor instead. +func (*ListTenantsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTenantsRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListTenantsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListTenantsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListTenantsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Container `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTenantsResponse) Reset() { + *x = ListTenantsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantsResponse) ProtoMessage() {} + +func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantsResponse.ProtoReflect.Descriptor instead. +func (*ListTenantsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTenantsResponse) GetItems() []*Container { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListTenantsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_tenant_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_tenant_service_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x7b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x6d, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xac, 0x01, 0x0a, + 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x40, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x12, 0x4d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x59, 0x0a, 0x14, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x42, 0x12, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_tenant_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_tenant_service_proto_rawDescData = file_nebius_iam_v1_tenant_service_proto_rawDesc +) + +func file_nebius_iam_v1_tenant_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_tenant_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_tenant_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_tenant_service_proto_rawDescData) + }) + return file_nebius_iam_v1_tenant_service_proto_rawDescData +} + +var file_nebius_iam_v1_tenant_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_tenant_service_proto_goTypes = []any{ + (*GetTenantRequest)(nil), // 0: nebius.iam.v1.GetTenantRequest + (*ListTenantsRequest)(nil), // 1: nebius.iam.v1.ListTenantsRequest + (*ListTenantsResponse)(nil), // 2: nebius.iam.v1.ListTenantsResponse + (*Container)(nil), // 3: nebius.iam.v1.Container +} +var file_nebius_iam_v1_tenant_service_proto_depIdxs = []int32{ + 3, // 0: nebius.iam.v1.ListTenantsResponse.items:type_name -> nebius.iam.v1.Container + 0, // 1: nebius.iam.v1.TenantService.Get:input_type -> nebius.iam.v1.GetTenantRequest + 1, // 2: nebius.iam.v1.TenantService.List:input_type -> nebius.iam.v1.ListTenantsRequest + 3, // 3: nebius.iam.v1.TenantService.Get:output_type -> nebius.iam.v1.Container + 2, // 4: nebius.iam.v1.TenantService.List:output_type -> nebius.iam.v1.ListTenantsResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_tenant_service_proto_init() } +func file_nebius_iam_v1_tenant_service_proto_init() { + if File_nebius_iam_v1_tenant_service_proto != nil { + return + } + file_nebius_iam_v1_container_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_tenant_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetTenantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_tenant_service_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_tenant_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_tenant_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_tenant_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_tenant_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_tenant_service_proto = out.File + file_nebius_iam_v1_tenant_service_proto_rawDesc = nil + file_nebius_iam_v1_tenant_service_proto_goTypes = nil + file_nebius_iam_v1_tenant_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/tenant_service.sensitive.pb.go b/proto/nebius/iam/v1/tenant_service.sensitive.pb.go new file mode 100644 index 0000000..67db0bd --- /dev/null +++ b/proto/nebius/iam/v1/tenant_service.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetTenantRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetTenantRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListTenantsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListTenantsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListTenantsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListTenantsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/tenant_service_grpc.pb.go b/proto/nebius/iam/v1/tenant_service_grpc.pb.go new file mode 100644 index 0000000..3c0dfe5 --- /dev/null +++ b/proto/nebius/iam/v1/tenant_service_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/tenant_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TenantService_Get_FullMethodName = "/nebius.iam.v1.TenantService/Get" + TenantService_List_FullMethodName = "/nebius.iam.v1.TenantService/List" +) + +// TenantServiceClient is the client API for TenantService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TenantServiceClient interface { + Get(ctx context.Context, in *GetTenantRequest, opts ...grpc.CallOption) (*Container, error) + List(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) +} + +type tenantServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTenantServiceClient(cc grpc.ClientConnInterface) TenantServiceClient { + return &tenantServiceClient{cc} +} + +func (c *tenantServiceClient) Get(ctx context.Context, in *GetTenantRequest, opts ...grpc.CallOption) (*Container, error) { + out := new(Container) + err := c.cc.Invoke(ctx, TenantService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tenantServiceClient) List(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) { + out := new(ListTenantsResponse) + err := c.cc.Invoke(ctx, TenantService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TenantServiceServer is the server API for TenantService service. +// All implementations should embed UnimplementedTenantServiceServer +// for forward compatibility +type TenantServiceServer interface { + Get(context.Context, *GetTenantRequest) (*Container, error) + List(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) +} + +// UnimplementedTenantServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTenantServiceServer struct { +} + +func (UnimplementedTenantServiceServer) Get(context.Context, *GetTenantRequest) (*Container, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedTenantServiceServer) List(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeTenantServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TenantServiceServer will +// result in compilation errors. +type UnsafeTenantServiceServer interface { + mustEmbedUnimplementedTenantServiceServer() +} + +func RegisterTenantServiceServer(s grpc.ServiceRegistrar, srv TenantServiceServer) { + s.RegisterService(&TenantService_ServiceDesc, srv) +} + +func _TenantService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTenantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantServiceServer).Get(ctx, req.(*GetTenantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TenantService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTenantsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantServiceServer).List(ctx, req.(*ListTenantsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TenantService_ServiceDesc is the grpc.ServiceDesc for TenantService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TenantService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.TenantService", + HandlerType: (*TenantServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _TenantService_Get_Handler, + }, + { + MethodName: "List", + Handler: _TenantService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/tenant_service.proto", +} diff --git a/proto/nebius/iam/v1/tenant_user_account.pb.go b/proto/nebius/iam/v1/tenant_user_account.pb.go new file mode 100644 index 0000000..cb56671 --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account.pb.go @@ -0,0 +1,870 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/tenant_user_account.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TenantUserAccountStatus_State int32 + +const ( + TenantUserAccountStatus_STATE_UNSPECIFIED TenantUserAccountStatus_State = 0 + TenantUserAccountStatus_ACTIVE TenantUserAccountStatus_State = 1 + TenantUserAccountStatus_INACTIVE TenantUserAccountStatus_State = 2 + TenantUserAccountStatus_BLOCKED TenantUserAccountStatus_State = 3 +) + +// Enum value maps for TenantUserAccountStatus_State. +var ( + TenantUserAccountStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ACTIVE", + 2: "INACTIVE", + 3: "BLOCKED", + } + TenantUserAccountStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "BLOCKED": 3, + } +) + +func (x TenantUserAccountStatus_State) Enum() *TenantUserAccountStatus_State { + p := new(TenantUserAccountStatus_State) + *p = x + return p +} + +func (x TenantUserAccountStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TenantUserAccountStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_iam_v1_tenant_user_account_proto_enumTypes[0].Descriptor() +} + +func (TenantUserAccountStatus_State) Type() protoreflect.EnumType { + return &file_nebius_iam_v1_tenant_user_account_proto_enumTypes[0] +} + +func (x TenantUserAccountStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TenantUserAccountStatus_State.Descriptor instead. +func (TenantUserAccountStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{5, 0} +} + +type TenantUserAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *TenantUserAccountSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *TenantUserAccountStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *TenantUserAccount) Reset() { + *x = TenantUserAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TenantUserAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUserAccount) ProtoMessage() {} + +func (x *TenantUserAccount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUserAccount.ProtoReflect.Descriptor instead. +func (*TenantUserAccount) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{0} +} + +func (x *TenantUserAccount) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *TenantUserAccount) GetSpec() *TenantUserAccountSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *TenantUserAccount) GetStatus() *TenantUserAccountStatus { + if x != nil { + return x.Status + } + return nil +} + +type TenantUserAccountWithAttributes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TenantUserAccount *TenantUserAccount `protobuf:"bytes,1,opt,name=tenant_user_account,json=tenantUserAccount,proto3" json:"tenant_user_account,omitempty"` + // Types that are assignable to AttributesOptional: + // + // *TenantUserAccountWithAttributes_Attributes + // *TenantUserAccountWithAttributes_Error + AttributesOptional isTenantUserAccountWithAttributes_AttributesOptional `protobuf_oneof:"attributesOptional"` +} + +func (x *TenantUserAccountWithAttributes) Reset() { + *x = TenantUserAccountWithAttributes{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TenantUserAccountWithAttributes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUserAccountWithAttributes) ProtoMessage() {} + +func (x *TenantUserAccountWithAttributes) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUserAccountWithAttributes.ProtoReflect.Descriptor instead. +func (*TenantUserAccountWithAttributes) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{1} +} + +func (x *TenantUserAccountWithAttributes) GetTenantUserAccount() *TenantUserAccount { + if x != nil { + return x.TenantUserAccount + } + return nil +} + +func (m *TenantUserAccountWithAttributes) GetAttributesOptional() isTenantUserAccountWithAttributes_AttributesOptional { + if m != nil { + return m.AttributesOptional + } + return nil +} + +func (x *TenantUserAccountWithAttributes) GetAttributes() *UserAttributes { + if x, ok := x.GetAttributesOptional().(*TenantUserAccountWithAttributes_Attributes); ok { + return x.Attributes + } + return nil +} + +func (x *TenantUserAccountWithAttributes) GetError() *Error { + if x, ok := x.GetAttributesOptional().(*TenantUserAccountWithAttributes_Error); ok { + return x.Error + } + return nil +} + +type isTenantUserAccountWithAttributes_AttributesOptional interface { + isTenantUserAccountWithAttributes_AttributesOptional() +} + +type TenantUserAccountWithAttributes_Attributes struct { + Attributes *UserAttributes `protobuf:"bytes,2,opt,name=attributes,proto3,oneof"` +} + +type TenantUserAccountWithAttributes_Error struct { + // in a case of issues of getting attributes from pds service, we can still return some data from cpl + Error *Error `protobuf:"bytes,3,opt,name=error,proto3,oneof"` +} + +func (*TenantUserAccountWithAttributes_Attributes) isTenantUserAccountWithAttributes_AttributesOptional() { +} + +func (*TenantUserAccountWithAttributes_Error) isTenantUserAccountWithAttributes_AttributesOptional() { +} + +type UserAttributes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sub *string `protobuf:"bytes,20,opt,name=sub,proto3,oneof" json:"sub,omitempty"` + Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` + GivenName *string `protobuf:"bytes,2,opt,name=given_name,json=givenName,proto3,oneof" json:"given_name,omitempty"` + FamilyName *string `protobuf:"bytes,3,opt,name=family_name,json=familyName,proto3,oneof" json:"family_name,omitempty"` + PreferredUsername *string `protobuf:"bytes,4,opt,name=preferred_username,json=preferredUsername,proto3,oneof" json:"preferred_username,omitempty"` + Picture *string `protobuf:"bytes,5,opt,name=picture,proto3,oneof" json:"picture,omitempty"` + Email *string `protobuf:"bytes,6,opt,name=email,proto3,oneof" json:"email,omitempty"` + // Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. + EmailVerified *bool `protobuf:"varint,7,opt,name=email_verified,json=emailVerified,proto3,oneof" json:"email_verified,omitempty"` + // Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. + Zoneinfo *string `protobuf:"bytes,8,opt,name=zoneinfo,proto3,oneof" json:"zoneinfo,omitempty"` + Locale *string `protobuf:"bytes,9,opt,name=locale,proto3,oneof" json:"locale,omitempty"` + PhoneNumber *string `protobuf:"bytes,10,opt,name=phone_number,json=phoneNumber,proto3,oneof" json:"phone_number,omitempty"` + // Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. + PhoneNumberVerified *bool `protobuf:"varint,11,opt,name=phone_number_verified,json=phoneNumberVerified,proto3,oneof" json:"phone_number_verified,omitempty"` +} + +func (x *UserAttributes) Reset() { + *x = UserAttributes{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserAttributes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserAttributes) ProtoMessage() {} + +func (x *UserAttributes) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserAttributes.ProtoReflect.Descriptor instead. +func (*UserAttributes) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{2} +} + +func (x *UserAttributes) GetSub() string { + if x != nil && x.Sub != nil { + return *x.Sub + } + return "" +} + +func (x *UserAttributes) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *UserAttributes) GetGivenName() string { + if x != nil && x.GivenName != nil { + return *x.GivenName + } + return "" +} + +func (x *UserAttributes) GetFamilyName() string { + if x != nil && x.FamilyName != nil { + return *x.FamilyName + } + return "" +} + +func (x *UserAttributes) GetPreferredUsername() string { + if x != nil && x.PreferredUsername != nil { + return *x.PreferredUsername + } + return "" +} + +func (x *UserAttributes) GetPicture() string { + if x != nil && x.Picture != nil { + return *x.Picture + } + return "" +} + +func (x *UserAttributes) GetEmail() string { + if x != nil && x.Email != nil { + return *x.Email + } + return "" +} + +// Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. +func (x *UserAttributes) GetEmailVerified() bool { + if x != nil && x.EmailVerified != nil { + return *x.EmailVerified + } + return false +} + +// Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. +func (x *UserAttributes) GetZoneinfo() string { + if x != nil && x.Zoneinfo != nil { + return *x.Zoneinfo + } + return "" +} + +func (x *UserAttributes) GetLocale() string { + if x != nil && x.Locale != nil { + return *x.Locale + } + return "" +} + +func (x *UserAttributes) GetPhoneNumber() string { + if x != nil && x.PhoneNumber != nil { + return *x.PhoneNumber + } + return "" +} + +// Deprecated: Marked as deprecated in nebius/iam/v1/tenant_user_account.proto. +func (x *UserAttributes) GetPhoneNumberVerified() bool { + if x != nil && x.PhoneNumberVerified != nil { + return *x.PhoneNumberVerified + } + return false +} + +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{3} +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type TenantUserAccountSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VisibleAttributes *TenantUserAccountSpec_VisibleAttributes `protobuf:"bytes,1,opt,name=visible_attributes,json=visibleAttributes,proto3" json:"visible_attributes,omitempty"` +} + +func (x *TenantUserAccountSpec) Reset() { + *x = TenantUserAccountSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TenantUserAccountSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUserAccountSpec) ProtoMessage() {} + +func (x *TenantUserAccountSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUserAccountSpec.ProtoReflect.Descriptor instead. +func (*TenantUserAccountSpec) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{4} +} + +func (x *TenantUserAccountSpec) GetVisibleAttributes() *TenantUserAccountSpec_VisibleAttributes { + if x != nil { + return x.VisibleAttributes + } + return nil +} + +type TenantUserAccountStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State TenantUserAccountStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.iam.v1.TenantUserAccountStatus_State" json:"state,omitempty"` + // if a tenant user account is created during invitation it gets a reference to the invitation resource + // once invitation is accepted it looses this reference (and internally gets a reference to their global federated user account) + InvitationId string `protobuf:"bytes,2,opt,name=invitation_id,json=invitationId,proto3" json:"invitation_id,omitempty"` + // currently can only accept the values: custom, unknown, google, github. + FederationId string `protobuf:"bytes,3,opt,name=federation_id,json=federationId,proto3" json:"federation_id,omitempty"` +} + +func (x *TenantUserAccountStatus) Reset() { + *x = TenantUserAccountStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TenantUserAccountStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUserAccountStatus) ProtoMessage() {} + +func (x *TenantUserAccountStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUserAccountStatus.ProtoReflect.Descriptor instead. +func (*TenantUserAccountStatus) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{5} +} + +func (x *TenantUserAccountStatus) GetState() TenantUserAccountStatus_State { + if x != nil { + return x.State + } + return TenantUserAccountStatus_STATE_UNSPECIFIED +} + +func (x *TenantUserAccountStatus) GetInvitationId() string { + if x != nil { + return x.InvitationId + } + return "" +} + +func (x *TenantUserAccountStatus) GetFederationId() string { + if x != nil { + return x.FederationId + } + return "" +} + +// when a global user account is projected to a specific tenant +// they can give consent for that tenant's owner to view specific personal data +// by listing explicitly visible PDS attributes +// complete list of PDS attributes is described in ../../pds/inner/v1alpha1/iam_identifier.proto +type TenantUserAccountSpec_VisibleAttributes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attribute []string `protobuf:"bytes,1,rep,name=attribute,proto3" json:"attribute,omitempty"` +} + +func (x *TenantUserAccountSpec_VisibleAttributes) Reset() { + *x = TenantUserAccountSpec_VisibleAttributes{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TenantUserAccountSpec_VisibleAttributes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TenantUserAccountSpec_VisibleAttributes) ProtoMessage() {} + +func (x *TenantUserAccountSpec_VisibleAttributes) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TenantUserAccountSpec_VisibleAttributes.ProtoReflect.Descriptor instead. +func (*TenantUserAccountSpec_VisibleAttributes) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *TenantUserAccountSpec_VisibleAttributes) GetAttribute() []string { + if x != nil { + return x.Attribute + } + return nil +} + +var File_nebius_iam_v1_tenant_user_account_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_tenant_user_account_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xe9, 0x01, 0x0a, 0x11, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x12, 0x44, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xf8, 0x01, 0x0a, + 0x1f, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x50, 0x0a, 0x13, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x11, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x42, 0x14, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x89, 0x06, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x03, 0x73, 0x75, + 0x62, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x00, 0x52, 0x03, + 0x73, 0x75, 0x62, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0a, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x02, 0x52, + 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 0x0a, + 0x0b, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x04, 0x52, 0x11, 0x70, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x05, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, + 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x75, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x5a, 0xba, 0x48, 0x54, 0xba, 0x01, 0x51, 0x0a, 0x0c, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, + 0x1c, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x28, 0x29, 0xc0, 0x4a, 0x01, + 0x48, 0x06, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x0e, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x48, 0x07, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x08, + 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, + 0xc0, 0x4a, 0x01, 0x18, 0x01, 0x48, 0x08, 0x52, 0x08, 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x66, + 0x6f, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x48, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, + 0x01, 0x48, 0x0a, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x15, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x48, 0x0b, 0x52, 0x13, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x73, 0x75, 0x62, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x69, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x11, 0x0a, + 0x0f, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x22, 0x21, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x15, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x65, 0x0a, 0x12, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x52, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x36, 0x0a, 0x11, 0x56, 0x69, 0x73, 0x69, 0x62, + 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x09, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xc0, 0x4a, 0x01, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, + 0xee, 0x01, 0x0a, 0x17, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x64, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, + 0x42, 0x5d, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_tenant_user_account_proto_rawDescOnce sync.Once + file_nebius_iam_v1_tenant_user_account_proto_rawDescData = file_nebius_iam_v1_tenant_user_account_proto_rawDesc +) + +func file_nebius_iam_v1_tenant_user_account_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_tenant_user_account_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_tenant_user_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_tenant_user_account_proto_rawDescData) + }) + return file_nebius_iam_v1_tenant_user_account_proto_rawDescData +} + +var file_nebius_iam_v1_tenant_user_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_iam_v1_tenant_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_iam_v1_tenant_user_account_proto_goTypes = []any{ + (TenantUserAccountStatus_State)(0), // 0: nebius.iam.v1.TenantUserAccountStatus.State + (*TenantUserAccount)(nil), // 1: nebius.iam.v1.TenantUserAccount + (*TenantUserAccountWithAttributes)(nil), // 2: nebius.iam.v1.TenantUserAccountWithAttributes + (*UserAttributes)(nil), // 3: nebius.iam.v1.UserAttributes + (*Error)(nil), // 4: nebius.iam.v1.Error + (*TenantUserAccountSpec)(nil), // 5: nebius.iam.v1.TenantUserAccountSpec + (*TenantUserAccountStatus)(nil), // 6: nebius.iam.v1.TenantUserAccountStatus + (*TenantUserAccountSpec_VisibleAttributes)(nil), // 7: nebius.iam.v1.TenantUserAccountSpec.VisibleAttributes + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata +} +var file_nebius_iam_v1_tenant_user_account_proto_depIdxs = []int32{ + 8, // 0: nebius.iam.v1.TenantUserAccount.metadata:type_name -> nebius.common.v1.ResourceMetadata + 5, // 1: nebius.iam.v1.TenantUserAccount.spec:type_name -> nebius.iam.v1.TenantUserAccountSpec + 6, // 2: nebius.iam.v1.TenantUserAccount.status:type_name -> nebius.iam.v1.TenantUserAccountStatus + 1, // 3: nebius.iam.v1.TenantUserAccountWithAttributes.tenant_user_account:type_name -> nebius.iam.v1.TenantUserAccount + 3, // 4: nebius.iam.v1.TenantUserAccountWithAttributes.attributes:type_name -> nebius.iam.v1.UserAttributes + 4, // 5: nebius.iam.v1.TenantUserAccountWithAttributes.error:type_name -> nebius.iam.v1.Error + 7, // 6: nebius.iam.v1.TenantUserAccountSpec.visible_attributes:type_name -> nebius.iam.v1.TenantUserAccountSpec.VisibleAttributes + 0, // 7: nebius.iam.v1.TenantUserAccountStatus.state:type_name -> nebius.iam.v1.TenantUserAccountStatus.State + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_tenant_user_account_proto_init() } +func file_nebius_iam_v1_tenant_user_account_proto_init() { + if File_nebius_iam_v1_tenant_user_account_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*TenantUserAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*TenantUserAccountWithAttributes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*UserAttributes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*TenantUserAccountSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*TenantUserAccountStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*TenantUserAccountSpec_VisibleAttributes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[1].OneofWrappers = []any{ + (*TenantUserAccountWithAttributes_Attributes)(nil), + (*TenantUserAccountWithAttributes_Error)(nil), + } + file_nebius_iam_v1_tenant_user_account_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_tenant_user_account_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_tenant_user_account_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_tenant_user_account_proto_depIdxs, + EnumInfos: file_nebius_iam_v1_tenant_user_account_proto_enumTypes, + MessageInfos: file_nebius_iam_v1_tenant_user_account_proto_msgTypes, + }.Build() + File_nebius_iam_v1_tenant_user_account_proto = out.File + file_nebius_iam_v1_tenant_user_account_proto_rawDesc = nil + file_nebius_iam_v1_tenant_user_account_proto_goTypes = nil + file_nebius_iam_v1_tenant_user_account_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/tenant_user_account.sensitive.pb.go b/proto/nebius/iam/v1/tenant_user_account.sensitive.pb.go new file mode 100644 index 0000000..88ed8b2 --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account.sensitive.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [TenantUserAccount] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *TenantUserAccount) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [TenantUserAccount]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *TenantUserAccount +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [TenantUserAccount], use the following code: +// +// var original *TenantUserAccount +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*TenantUserAccount) +func (x *TenantUserAccount) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*TenantUserAccount) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperTenantUserAccount)(c)) +} + +// wrapperTenantUserAccount is used to return [TenantUserAccount] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperTenantUserAccount TenantUserAccount + +func (w *wrapperTenantUserAccount) String() string { + return (*TenantUserAccount)(w).String() +} + +func (*wrapperTenantUserAccount) ProtoMessage() {} + +func (w *wrapperTenantUserAccount) ProtoReflect() protoreflect.Message { + return (*TenantUserAccount)(w).ProtoReflect() +} + +// Sanitize mutates [TenantUserAccountWithAttributes] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *TenantUserAccountWithAttributes) Sanitize() { + if x == nil { + return + } + x.TenantUserAccount.Sanitize() + if o, ok := x.AttributesOptional.(*TenantUserAccountWithAttributes_Attributes); ok && o != nil { + o.Attributes.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [TenantUserAccountWithAttributes]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *TenantUserAccountWithAttributes +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [TenantUserAccountWithAttributes], use the following code: +// +// var original *TenantUserAccountWithAttributes +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*TenantUserAccountWithAttributes) +func (x *TenantUserAccountWithAttributes) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*TenantUserAccountWithAttributes) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperTenantUserAccountWithAttributes)(c)) +} + +// wrapperTenantUserAccountWithAttributes is used to return [TenantUserAccountWithAttributes] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperTenantUserAccountWithAttributes TenantUserAccountWithAttributes + +func (w *wrapperTenantUserAccountWithAttributes) String() string { + return (*TenantUserAccountWithAttributes)(w).String() +} + +func (*wrapperTenantUserAccountWithAttributes) ProtoMessage() {} + +func (w *wrapperTenantUserAccountWithAttributes) ProtoReflect() protoreflect.Message { + return (*TenantUserAccountWithAttributes)(w).ProtoReflect() +} + +// Sanitize mutates [UserAttributes] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UserAttributes) Sanitize() { + if x == nil { + return + } + x.Sub = proto.String("***") + x.Name = proto.String("***") + x.GivenName = proto.String("***") + x.FamilyName = proto.String("***") + x.PreferredUsername = proto.String("***") + x.Picture = proto.String("***") + x.Email = proto.String("***") + x.Zoneinfo = proto.String("***") + x.Locale = proto.String("***") + x.PhoneNumber = proto.String("***") +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UserAttributes]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UserAttributes +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UserAttributes], use the following code: +// +// var original *UserAttributes +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UserAttributes) +func (x *UserAttributes) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UserAttributes) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUserAttributes)(c)) +} + +// wrapperUserAttributes is used to return [UserAttributes] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUserAttributes UserAttributes + +func (w *wrapperUserAttributes) String() string { + return (*UserAttributes)(w).String() +} + +func (*wrapperUserAttributes) ProtoMessage() {} + +func (w *wrapperUserAttributes) ProtoReflect() protoreflect.Message { + return (*UserAttributes)(w).ProtoReflect() +} + +// func (x *Error) Sanitize() // is not generated as no sensitive fields found +// func (x *Error) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [TenantUserAccountSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *TenantUserAccountSpec) Sanitize() { + if x == nil { + return + } + x.VisibleAttributes.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [TenantUserAccountSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *TenantUserAccountSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [TenantUserAccountSpec], use the following code: +// +// var original *TenantUserAccountSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*TenantUserAccountSpec) +func (x *TenantUserAccountSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*TenantUserAccountSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperTenantUserAccountSpec)(c)) +} + +// wrapperTenantUserAccountSpec is used to return [TenantUserAccountSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperTenantUserAccountSpec TenantUserAccountSpec + +func (w *wrapperTenantUserAccountSpec) String() string { + return (*TenantUserAccountSpec)(w).String() +} + +func (*wrapperTenantUserAccountSpec) ProtoMessage() {} + +func (w *wrapperTenantUserAccountSpec) ProtoReflect() protoreflect.Message { + return (*TenantUserAccountSpec)(w).ProtoReflect() +} + +// Sanitize mutates [TenantUserAccountSpec_VisibleAttributes] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *TenantUserAccountSpec_VisibleAttributes) Sanitize() { + if x == nil { + return + } + x.Attribute = []string{"***"} +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [TenantUserAccountSpec_VisibleAttributes]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *TenantUserAccountSpec_VisibleAttributes +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [TenantUserAccountSpec_VisibleAttributes], use the following code: +// +// var original *TenantUserAccountSpec_VisibleAttributes +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*TenantUserAccountSpec_VisibleAttributes) +func (x *TenantUserAccountSpec_VisibleAttributes) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*TenantUserAccountSpec_VisibleAttributes) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperTenantUserAccountSpec_VisibleAttributes)(c)) +} + +// wrapperTenantUserAccountSpec_VisibleAttributes is used to return [TenantUserAccountSpec_VisibleAttributes] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperTenantUserAccountSpec_VisibleAttributes TenantUserAccountSpec_VisibleAttributes + +func (w *wrapperTenantUserAccountSpec_VisibleAttributes) String() string { + return (*TenantUserAccountSpec_VisibleAttributes)(w).String() +} + +func (*wrapperTenantUserAccountSpec_VisibleAttributes) ProtoMessage() {} + +func (w *wrapperTenantUserAccountSpec_VisibleAttributes) ProtoReflect() protoreflect.Message { + return (*TenantUserAccountSpec_VisibleAttributes)(w).ProtoReflect() +} + +// func (x *TenantUserAccountStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *TenantUserAccountStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/tenant_user_account_service.pb.go b/proto/nebius/iam/v1/tenant_user_account_service.pb.go new file mode 100644 index 0000000..2d83afb --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_service.pb.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/tenant_user_account_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetTenantUserAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // tenant user account id like 'tenantuseraccount-{region}someuniquesuffix' +} + +func (x *GetTenantUserAccountRequest) Reset() { + *x = GetTenantUserAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTenantUserAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTenantUserAccountRequest) ProtoMessage() {} + +func (x *GetTenantUserAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTenantUserAccountRequest.ProtoReflect.Descriptor instead. +func (*GetTenantUserAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTenantUserAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListTenantUserAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the tenant ID like 'tenant-someuniqueprefix' + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListTenantUserAccountsRequest) Reset() { + *x = ListTenantUserAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantUserAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantUserAccountsRequest) ProtoMessage() {} + +func (x *ListTenantUserAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantUserAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListTenantUserAccountsRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTenantUserAccountsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListTenantUserAccountsRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListTenantUserAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListTenantUserAccountsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListTenantUserAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of service accounts returned in the response. The field should be named as `items` for consistency. + Items []*TenantUserAccount `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTenantUserAccountsResponse) Reset() { + *x = ListTenantUserAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantUserAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantUserAccountsResponse) ProtoMessage() {} + +func (x *ListTenantUserAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantUserAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListTenantUserAccountsResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTenantUserAccountsResponse) GetItems() []*TenantUserAccount { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListTenantUserAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type BlockTenantUserAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *BlockTenantUserAccountRequest) Reset() { + *x = BlockTenantUserAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockTenantUserAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockTenantUserAccountRequest) ProtoMessage() {} + +func (x *BlockTenantUserAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockTenantUserAccountRequest.ProtoReflect.Descriptor instead. +func (*BlockTenantUserAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP(), []int{3} +} + +func (x *BlockTenantUserAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UnblockTenantUserAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *UnblockTenantUserAccountRequest) Reset() { + *x = UnblockTenantUserAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnblockTenantUserAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnblockTenantUserAccountRequest) ProtoMessage() {} + +func (x *UnblockTenantUserAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnblockTenantUserAccountRequest.ProtoReflect.Descriptor instead. +func (*UnblockTenantUserAccountRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UnblockTenantUserAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_iam_v1_tenant_user_account_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_tenant_user_account_service_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, + 0x80, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x2f, 0x0a, 0x1d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x1f, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0x8c, 0x03, 0x0a, 0x18, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, + 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x56, 0x0a, 0x07, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, + 0x6c, 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x64, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x1d, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_tenant_user_account_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_tenant_user_account_service_proto_rawDescData = file_nebius_iam_v1_tenant_user_account_service_proto_rawDesc +) + +func file_nebius_iam_v1_tenant_user_account_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_tenant_user_account_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_tenant_user_account_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_tenant_user_account_service_proto_rawDescData) + }) + return file_nebius_iam_v1_tenant_user_account_service_proto_rawDescData +} + +var file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_iam_v1_tenant_user_account_service_proto_goTypes = []any{ + (*GetTenantUserAccountRequest)(nil), // 0: nebius.iam.v1.GetTenantUserAccountRequest + (*ListTenantUserAccountsRequest)(nil), // 1: nebius.iam.v1.ListTenantUserAccountsRequest + (*ListTenantUserAccountsResponse)(nil), // 2: nebius.iam.v1.ListTenantUserAccountsResponse + (*BlockTenantUserAccountRequest)(nil), // 3: nebius.iam.v1.BlockTenantUserAccountRequest + (*UnblockTenantUserAccountRequest)(nil), // 4: nebius.iam.v1.UnblockTenantUserAccountRequest + (*TenantUserAccount)(nil), // 5: nebius.iam.v1.TenantUserAccount + (*v1.Operation)(nil), // 6: nebius.common.v1.Operation +} +var file_nebius_iam_v1_tenant_user_account_service_proto_depIdxs = []int32{ + 5, // 0: nebius.iam.v1.ListTenantUserAccountsResponse.items:type_name -> nebius.iam.v1.TenantUserAccount + 0, // 1: nebius.iam.v1.TenantUserAccountService.Get:input_type -> nebius.iam.v1.GetTenantUserAccountRequest + 1, // 2: nebius.iam.v1.TenantUserAccountService.List:input_type -> nebius.iam.v1.ListTenantUserAccountsRequest + 3, // 3: nebius.iam.v1.TenantUserAccountService.Block:input_type -> nebius.iam.v1.BlockTenantUserAccountRequest + 4, // 4: nebius.iam.v1.TenantUserAccountService.Unblock:input_type -> nebius.iam.v1.UnblockTenantUserAccountRequest + 5, // 5: nebius.iam.v1.TenantUserAccountService.Get:output_type -> nebius.iam.v1.TenantUserAccount + 2, // 6: nebius.iam.v1.TenantUserAccountService.List:output_type -> nebius.iam.v1.ListTenantUserAccountsResponse + 6, // 7: nebius.iam.v1.TenantUserAccountService.Block:output_type -> nebius.common.v1.Operation + 6, // 8: nebius.iam.v1.TenantUserAccountService.Unblock:output_type -> nebius.common.v1.Operation + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_tenant_user_account_service_proto_init() } +func file_nebius_iam_v1_tenant_user_account_service_proto_init() { + if File_nebius_iam_v1_tenant_user_account_service_proto != nil { + return + } + file_nebius_iam_v1_tenant_user_account_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetTenantUserAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantUserAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantUserAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*BlockTenantUserAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UnblockTenantUserAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_tenant_user_account_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_tenant_user_account_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_tenant_user_account_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_tenant_user_account_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_tenant_user_account_service_proto = out.File + file_nebius_iam_v1_tenant_user_account_service_proto_rawDesc = nil + file_nebius_iam_v1_tenant_user_account_service_proto_goTypes = nil + file_nebius_iam_v1_tenant_user_account_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/tenant_user_account_service.sensitive.pb.go b/proto/nebius/iam/v1/tenant_user_account_service.sensitive.pb.go new file mode 100644 index 0000000..f564ba5 --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_service.sensitive.pb.go @@ -0,0 +1,108 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetTenantUserAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetTenantUserAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListTenantUserAccountsRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListTenantUserAccountsRequest) Sanitize() { + if x == nil { + return + } + x.Filter = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListTenantUserAccountsRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListTenantUserAccountsRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListTenantUserAccountsRequest], use the following code: +// +// var original *ListTenantUserAccountsRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListTenantUserAccountsRequest) +func (x *ListTenantUserAccountsRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListTenantUserAccountsRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListTenantUserAccountsRequest)(c)) +} + +// wrapperListTenantUserAccountsRequest is used to return [ListTenantUserAccountsRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListTenantUserAccountsRequest ListTenantUserAccountsRequest + +func (w *wrapperListTenantUserAccountsRequest) String() string { + return (*ListTenantUserAccountsRequest)(w).String() +} + +func (*wrapperListTenantUserAccountsRequest) ProtoMessage() {} + +func (w *wrapperListTenantUserAccountsRequest) ProtoReflect() protoreflect.Message { + return (*ListTenantUserAccountsRequest)(w).ProtoReflect() +} + +// Sanitize mutates [ListTenantUserAccountsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListTenantUserAccountsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListTenantUserAccountsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListTenantUserAccountsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListTenantUserAccountsResponse], use the following code: +// +// var original *ListTenantUserAccountsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListTenantUserAccountsResponse) +func (x *ListTenantUserAccountsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListTenantUserAccountsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListTenantUserAccountsResponse)(c)) +} + +// wrapperListTenantUserAccountsResponse is used to return [ListTenantUserAccountsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListTenantUserAccountsResponse ListTenantUserAccountsResponse + +func (w *wrapperListTenantUserAccountsResponse) String() string { + return (*ListTenantUserAccountsResponse)(w).String() +} + +func (*wrapperListTenantUserAccountsResponse) ProtoMessage() {} + +func (w *wrapperListTenantUserAccountsResponse) ProtoReflect() protoreflect.Message { + return (*ListTenantUserAccountsResponse)(w).ProtoReflect() +} + +// func (x *BlockTenantUserAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *BlockTenantUserAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UnblockTenantUserAccountRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UnblockTenantUserAccountRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/iam/v1/tenant_user_account_service_grpc.pb.go b/proto/nebius/iam/v1/tenant_user_account_service_grpc.pb.go new file mode 100644 index 0000000..68e423c --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_service_grpc.pb.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/tenant_user_account_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TenantUserAccountService_Get_FullMethodName = "/nebius.iam.v1.TenantUserAccountService/Get" + TenantUserAccountService_List_FullMethodName = "/nebius.iam.v1.TenantUserAccountService/List" + TenantUserAccountService_Block_FullMethodName = "/nebius.iam.v1.TenantUserAccountService/Block" + TenantUserAccountService_Unblock_FullMethodName = "/nebius.iam.v1.TenantUserAccountService/Unblock" +) + +// TenantUserAccountServiceClient is the client API for TenantUserAccountService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TenantUserAccountServiceClient interface { + Get(ctx context.Context, in *GetTenantUserAccountRequest, opts ...grpc.CallOption) (*TenantUserAccount, error) + List(ctx context.Context, in *ListTenantUserAccountsRequest, opts ...grpc.CallOption) (*ListTenantUserAccountsResponse, error) + Block(ctx context.Context, in *BlockTenantUserAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Unblock(ctx context.Context, in *UnblockTenantUserAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type tenantUserAccountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTenantUserAccountServiceClient(cc grpc.ClientConnInterface) TenantUserAccountServiceClient { + return &tenantUserAccountServiceClient{cc} +} + +func (c *tenantUserAccountServiceClient) Get(ctx context.Context, in *GetTenantUserAccountRequest, opts ...grpc.CallOption) (*TenantUserAccount, error) { + out := new(TenantUserAccount) + err := c.cc.Invoke(ctx, TenantUserAccountService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tenantUserAccountServiceClient) List(ctx context.Context, in *ListTenantUserAccountsRequest, opts ...grpc.CallOption) (*ListTenantUserAccountsResponse, error) { + out := new(ListTenantUserAccountsResponse) + err := c.cc.Invoke(ctx, TenantUserAccountService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tenantUserAccountServiceClient) Block(ctx context.Context, in *BlockTenantUserAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, TenantUserAccountService_Block_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tenantUserAccountServiceClient) Unblock(ctx context.Context, in *UnblockTenantUserAccountRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, TenantUserAccountService_Unblock_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TenantUserAccountServiceServer is the server API for TenantUserAccountService service. +// All implementations should embed UnimplementedTenantUserAccountServiceServer +// for forward compatibility +type TenantUserAccountServiceServer interface { + Get(context.Context, *GetTenantUserAccountRequest) (*TenantUserAccount, error) + List(context.Context, *ListTenantUserAccountsRequest) (*ListTenantUserAccountsResponse, error) + Block(context.Context, *BlockTenantUserAccountRequest) (*v1.Operation, error) + Unblock(context.Context, *UnblockTenantUserAccountRequest) (*v1.Operation, error) +} + +// UnimplementedTenantUserAccountServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTenantUserAccountServiceServer struct { +} + +func (UnimplementedTenantUserAccountServiceServer) Get(context.Context, *GetTenantUserAccountRequest) (*TenantUserAccount, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedTenantUserAccountServiceServer) List(context.Context, *ListTenantUserAccountsRequest) (*ListTenantUserAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedTenantUserAccountServiceServer) Block(context.Context, *BlockTenantUserAccountRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Block not implemented") +} +func (UnimplementedTenantUserAccountServiceServer) Unblock(context.Context, *UnblockTenantUserAccountRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unblock not implemented") +} + +// UnsafeTenantUserAccountServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TenantUserAccountServiceServer will +// result in compilation errors. +type UnsafeTenantUserAccountServiceServer interface { + mustEmbedUnimplementedTenantUserAccountServiceServer() +} + +func RegisterTenantUserAccountServiceServer(s grpc.ServiceRegistrar, srv TenantUserAccountServiceServer) { + s.RegisterService(&TenantUserAccountService_ServiceDesc, srv) +} + +func _TenantUserAccountService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTenantUserAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountServiceServer).Get(ctx, req.(*GetTenantUserAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TenantUserAccountService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTenantUserAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountServiceServer).List(ctx, req.(*ListTenantUserAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TenantUserAccountService_Block_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockTenantUserAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountServiceServer).Block(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountService_Block_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountServiceServer).Block(ctx, req.(*BlockTenantUserAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TenantUserAccountService_Unblock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnblockTenantUserAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountServiceServer).Unblock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountService_Unblock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountServiceServer).Unblock(ctx, req.(*UnblockTenantUserAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TenantUserAccountService_ServiceDesc is the grpc.ServiceDesc for TenantUserAccountService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TenantUserAccountService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.TenantUserAccountService", + HandlerType: (*TenantUserAccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _TenantUserAccountService_Get_Handler, + }, + { + MethodName: "List", + Handler: _TenantUserAccountService_List_Handler, + }, + { + MethodName: "Block", + Handler: _TenantUserAccountService_Block_Handler, + }, + { + MethodName: "Unblock", + Handler: _TenantUserAccountService_Unblock_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/tenant_user_account_service.proto", +} diff --git a/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.pb.go b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.pb.go new file mode 100644 index 0000000..fe3234a --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.pb.go @@ -0,0 +1,364 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/tenant_user_account_with_attributes_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetTenantUserAccountWithAttributesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // tenant user account id like 'tenantuseraccount-{region}someuniquesuffix' +} + +func (x *GetTenantUserAccountWithAttributesRequest) Reset() { + *x = GetTenantUserAccountWithAttributesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTenantUserAccountWithAttributesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTenantUserAccountWithAttributesRequest) ProtoMessage() {} + +func (x *GetTenantUserAccountWithAttributesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTenantUserAccountWithAttributesRequest.ProtoReflect.Descriptor instead. +func (*GetTenantUserAccountWithAttributesRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTenantUserAccountWithAttributesRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListTenantUserAccountsWithAttributesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the tenant ID like 'tenant-{region}someuniquesuffix' + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + // Default value: 10 + PageSize *int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3,oneof" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListTenantUserAccountsWithAttributesRequest) Reset() { + *x = ListTenantUserAccountsWithAttributesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantUserAccountsWithAttributesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantUserAccountsWithAttributesRequest) ProtoMessage() {} + +func (x *ListTenantUserAccountsWithAttributesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantUserAccountsWithAttributesRequest.ProtoReflect.Descriptor instead. +func (*ListTenantUserAccountsWithAttributesRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTenantUserAccountsWithAttributesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListTenantUserAccountsWithAttributesRequest) GetPageSize() int64 { + if x != nil && x.PageSize != nil { + return *x.PageSize + } + return 0 +} + +func (x *ListTenantUserAccountsWithAttributesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListTenantUserAccountsWithAttributesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListTenantUserAccountsWithAttributesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of user accounts returned in the response. The field should be named as `items` for consistency. + Items []*TenantUserAccountWithAttributes `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTenantUserAccountsWithAttributesResponse) Reset() { + *x = ListTenantUserAccountsWithAttributesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTenantUserAccountsWithAttributesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTenantUserAccountsWithAttributesResponse) ProtoMessage() {} + +func (x *ListTenantUserAccountsWithAttributesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTenantUserAccountsWithAttributesResponse.ProtoReflect.Descriptor instead. +func (*ListTenantUserAccountsWithAttributesResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTenantUserAccountsWithAttributesResponse) GetItems() []*TenantUserAccountWithAttributes { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListTenantUserAccountsWithAttributesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_iam_v1_tenant_user_account_with_attributes_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0xb6, 0x01, 0x0a, 0x2b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xc0, 0x4a, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x2c, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa6, 0x02, 0x0a, 0x26, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, + 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x7f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3a, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0a, 0xba, 0x4a, 0x07, 0x63, 0x70, 0x6c, 0x2e, 0x69, 0x61, + 0x6d, 0x42, 0x72, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x2b, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescData = file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDesc +) + +func file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescData) + }) + return file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDescData +} + +var file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_goTypes = []any{ + (*GetTenantUserAccountWithAttributesRequest)(nil), // 0: nebius.iam.v1.GetTenantUserAccountWithAttributesRequest + (*ListTenantUserAccountsWithAttributesRequest)(nil), // 1: nebius.iam.v1.ListTenantUserAccountsWithAttributesRequest + (*ListTenantUserAccountsWithAttributesResponse)(nil), // 2: nebius.iam.v1.ListTenantUserAccountsWithAttributesResponse + (*TenantUserAccountWithAttributes)(nil), // 3: nebius.iam.v1.TenantUserAccountWithAttributes +} +var file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_depIdxs = []int32{ + 3, // 0: nebius.iam.v1.ListTenantUserAccountsWithAttributesResponse.items:type_name -> nebius.iam.v1.TenantUserAccountWithAttributes + 0, // 1: nebius.iam.v1.TenantUserAccountWithAttributesService.Get:input_type -> nebius.iam.v1.GetTenantUserAccountWithAttributesRequest + 1, // 2: nebius.iam.v1.TenantUserAccountWithAttributesService.List:input_type -> nebius.iam.v1.ListTenantUserAccountsWithAttributesRequest + 3, // 3: nebius.iam.v1.TenantUserAccountWithAttributesService.Get:output_type -> nebius.iam.v1.TenantUserAccountWithAttributes + 2, // 4: nebius.iam.v1.TenantUserAccountWithAttributesService.List:output_type -> nebius.iam.v1.ListTenantUserAccountsWithAttributesResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_init() } +func file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_init() { + if File_nebius_iam_v1_tenant_user_account_with_attributes_service_proto != nil { + return + } + file_nebius_iam_v1_tenant_user_account_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetTenantUserAccountWithAttributesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantUserAccountsWithAttributesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListTenantUserAccountsWithAttributesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes[1].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_tenant_user_account_with_attributes_service_proto = out.File + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_rawDesc = nil + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_goTypes = nil + file_nebius_iam_v1_tenant_user_account_with_attributes_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.sensitive.pb.go b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.sensitive.pb.go new file mode 100644 index 0000000..80bd6d0 --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service.sensitive.pb.go @@ -0,0 +1,102 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetTenantUserAccountWithAttributesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetTenantUserAccountWithAttributesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListTenantUserAccountsWithAttributesRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListTenantUserAccountsWithAttributesRequest) Sanitize() { + if x == nil { + return + } + x.Filter = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListTenantUserAccountsWithAttributesRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListTenantUserAccountsWithAttributesRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListTenantUserAccountsWithAttributesRequest], use the following code: +// +// var original *ListTenantUserAccountsWithAttributesRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListTenantUserAccountsWithAttributesRequest) +func (x *ListTenantUserAccountsWithAttributesRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListTenantUserAccountsWithAttributesRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListTenantUserAccountsWithAttributesRequest)(c)) +} + +// wrapperListTenantUserAccountsWithAttributesRequest is used to return [ListTenantUserAccountsWithAttributesRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListTenantUserAccountsWithAttributesRequest ListTenantUserAccountsWithAttributesRequest + +func (w *wrapperListTenantUserAccountsWithAttributesRequest) String() string { + return (*ListTenantUserAccountsWithAttributesRequest)(w).String() +} + +func (*wrapperListTenantUserAccountsWithAttributesRequest) ProtoMessage() {} + +func (w *wrapperListTenantUserAccountsWithAttributesRequest) ProtoReflect() protoreflect.Message { + return (*ListTenantUserAccountsWithAttributesRequest)(w).ProtoReflect() +} + +// Sanitize mutates [ListTenantUserAccountsWithAttributesResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListTenantUserAccountsWithAttributesResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListTenantUserAccountsWithAttributesResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListTenantUserAccountsWithAttributesResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListTenantUserAccountsWithAttributesResponse], use the following code: +// +// var original *ListTenantUserAccountsWithAttributesResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListTenantUserAccountsWithAttributesResponse) +func (x *ListTenantUserAccountsWithAttributesResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListTenantUserAccountsWithAttributesResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListTenantUserAccountsWithAttributesResponse)(c)) +} + +// wrapperListTenantUserAccountsWithAttributesResponse is used to return [ListTenantUserAccountsWithAttributesResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListTenantUserAccountsWithAttributesResponse ListTenantUserAccountsWithAttributesResponse + +func (w *wrapperListTenantUserAccountsWithAttributesResponse) String() string { + return (*ListTenantUserAccountsWithAttributesResponse)(w).String() +} + +func (*wrapperListTenantUserAccountsWithAttributesResponse) ProtoMessage() {} + +func (w *wrapperListTenantUserAccountsWithAttributesResponse) ProtoReflect() protoreflect.Message { + return (*ListTenantUserAccountsWithAttributesResponse)(w).ProtoReflect() +} diff --git a/proto/nebius/iam/v1/tenant_user_account_with_attributes_service_grpc.pb.go b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service_grpc.pb.go new file mode 100644 index 0000000..f11413c --- /dev/null +++ b/proto/nebius/iam/v1/tenant_user_account_with_attributes_service_grpc.pb.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/tenant_user_account_with_attributes_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TenantUserAccountWithAttributesService_Get_FullMethodName = "/nebius.iam.v1.TenantUserAccountWithAttributesService/Get" + TenantUserAccountWithAttributesService_List_FullMethodName = "/nebius.iam.v1.TenantUserAccountWithAttributesService/List" +) + +// TenantUserAccountWithAttributesServiceClient is the client API for TenantUserAccountWithAttributesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TenantUserAccountWithAttributesServiceClient interface { + Get(ctx context.Context, in *GetTenantUserAccountWithAttributesRequest, opts ...grpc.CallOption) (*TenantUserAccountWithAttributes, error) + List(ctx context.Context, in *ListTenantUserAccountsWithAttributesRequest, opts ...grpc.CallOption) (*ListTenantUserAccountsWithAttributesResponse, error) +} + +type tenantUserAccountWithAttributesServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTenantUserAccountWithAttributesServiceClient(cc grpc.ClientConnInterface) TenantUserAccountWithAttributesServiceClient { + return &tenantUserAccountWithAttributesServiceClient{cc} +} + +func (c *tenantUserAccountWithAttributesServiceClient) Get(ctx context.Context, in *GetTenantUserAccountWithAttributesRequest, opts ...grpc.CallOption) (*TenantUserAccountWithAttributes, error) { + out := new(TenantUserAccountWithAttributes) + err := c.cc.Invoke(ctx, TenantUserAccountWithAttributesService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tenantUserAccountWithAttributesServiceClient) List(ctx context.Context, in *ListTenantUserAccountsWithAttributesRequest, opts ...grpc.CallOption) (*ListTenantUserAccountsWithAttributesResponse, error) { + out := new(ListTenantUserAccountsWithAttributesResponse) + err := c.cc.Invoke(ctx, TenantUserAccountWithAttributesService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TenantUserAccountWithAttributesServiceServer is the server API for TenantUserAccountWithAttributesService service. +// All implementations should embed UnimplementedTenantUserAccountWithAttributesServiceServer +// for forward compatibility +type TenantUserAccountWithAttributesServiceServer interface { + Get(context.Context, *GetTenantUserAccountWithAttributesRequest) (*TenantUserAccountWithAttributes, error) + List(context.Context, *ListTenantUserAccountsWithAttributesRequest) (*ListTenantUserAccountsWithAttributesResponse, error) +} + +// UnimplementedTenantUserAccountWithAttributesServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTenantUserAccountWithAttributesServiceServer struct { +} + +func (UnimplementedTenantUserAccountWithAttributesServiceServer) Get(context.Context, *GetTenantUserAccountWithAttributesRequest) (*TenantUserAccountWithAttributes, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedTenantUserAccountWithAttributesServiceServer) List(context.Context, *ListTenantUserAccountsWithAttributesRequest) (*ListTenantUserAccountsWithAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeTenantUserAccountWithAttributesServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TenantUserAccountWithAttributesServiceServer will +// result in compilation errors. +type UnsafeTenantUserAccountWithAttributesServiceServer interface { + mustEmbedUnimplementedTenantUserAccountWithAttributesServiceServer() +} + +func RegisterTenantUserAccountWithAttributesServiceServer(s grpc.ServiceRegistrar, srv TenantUserAccountWithAttributesServiceServer) { + s.RegisterService(&TenantUserAccountWithAttributesService_ServiceDesc, srv) +} + +func _TenantUserAccountWithAttributesService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTenantUserAccountWithAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountWithAttributesServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountWithAttributesService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountWithAttributesServiceServer).Get(ctx, req.(*GetTenantUserAccountWithAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TenantUserAccountWithAttributesService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTenantUserAccountsWithAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TenantUserAccountWithAttributesServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TenantUserAccountWithAttributesService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TenantUserAccountWithAttributesServiceServer).List(ctx, req.(*ListTenantUserAccountsWithAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TenantUserAccountWithAttributesService_ServiceDesc is the grpc.ServiceDesc for TenantUserAccountWithAttributesService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TenantUserAccountWithAttributesService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.TenantUserAccountWithAttributesService", + HandlerType: (*TenantUserAccountWithAttributesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _TenantUserAccountWithAttributesService_Get_Handler, + }, + { + MethodName: "List", + Handler: _TenantUserAccountWithAttributesService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/tenant_user_account_with_attributes_service.proto", +} diff --git a/proto/nebius/iam/v1/token_exchange_service.pb.go b/proto/nebius/iam/v1/token_exchange_service.pb.go new file mode 100644 index 0000000..5c5a591 --- /dev/null +++ b/proto/nebius/iam/v1/token_exchange_service.pb.go @@ -0,0 +1,87 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/token_exchange_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_nebius_iam_v1_token_exchange_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_token_exchange_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x7a, 0x0a, 0x14, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x53, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x0d, 0xba, 0x4a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x2e, 0x69, 0x61, 0x6d, 0x42, 0x60, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x19, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_nebius_iam_v1_token_exchange_service_proto_goTypes = []any{ + (*ExchangeTokenRequest)(nil), // 0: nebius.iam.v1.ExchangeTokenRequest + (*CreateTokenResponse)(nil), // 1: nebius.iam.v1.CreateTokenResponse +} +var file_nebius_iam_v1_token_exchange_service_proto_depIdxs = []int32{ + 0, // 0: nebius.iam.v1.TokenExchangeService.Exchange:input_type -> nebius.iam.v1.ExchangeTokenRequest + 1, // 1: nebius.iam.v1.TokenExchangeService.Exchange:output_type -> nebius.iam.v1.CreateTokenResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_token_exchange_service_proto_init() } +func file_nebius_iam_v1_token_exchange_service_proto_init() { + if File_nebius_iam_v1_token_exchange_service_proto != nil { + return + } + file_nebius_iam_v1_token_service_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_token_exchange_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_iam_v1_token_exchange_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_token_exchange_service_proto_depIdxs, + }.Build() + File_nebius_iam_v1_token_exchange_service_proto = out.File + file_nebius_iam_v1_token_exchange_service_proto_rawDesc = nil + file_nebius_iam_v1_token_exchange_service_proto_goTypes = nil + file_nebius_iam_v1_token_exchange_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/token_exchange_service.sensitive.pb.go b/proto/nebius/iam/v1/token_exchange_service.sensitive.pb.go new file mode 100644 index 0000000..79ffd73 --- /dev/null +++ b/proto/nebius/iam/v1/token_exchange_service.sensitive.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 diff --git a/proto/nebius/iam/v1/token_exchange_service_grpc.pb.go b/proto/nebius/iam/v1/token_exchange_service_grpc.pb.go new file mode 100644 index 0000000..da7e580 --- /dev/null +++ b/proto/nebius/iam/v1/token_exchange_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/iam/v1/token_exchange_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TokenExchangeService_Exchange_FullMethodName = "/nebius.iam.v1.TokenExchangeService/Exchange" +) + +// TokenExchangeServiceClient is the client API for TokenExchangeService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TokenExchangeServiceClient interface { + Exchange(ctx context.Context, in *ExchangeTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) +} + +type tokenExchangeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTokenExchangeServiceClient(cc grpc.ClientConnInterface) TokenExchangeServiceClient { + return &tokenExchangeServiceClient{cc} +} + +func (c *tokenExchangeServiceClient) Exchange(ctx context.Context, in *ExchangeTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) { + out := new(CreateTokenResponse) + err := c.cc.Invoke(ctx, TokenExchangeService_Exchange_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TokenExchangeServiceServer is the server API for TokenExchangeService service. +// All implementations should embed UnimplementedTokenExchangeServiceServer +// for forward compatibility +type TokenExchangeServiceServer interface { + Exchange(context.Context, *ExchangeTokenRequest) (*CreateTokenResponse, error) +} + +// UnimplementedTokenExchangeServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTokenExchangeServiceServer struct { +} + +func (UnimplementedTokenExchangeServiceServer) Exchange(context.Context, *ExchangeTokenRequest) (*CreateTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exchange not implemented") +} + +// UnsafeTokenExchangeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TokenExchangeServiceServer will +// result in compilation errors. +type UnsafeTokenExchangeServiceServer interface { + mustEmbedUnimplementedTokenExchangeServiceServer() +} + +func RegisterTokenExchangeServiceServer(s grpc.ServiceRegistrar, srv TokenExchangeServiceServer) { + s.RegisterService(&TokenExchangeService_ServiceDesc, srv) +} + +func _TokenExchangeService_Exchange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExchangeTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TokenExchangeServiceServer).Exchange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TokenExchangeService_Exchange_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TokenExchangeServiceServer).Exchange(ctx, req.(*ExchangeTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TokenExchangeService_ServiceDesc is the grpc.ServiceDesc for TokenExchangeService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TokenExchangeService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.iam.v1.TokenExchangeService", + HandlerType: (*TokenExchangeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Exchange", + Handler: _TokenExchangeService_Exchange_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/iam/v1/token_exchange_service.proto", +} diff --git a/proto/nebius/iam/v1/token_service.pb.go b/proto/nebius/iam/v1/token_service.pb.go new file mode 100644 index 0000000..5b24890 --- /dev/null +++ b/proto/nebius/iam/v1/token_service.pb.go @@ -0,0 +1,340 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/token_service.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// https://www.rfc-editor.org/rfc/rfc8693.html +type ExchangeTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GrantType string `protobuf:"bytes,1,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"` // required - urn:ietf:params:oauth:grant-type:token-exchange + RequestedTokenType string `protobuf:"bytes,2,opt,name=requested_token_type,json=requestedTokenType,proto3" json:"requested_token_type,omitempty"` // optional type of requested token, default is urn:ietf:params:oauth:token-type:access_token + SubjectToken string `protobuf:"bytes,3,opt,name=subject_token,json=subjectToken,proto3" json:"subject_token,omitempty"` // required - could be self signed JWT token + SubjectTokenType string `protobuf:"bytes,4,opt,name=subject_token_type,json=subjectTokenType,proto3" json:"subject_token_type,omitempty"` // required, in case of jwt - urn:ietf:params:oauth:token-type:jwt + Scopes []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"` // optional (scopes of the token) + Audience string `protobuf:"bytes,6,opt,name=audience,proto3" json:"audience,omitempty"` // optional, name of the oauth client id on which this token will be used + ActorToken string `protobuf:"bytes,7,opt,name=actor_token,json=actorToken,proto3" json:"actor_token,omitempty"` // optional, subject token for impersonation/delegation (who want to impersonate/delegate) in subject_token. + ActorTokenType string `protobuf:"bytes,8,opt,name=actor_token_type,json=actorTokenType,proto3" json:"actor_token_type,omitempty"` // optional, token type for the impersonation/delegation (who want to impersonate/delegate). Usually it's urn:ietf:params:oauth:token-type:access_token + Resource []string `protobuf:"bytes,9,rep,name=resource,proto3" json:"resource,omitempty"` // optional, list of resources approved to use by token, if applicable +} + +func (x *ExchangeTokenRequest) Reset() { + *x = ExchangeTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_token_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExchangeTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExchangeTokenRequest) ProtoMessage() {} + +func (x *ExchangeTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_token_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExchangeTokenRequest.ProtoReflect.Descriptor instead. +func (*ExchangeTokenRequest) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_token_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ExchangeTokenRequest) GetGrantType() string { + if x != nil { + return x.GrantType + } + return "" +} + +func (x *ExchangeTokenRequest) GetRequestedTokenType() string { + if x != nil { + return x.RequestedTokenType + } + return "" +} + +func (x *ExchangeTokenRequest) GetSubjectToken() string { + if x != nil { + return x.SubjectToken + } + return "" +} + +func (x *ExchangeTokenRequest) GetSubjectTokenType() string { + if x != nil { + return x.SubjectTokenType + } + return "" +} + +func (x *ExchangeTokenRequest) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *ExchangeTokenRequest) GetAudience() string { + if x != nil { + return x.Audience + } + return "" +} + +func (x *ExchangeTokenRequest) GetActorToken() string { + if x != nil { + return x.ActorToken + } + return "" +} + +func (x *ExchangeTokenRequest) GetActorTokenType() string { + if x != nil { + return x.ActorTokenType + } + return "" +} + +func (x *ExchangeTokenRequest) GetResource() []string { + if x != nil { + return x.Resource + } + return nil +} + +type CreateTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // required + IssuedTokenType string `protobuf:"bytes,2,opt,name=issued_token_type,json=issuedTokenType,proto3" json:"issued_token_type,omitempty"` // required + TokenType string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // required - Bearer + ExpiresIn int64 `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` + Scopes []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"` +} + +func (x *CreateTokenResponse) Reset() { + *x = CreateTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_token_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTokenResponse) ProtoMessage() {} + +func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_token_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead. +func (*CreateTokenResponse) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_token_service_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateTokenResponse) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *CreateTokenResponse) GetIssuedTokenType() string { + if x != nil { + return x.IssuedTokenType + } + return "" +} + +func (x *CreateTokenResponse) GetTokenType() string { + if x != nil { + return x.TokenType + } + return "" +} + +func (x *CreateTokenResponse) GetExpiresIn() int64 { + if x != nil { + return x.ExpiresIn + } + return 0 +} + +func (x *CreateTokenResponse) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +var File_nebius_iam_v1_token_service_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_token_service_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x02, 0x0a, + 0x14, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xc0, + 0x4a, 0x01, 0xc8, 0x4a, 0x01, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xc0, 0x4a, 0x01, 0xc8, + 0x4a, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x28, + 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x0c, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xc0, 0x4a, 0x01, 0xc8, 0x4a, 0x01, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x58, 0x0a, 0x14, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x42, 0x11, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_token_service_proto_rawDescOnce sync.Once + file_nebius_iam_v1_token_service_proto_rawDescData = file_nebius_iam_v1_token_service_proto_rawDesc +) + +func file_nebius_iam_v1_token_service_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_token_service_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_token_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_token_service_proto_rawDescData) + }) + return file_nebius_iam_v1_token_service_proto_rawDescData +} + +var file_nebius_iam_v1_token_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_iam_v1_token_service_proto_goTypes = []any{ + (*ExchangeTokenRequest)(nil), // 0: nebius.iam.v1.ExchangeTokenRequest + (*CreateTokenResponse)(nil), // 1: nebius.iam.v1.CreateTokenResponse +} +var file_nebius_iam_v1_token_service_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_token_service_proto_init() } +func file_nebius_iam_v1_token_service_proto_init() { + if File_nebius_iam_v1_token_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_token_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ExchangeTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_iam_v1_token_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CreateTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_token_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_token_service_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_token_service_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_token_service_proto_msgTypes, + }.Build() + File_nebius_iam_v1_token_service_proto = out.File + file_nebius_iam_v1_token_service_proto_rawDesc = nil + file_nebius_iam_v1_token_service_proto_goTypes = nil + file_nebius_iam_v1_token_service_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/token_service.sensitive.pb.go b/proto/nebius/iam/v1/token_service.sensitive.pb.go new file mode 100644 index 0000000..77c0d08 --- /dev/null +++ b/proto/nebius/iam/v1/token_service.sensitive.pb.go @@ -0,0 +1,98 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [ExchangeTokenRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ExchangeTokenRequest) Sanitize() { + if x == nil { + return + } + x.SubjectToken = "***" + x.ActorToken = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ExchangeTokenRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ExchangeTokenRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ExchangeTokenRequest], use the following code: +// +// var original *ExchangeTokenRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ExchangeTokenRequest) +func (x *ExchangeTokenRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ExchangeTokenRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperExchangeTokenRequest)(c)) +} + +// wrapperExchangeTokenRequest is used to return [ExchangeTokenRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperExchangeTokenRequest ExchangeTokenRequest + +func (w *wrapperExchangeTokenRequest) String() string { + return (*ExchangeTokenRequest)(w).String() +} + +func (*wrapperExchangeTokenRequest) ProtoMessage() {} + +func (w *wrapperExchangeTokenRequest) ProtoReflect() protoreflect.Message { + return (*ExchangeTokenRequest)(w).ProtoReflect() +} + +// Sanitize mutates [CreateTokenResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateTokenResponse) Sanitize() { + if x == nil { + return + } + x.AccessToken = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateTokenResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateTokenResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateTokenResponse], use the following code: +// +// var original *CreateTokenResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateTokenResponse) +func (x *CreateTokenResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateTokenResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateTokenResponse)(c)) +} + +// wrapperCreateTokenResponse is used to return [CreateTokenResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateTokenResponse CreateTokenResponse + +func (w *wrapperCreateTokenResponse) String() string { + return (*CreateTokenResponse)(w).String() +} + +func (*wrapperCreateTokenResponse) ProtoMessage() {} + +func (w *wrapperCreateTokenResponse) ProtoReflect() protoreflect.Message { + return (*CreateTokenResponse)(w).ProtoReflect() +} diff --git a/proto/nebius/iam/v1/user_account.pb.go b/proto/nebius/iam/v1/user_account.pb.go new file mode 100644 index 0000000..8d2f59e --- /dev/null +++ b/proto/nebius/iam/v1/user_account.pb.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/iam/v1/user_account.proto + +package v1 + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UserAccountExternalId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FederationUserAccountId string `protobuf:"bytes,1,opt,name=federation_user_account_id,json=federationUserAccountId,proto3" json:"federation_user_account_id,omitempty"` + FederationId string `protobuf:"bytes,2,opt,name=federation_id,json=federationId,proto3" json:"federation_id,omitempty"` +} + +func (x *UserAccountExternalId) Reset() { + *x = UserAccountExternalId{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_iam_v1_user_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserAccountExternalId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserAccountExternalId) ProtoMessage() {} + +func (x *UserAccountExternalId) ProtoReflect() protoreflect.Message { + mi := &file_nebius_iam_v1_user_account_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserAccountExternalId.ProtoReflect.Descriptor instead. +func (*UserAccountExternalId) Descriptor() ([]byte, []int) { + return file_nebius_iam_v1_user_account_proto_rawDescGZIP(), []int{0} +} + +func (x *UserAccountExternalId) GetFederationUserAccountId() string { + if x != nil { + return x.FederationUserAccountId + } + return "" +} + +func (x *UserAccountExternalId) GetFederationId() string { + if x != nil { + return x.FederationId + } + return "" +} + +var File_nebius_iam_v1_user_account_proto protoreflect.FileDescriptor + +var file_nebius_iam_v1_user_account_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x15, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1a, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x52, 0x17, 0x66, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x64, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, + 0x65, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x57, 0x0a, 0x14, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x69, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_iam_v1_user_account_proto_rawDescOnce sync.Once + file_nebius_iam_v1_user_account_proto_rawDescData = file_nebius_iam_v1_user_account_proto_rawDesc +) + +func file_nebius_iam_v1_user_account_proto_rawDescGZIP() []byte { + file_nebius_iam_v1_user_account_proto_rawDescOnce.Do(func() { + file_nebius_iam_v1_user_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_iam_v1_user_account_proto_rawDescData) + }) + return file_nebius_iam_v1_user_account_proto_rawDescData +} + +var file_nebius_iam_v1_user_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_iam_v1_user_account_proto_goTypes = []any{ + (*UserAccountExternalId)(nil), // 0: nebius.iam.v1.UserAccountExternalId +} +var file_nebius_iam_v1_user_account_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_iam_v1_user_account_proto_init() } +func file_nebius_iam_v1_user_account_proto_init() { + if File_nebius_iam_v1_user_account_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_iam_v1_user_account_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*UserAccountExternalId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_iam_v1_user_account_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_iam_v1_user_account_proto_goTypes, + DependencyIndexes: file_nebius_iam_v1_user_account_proto_depIdxs, + MessageInfos: file_nebius_iam_v1_user_account_proto_msgTypes, + }.Build() + File_nebius_iam_v1_user_account_proto = out.File + file_nebius_iam_v1_user_account_proto_rawDesc = nil + file_nebius_iam_v1_user_account_proto_goTypes = nil + file_nebius_iam_v1_user_account_proto_depIdxs = nil +} diff --git a/proto/nebius/iam/v1/user_account.sensitive.pb.go b/proto/nebius/iam/v1/user_account.sensitive.pb.go new file mode 100644 index 0000000..72c5e0c --- /dev/null +++ b/proto/nebius/iam/v1/user_account.sensitive.pb.go @@ -0,0 +1,53 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [UserAccountExternalId] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UserAccountExternalId) Sanitize() { + if x == nil { + return + } + x.FederationUserAccountId = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UserAccountExternalId]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UserAccountExternalId +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UserAccountExternalId], use the following code: +// +// var original *UserAccountExternalId +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UserAccountExternalId) +func (x *UserAccountExternalId) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UserAccountExternalId) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUserAccountExternalId)(c)) +} + +// wrapperUserAccountExternalId is used to return [UserAccountExternalId] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUserAccountExternalId UserAccountExternalId + +func (w *wrapperUserAccountExternalId) String() string { + return (*UserAccountExternalId)(w).String() +} + +func (*wrapperUserAccountExternalId) ProtoMessage() {} + +func (w *wrapperUserAccountExternalId) ProtoReflect() protoreflect.Message { + return (*UserAccountExternalId)(w).ProtoReflect() +} diff --git a/proto/nebius/logging/v1/agentmanager/version_service.pb.go b/proto/nebius/logging/v1/agentmanager/version_service.pb.go new file mode 100644 index 0000000..fe38b6d --- /dev/null +++ b/proto/nebius/logging/v1/agentmanager/version_service.pb.go @@ -0,0 +1,875 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/logging/v1/agentmanager/version_service.proto + +package agentmanager + +import ( + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AgentType int32 + +const ( + AgentType_AGENT_UNDEFINED AgentType = 0 + AgentType_O11Y_AGENT AgentType = 1 +) + +// Enum value maps for AgentType. +var ( + AgentType_name = map[int32]string{ + 0: "AGENT_UNDEFINED", + 1: "O11Y_AGENT", + } + AgentType_value = map[string]int32{ + "AGENT_UNDEFINED": 0, + "O11Y_AGENT": 1, + } +) + +func (x AgentType) Enum() *AgentType { + p := new(AgentType) + *p = x + return p +} + +func (x AgentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AgentType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[0].Descriptor() +} + +func (AgentType) Type() protoreflect.EnumType { + return &file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[0] +} + +func (x AgentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AgentType.Descriptor instead. +func (AgentType) EnumDescriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{0} +} + +type AgentState int32 + +const ( + AgentState_STATE_UNDEFINED AgentState = 0 + AgentState_STATE_HEALTHY AgentState = 1 + AgentState_STATE_ERROR AgentState = 2 +) + +// Enum value maps for AgentState. +var ( + AgentState_name = map[int32]string{ + 0: "STATE_UNDEFINED", + 1: "STATE_HEALTHY", + 2: "STATE_ERROR", + } + AgentState_value = map[string]int32{ + "STATE_UNDEFINED": 0, + "STATE_HEALTHY": 1, + "STATE_ERROR": 2, + } +) + +func (x AgentState) Enum() *AgentState { + p := new(AgentState) + *p = x + return p +} + +func (x AgentState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AgentState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[1].Descriptor() +} + +func (AgentState) Type() protoreflect.EnumType { + return &file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[1] +} + +func (x AgentState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AgentState.Descriptor instead. +func (AgentState) EnumDescriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{1} +} + +type Action int32 + +const ( + Action_ACTION_UNDEFINED Action = 0 + Action_NOP Action = 1 + Action_UPDATE Action = 2 + Action_RESTART Action = 3 +) + +// Enum value maps for Action. +var ( + Action_name = map[int32]string{ + 0: "ACTION_UNDEFINED", + 1: "NOP", + 2: "UPDATE", + 3: "RESTART", + } + Action_value = map[string]int32{ + "ACTION_UNDEFINED": 0, + "NOP": 1, + "UPDATE": 2, + "RESTART": 3, + } +) + +func (x Action) Enum() *Action { + p := new(Action) + *p = x + return p +} + +func (x Action) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Action) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[2].Descriptor() +} + +func (Action) Type() protoreflect.EnumType { + return &file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes[2] +} + +func (x Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Action.Descriptor instead. +func (Action) EnumDescriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{2} +} + +type GetVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type AgentType `protobuf:"varint,1,opt,name=type,proto3,enum=nebius.logging.agentmanager.v1.AgentType" json:"type,omitempty"` + AgentVersion string `protobuf:"bytes,2,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` + UpdaterVersion string `protobuf:"bytes,3,opt,name=updater_version,json=updaterVersion,proto3" json:"updater_version,omitempty"` + ParentId string `protobuf:"bytes,4,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + InstanceId string `protobuf:"bytes,5,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + OsInfo *OSInfo `protobuf:"bytes,6,opt,name=os_info,json=osInfo,proto3" json:"os_info,omitempty"` + AgentState AgentState `protobuf:"varint,7,opt,name=agent_state,json=agentState,proto3,enum=nebius.logging.agentmanager.v1.AgentState" json:"agent_state,omitempty"` + AgentUptime *durationpb.Duration `protobuf:"bytes,8,opt,name=agent_uptime,json=agentUptime,proto3" json:"agent_uptime,omitempty"` + SystemUptime *durationpb.Duration `protobuf:"bytes,9,opt,name=system_uptime,json=systemUptime,proto3" json:"system_uptime,omitempty"` + UpdaterUptime *durationpb.Duration `protobuf:"bytes,10,opt,name=updater_uptime,json=updaterUptime,proto3" json:"updater_uptime,omitempty"` + AgentStateMessages []string `protobuf:"bytes,11,rep,name=agent_state_messages,json=agentStateMessages,proto3" json:"agent_state_messages,omitempty"` + LastUpdateError string `protobuf:"bytes,12,opt,name=last_update_error,json=lastUpdateError,proto3" json:"last_update_error,omitempty"` +} + +func (x *GetVersionRequest) Reset() { + *x = GetVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVersionRequest) ProtoMessage() {} + +func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead. +func (*GetVersionRequest) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetVersionRequest) GetType() AgentType { + if x != nil { + return x.Type + } + return AgentType_AGENT_UNDEFINED +} + +func (x *GetVersionRequest) GetAgentVersion() string { + if x != nil { + return x.AgentVersion + } + return "" +} + +func (x *GetVersionRequest) GetUpdaterVersion() string { + if x != nil { + return x.UpdaterVersion + } + return "" +} + +func (x *GetVersionRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetVersionRequest) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *GetVersionRequest) GetOsInfo() *OSInfo { + if x != nil { + return x.OsInfo + } + return nil +} + +func (x *GetVersionRequest) GetAgentState() AgentState { + if x != nil { + return x.AgentState + } + return AgentState_STATE_UNDEFINED +} + +func (x *GetVersionRequest) GetAgentUptime() *durationpb.Duration { + if x != nil { + return x.AgentUptime + } + return nil +} + +func (x *GetVersionRequest) GetSystemUptime() *durationpb.Duration { + if x != nil { + return x.SystemUptime + } + return nil +} + +func (x *GetVersionRequest) GetUpdaterUptime() *durationpb.Duration { + if x != nil { + return x.UpdaterUptime + } + return nil +} + +func (x *GetVersionRequest) GetAgentStateMessages() []string { + if x != nil { + return x.AgentStateMessages + } + return nil +} + +func (x *GetVersionRequest) GetLastUpdateError() string { + if x != nil { + return x.LastUpdateError + } + return "" +} + +type OSInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Example: "Ubuntu 22.04.4 LTS" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Example: "Linux computeimage-abcdef 6.5.0-44-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 14:36:16 UTC 2 x86_64 x86_64 x86_64 GNU/Linux" + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` + Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` +} + +func (x *OSInfo) Reset() { + *x = OSInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OSInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OSInfo) ProtoMessage() {} + +func (x *OSInfo) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OSInfo.ProtoReflect.Descriptor instead. +func (*OSInfo) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{1} +} + +func (x *OSInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OSInfo) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *OSInfo) GetArchitecture() string { + if x != nil { + return x.Architecture + } + return "" +} + +type GetVersionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Action Action `protobuf:"varint,1,opt,name=action,proto3,enum=nebius.logging.agentmanager.v1.Action" json:"action,omitempty"` + // Types that are assignable to Response: + // + // *GetVersionResponse_Nop + // *GetVersionResponse_Update + // *GetVersionResponse_Restart + Response isGetVersionResponse_Response `protobuf_oneof:"response"` +} + +func (x *GetVersionResponse) Reset() { + *x = GetVersionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVersionResponse) ProtoMessage() {} + +func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead. +func (*GetVersionResponse) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetVersionResponse) GetAction() Action { + if x != nil { + return x.Action + } + return Action_ACTION_UNDEFINED +} + +func (m *GetVersionResponse) GetResponse() isGetVersionResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *GetVersionResponse) GetNop() *NopActionParams { + if x, ok := x.GetResponse().(*GetVersionResponse_Nop); ok { + return x.Nop + } + return nil +} + +func (x *GetVersionResponse) GetUpdate() *UpdateActionParams { + if x, ok := x.GetResponse().(*GetVersionResponse_Update); ok { + return x.Update + } + return nil +} + +func (x *GetVersionResponse) GetRestart() *RestartActionParams { + if x, ok := x.GetResponse().(*GetVersionResponse_Restart); ok { + return x.Restart + } + return nil +} + +type isGetVersionResponse_Response interface { + isGetVersionResponse_Response() +} + +type GetVersionResponse_Nop struct { + Nop *NopActionParams `protobuf:"bytes,2,opt,name=nop,proto3,oneof"` +} + +type GetVersionResponse_Update struct { + Update *UpdateActionParams `protobuf:"bytes,3,opt,name=update,proto3,oneof"` +} + +type GetVersionResponse_Restart struct { + Restart *RestartActionParams `protobuf:"bytes,4,opt,name=restart,proto3,oneof"` +} + +func (*GetVersionResponse_Nop) isGetVersionResponse_Response() {} + +func (*GetVersionResponse_Update) isGetVersionResponse_Response() {} + +func (*GetVersionResponse_Restart) isGetVersionResponse_Response() {} + +type NopActionParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NopActionParams) Reset() { + *x = NopActionParams{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NopActionParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NopActionParams) ProtoMessage() {} + +func (x *NopActionParams) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NopActionParams.ProtoReflect.Descriptor instead. +func (*NopActionParams) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{3} +} + +type UpdateActionParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + RepoUrl string `protobuf:"bytes,2,opt,name=repo_url,json=repoUrl,proto3" json:"repo_url,omitempty"` +} + +func (x *UpdateActionParams) Reset() { + *x = UpdateActionParams{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateActionParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateActionParams) ProtoMessage() {} + +func (x *UpdateActionParams) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateActionParams.ProtoReflect.Descriptor instead. +func (*UpdateActionParams) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateActionParams) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *UpdateActionParams) GetRepoUrl() string { + if x != nil { + return x.RepoUrl + } + return "" +} + +type RestartActionParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RestartActionParams) Reset() { + *x = RestartActionParams{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestartActionParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestartActionParams) ProtoMessage() {} + +func (x *RestartActionParams) ProtoReflect() protoreflect.Message { + mi := &file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestartActionParams.ProtoReflect.Descriptor instead. +func (*RestartActionParams) Descriptor() ([]byte, []int) { + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP(), []int{5} +} + +var File_nebius_logging_v1_agentmanager_version_service_proto protoreflect.FileDescriptor + +var file_nebius_logging_v1_agentmanager_version_service_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8a, 0x05, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, + 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, + 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x3c, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, + 0x0d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, + 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x30, 0x0a, 0x14, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x56, 0x0a, + 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x75, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc4, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x03, + 0x6e, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x70, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x6f, + 0x70, 0x12, 0x4c, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x4f, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, + 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f, + 0x4e, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x49, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x19, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x55, 0x72, 0x6c, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x2a, 0x30, 0x0a, 0x09, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, + 0x0a, 0x0f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x31, 0x31, 0x59, 0x5f, 0x41, 0x47, 0x45, 0x4e, + 0x54, 0x10, 0x01, 0x2a, 0x45, 0x0a, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, + 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x40, 0x0a, 0x06, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, + 0x50, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x03, 0x32, 0xb9, 0x01, 0x0a, + 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x86, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x9a, 0xb5, 0x18, 0x0d, 0x0a, 0x0b, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x1a, 0x1e, 0xba, 0x4a, 0x1b, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x7c, 0x0a, 0x25, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x42, 0x13, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_logging_v1_agentmanager_version_service_proto_rawDescOnce sync.Once + file_nebius_logging_v1_agentmanager_version_service_proto_rawDescData = file_nebius_logging_v1_agentmanager_version_service_proto_rawDesc +) + +func file_nebius_logging_v1_agentmanager_version_service_proto_rawDescGZIP() []byte { + file_nebius_logging_v1_agentmanager_version_service_proto_rawDescOnce.Do(func() { + file_nebius_logging_v1_agentmanager_version_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_logging_v1_agentmanager_version_service_proto_rawDescData) + }) + return file_nebius_logging_v1_agentmanager_version_service_proto_rawDescData +} + +var file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_logging_v1_agentmanager_version_service_proto_goTypes = []any{ + (AgentType)(0), // 0: nebius.logging.agentmanager.v1.AgentType + (AgentState)(0), // 1: nebius.logging.agentmanager.v1.AgentState + (Action)(0), // 2: nebius.logging.agentmanager.v1.Action + (*GetVersionRequest)(nil), // 3: nebius.logging.agentmanager.v1.GetVersionRequest + (*OSInfo)(nil), // 4: nebius.logging.agentmanager.v1.OSInfo + (*GetVersionResponse)(nil), // 5: nebius.logging.agentmanager.v1.GetVersionResponse + (*NopActionParams)(nil), // 6: nebius.logging.agentmanager.v1.NopActionParams + (*UpdateActionParams)(nil), // 7: nebius.logging.agentmanager.v1.UpdateActionParams + (*RestartActionParams)(nil), // 8: nebius.logging.agentmanager.v1.RestartActionParams + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_nebius_logging_v1_agentmanager_version_service_proto_depIdxs = []int32{ + 0, // 0: nebius.logging.agentmanager.v1.GetVersionRequest.type:type_name -> nebius.logging.agentmanager.v1.AgentType + 4, // 1: nebius.logging.agentmanager.v1.GetVersionRequest.os_info:type_name -> nebius.logging.agentmanager.v1.OSInfo + 1, // 2: nebius.logging.agentmanager.v1.GetVersionRequest.agent_state:type_name -> nebius.logging.agentmanager.v1.AgentState + 9, // 3: nebius.logging.agentmanager.v1.GetVersionRequest.agent_uptime:type_name -> google.protobuf.Duration + 9, // 4: nebius.logging.agentmanager.v1.GetVersionRequest.system_uptime:type_name -> google.protobuf.Duration + 9, // 5: nebius.logging.agentmanager.v1.GetVersionRequest.updater_uptime:type_name -> google.protobuf.Duration + 2, // 6: nebius.logging.agentmanager.v1.GetVersionResponse.action:type_name -> nebius.logging.agentmanager.v1.Action + 6, // 7: nebius.logging.agentmanager.v1.GetVersionResponse.nop:type_name -> nebius.logging.agentmanager.v1.NopActionParams + 7, // 8: nebius.logging.agentmanager.v1.GetVersionResponse.update:type_name -> nebius.logging.agentmanager.v1.UpdateActionParams + 8, // 9: nebius.logging.agentmanager.v1.GetVersionResponse.restart:type_name -> nebius.logging.agentmanager.v1.RestartActionParams + 3, // 10: nebius.logging.agentmanager.v1.VersionService.GetVersion:input_type -> nebius.logging.agentmanager.v1.GetVersionRequest + 5, // 11: nebius.logging.agentmanager.v1.VersionService.GetVersion:output_type -> nebius.logging.agentmanager.v1.GetVersionResponse + 11, // [11:12] is the sub-list for method output_type + 10, // [10:11] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_nebius_logging_v1_agentmanager_version_service_proto_init() } +func file_nebius_logging_v1_agentmanager_version_service_proto_init() { + if File_nebius_logging_v1_agentmanager_version_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*OSInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetVersionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NopActionParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateActionParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*RestartActionParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes[2].OneofWrappers = []any{ + (*GetVersionResponse_Nop)(nil), + (*GetVersionResponse_Update)(nil), + (*GetVersionResponse_Restart)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_logging_v1_agentmanager_version_service_proto_rawDesc, + NumEnums: 3, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_logging_v1_agentmanager_version_service_proto_goTypes, + DependencyIndexes: file_nebius_logging_v1_agentmanager_version_service_proto_depIdxs, + EnumInfos: file_nebius_logging_v1_agentmanager_version_service_proto_enumTypes, + MessageInfos: file_nebius_logging_v1_agentmanager_version_service_proto_msgTypes, + }.Build() + File_nebius_logging_v1_agentmanager_version_service_proto = out.File + file_nebius_logging_v1_agentmanager_version_service_proto_rawDesc = nil + file_nebius_logging_v1_agentmanager_version_service_proto_goTypes = nil + file_nebius_logging_v1_agentmanager_version_service_proto_depIdxs = nil +} diff --git a/proto/nebius/logging/v1/agentmanager/version_service.sensitive.pb.go b/proto/nebius/logging/v1/agentmanager/version_service.sensitive.pb.go new file mode 100644 index 0000000..c2517dc --- /dev/null +++ b/proto/nebius/logging/v1/agentmanager/version_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package agentmanager + +// func (x *GetVersionRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetVersionRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *OSInfo) Sanitize() // is not generated as no sensitive fields found +// func (x *OSInfo) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetVersionResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *GetVersionResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NopActionParams) Sanitize() // is not generated as no sensitive fields found +// func (x *NopActionParams) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateActionParams) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateActionParams) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *RestartActionParams) Sanitize() // is not generated as no sensitive fields found +// func (x *RestartActionParams) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/logging/v1/agentmanager/version_service_grpc.pb.go b/proto/nebius/logging/v1/agentmanager/version_service_grpc.pb.go new file mode 100644 index 0000000..e2268df --- /dev/null +++ b/proto/nebius/logging/v1/agentmanager/version_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/logging/v1/agentmanager/version_service.proto + +package agentmanager + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + VersionService_GetVersion_FullMethodName = "/nebius.logging.agentmanager.v1.VersionService/GetVersion" +) + +// VersionServiceClient is the client API for VersionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type VersionServiceClient interface { + GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) +} + +type versionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient { + return &versionServiceClient{cc} +} + +func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { + out := new(GetVersionResponse) + err := c.cc.Invoke(ctx, VersionService_GetVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VersionServiceServer is the server API for VersionService service. +// All implementations should embed UnimplementedVersionServiceServer +// for forward compatibility +type VersionServiceServer interface { + GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) +} + +// UnimplementedVersionServiceServer should be embedded to have forward compatible implementations. +type UnimplementedVersionServiceServer struct { +} + +func (UnimplementedVersionServiceServer) GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") +} + +// UnsafeVersionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VersionServiceServer will +// result in compilation errors. +type UnsafeVersionServiceServer interface { + mustEmbedUnimplementedVersionServiceServer() +} + +func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer) { + s.RegisterService(&VersionService_ServiceDesc, srv) +} + +func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VersionServiceServer).GetVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VersionService_GetVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VersionServiceServer).GetVersion(ctx, req.(*GetVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// VersionService_ServiceDesc is the grpc.ServiceDesc for VersionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VersionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.logging.agentmanager.v1.VersionService", + HandlerType: (*VersionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetVersion", + Handler: _VersionService_GetVersion_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/logging/v1/agentmanager/version_service.proto", +} diff --git a/proto/nebius/mk8s/v1/cluster.pb.go b/proto/nebius/mk8s/v1/cluster.pb.go new file mode 100644 index 0000000..c2f8cfb --- /dev/null +++ b/proto/nebius/mk8s/v1/cluster.pb.go @@ -0,0 +1,953 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1/cluster.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterStatus_State int32 + +const ( + ClusterStatus_STATE_UNSPECIFIED ClusterStatus_State = 0 + ClusterStatus_PROVISIONING ClusterStatus_State = 1 + ClusterStatus_RUNNING ClusterStatus_State = 2 + ClusterStatus_DELETING ClusterStatus_State = 3 +) + +// Enum value maps for ClusterStatus_State. +var ( + ClusterStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PROVISIONING", + 2: "RUNNING", + 3: "DELETING", + } + ClusterStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "DELETING": 3, + } +) + +func (x ClusterStatus_State) Enum() *ClusterStatus_State { + p := new(ClusterStatus_State) + *p = x + return p +} + +func (x ClusterStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1_cluster_proto_enumTypes[0].Descriptor() +} + +func (ClusterStatus_State) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1_cluster_proto_enumTypes[0] +} + +func (x ClusterStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterStatus_State.Descriptor instead. +func (ClusterStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{6, 0} +} + +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *Cluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Cluster) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Cluster) GetStatus() *ClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +type ClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ControlPlane *ControlPlaneSpec `protobuf:"bytes,2,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` + // Defines kubernetes network configuration, like IP allocation. + KubeNetwork *KubeNetworkSpec `protobuf:"bytes,3,opt,name=kube_network,json=kubeNetwork,proto3" json:"kube_network,omitempty"` +} + +func (x *ClusterSpec) Reset() { + *x = ClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpec) ProtoMessage() {} + +func (x *ClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpec.ProtoReflect.Descriptor instead. +func (*ClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterSpec) GetControlPlane() *ControlPlaneSpec { + if x != nil { + return x.ControlPlane + } + return nil +} + +func (x *ClusterSpec) GetKubeNetwork() *KubeNetworkSpec { + if x != nil { + return x.KubeNetwork + } + return nil +} + +type ControlPlaneSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version is desired Kubernetes version of the cluster. For now only acceptable format is + // `MAJOR.MINOR` like "1.30". Option for patch version update will be added later. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Subnet ID where control plane instances will be located. + SubnetId string `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + Endpoints *ControlPlaneEndpointsSpec `protobuf:"bytes,3,opt,name=endpoints,proto3" json:"endpoints,omitempty"` + EtcdClusterSize int64 `protobuf:"varint,4,opt,name=etcd_cluster_size,json=etcdClusterSize,proto3" json:"etcd_cluster_size,omitempty"` +} + +func (x *ControlPlaneSpec) Reset() { + *x = ControlPlaneSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneSpec) ProtoMessage() {} + +func (x *ControlPlaneSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneSpec.ProtoReflect.Descriptor instead. +func (*ControlPlaneSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *ControlPlaneSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ControlPlaneSpec) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +func (x *ControlPlaneSpec) GetEndpoints() *ControlPlaneEndpointsSpec { + if x != nil { + return x.Endpoints + } + return nil +} + +func (x *ControlPlaneSpec) GetEtcdClusterSize() int64 { + if x != nil { + return x.EtcdClusterSize + } + return 0 +} + +type ControlPlaneEndpointsSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // PublicEndpointSpec is a specification of public endpoint for control plane. + PublicEndpoint *PublicEndpointSpec `protobuf:"bytes,1,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` +} + +func (x *ControlPlaneEndpointsSpec) Reset() { + *x = ControlPlaneEndpointsSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneEndpointsSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneEndpointsSpec) ProtoMessage() {} + +func (x *ControlPlaneEndpointsSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneEndpointsSpec.ProtoReflect.Descriptor instead. +func (*ControlPlaneEndpointsSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *ControlPlaneEndpointsSpec) GetPublicEndpoint() *PublicEndpointSpec { + if x != nil { + return x.PublicEndpoint + } + return nil +} + +type PublicEndpointSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublicEndpointSpec) Reset() { + *x = PublicEndpointSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicEndpointSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicEndpointSpec) ProtoMessage() {} + +func (x *PublicEndpointSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicEndpointSpec.ProtoReflect.Descriptor instead. +func (*PublicEndpointSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{4} +} + +type KubeNetworkSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR blocks for Service ClusterIP allocation. For now, only one value is supported. + // For now, value should be in prefix length form (such as "/16"). + // Later a CIDR-formatted string (such as "10.1.2.0/16") will be supported. + // In case of prefix length, certain CIDR is auto allocated. + // Specified CIDR blocks will be reserved in Cluster.spec.control_plane.subnet_id to prevent address duplication. + // Allowed prefix length is from "/12" to "/28". + // Empty value treated as ["/16"]. + ServiceCidrs []string `protobuf:"bytes,1,rep,name=service_cidrs,json=serviceCidrs,proto3" json:"service_cidrs,omitempty"` +} + +func (x *KubeNetworkSpec) Reset() { + *x = KubeNetworkSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KubeNetworkSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KubeNetworkSpec) ProtoMessage() {} + +func (x *KubeNetworkSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KubeNetworkSpec.ProtoReflect.Descriptor instead. +func (*KubeNetworkSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{5} +} + +func (x *KubeNetworkSpec) GetServiceCidrs() []string { + if x != nil { + return x.ServiceCidrs + } + return nil +} + +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State ClusterStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.mk8s.v1.ClusterStatus_State" json:"state,omitempty"` + ControlPlane *ControlPlaneStatus `protobuf:"bytes,2,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` + // Show that changes are in flight + Reconciling bool `protobuf:"varint,100,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{6} +} + +func (x *ClusterStatus) GetState() ClusterStatus_State { + if x != nil { + return x.State + } + return ClusterStatus_STATE_UNSPECIFIED +} + +func (x *ClusterStatus) GetControlPlane() *ControlPlaneStatus { + if x != nil { + return x.ControlPlane + } + return nil +} + +func (x *ClusterStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +type ControlPlaneStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version have format `major.minor.patch-nebius-cp.n` like "1.30.0-nebius-cp.3". + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Endpoints *ControlPlaneStatusEndpoints `protobuf:"bytes,2,opt,name=endpoints,proto3" json:"endpoints,omitempty"` + Auth *ControlPlaneStatusAuth `protobuf:"bytes,100,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *ControlPlaneStatus) Reset() { + *x = ControlPlaneStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatus) ProtoMessage() {} + +func (x *ControlPlaneStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatus.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{7} +} + +func (x *ControlPlaneStatus) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ControlPlaneStatus) GetEndpoints() *ControlPlaneStatusEndpoints { + if x != nil { + return x.Endpoints + } + return nil +} + +func (x *ControlPlaneStatus) GetAuth() *ControlPlaneStatusAuth { + if x != nil { + return x.Auth + } + return nil +} + +// Endpoints of Kubernetes control plane. Kubernetes API can be accessed at `https://endpoint/`. +type ControlPlaneStatusEndpoints struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DNS name or IP address accessible from the Internet. + PublicEndpoint string `protobuf:"bytes,1,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` + // DNS name or IP address accessible from the user VPC. + PrivateEndpoint string `protobuf:"bytes,2,opt,name=private_endpoint,json=privateEndpoint,proto3" json:"private_endpoint,omitempty"` +} + +func (x *ControlPlaneStatusEndpoints) Reset() { + *x = ControlPlaneStatusEndpoints{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatusEndpoints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatusEndpoints) ProtoMessage() {} + +func (x *ControlPlaneStatusEndpoints) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatusEndpoints.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatusEndpoints) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{8} +} + +func (x *ControlPlaneStatusEndpoints) GetPublicEndpoint() string { + if x != nil { + return x.PublicEndpoint + } + return "" +} + +func (x *ControlPlaneStatusEndpoints) GetPrivateEndpoint() string { + if x != nil { + return x.PrivateEndpoint + } + return "" +} + +type ControlPlaneStatusAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterCaCertificate string `protobuf:"bytes,1,opt,name=cluster_ca_certificate,json=clusterCaCertificate,proto3" json:"cluster_ca_certificate,omitempty"` +} + +func (x *ControlPlaneStatusAuth) Reset() { + *x = ControlPlaneStatusAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatusAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatusAuth) ProtoMessage() {} + +func (x *ControlPlaneStatusAuth) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatusAuth.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatusAuth) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_proto_rawDescGZIP(), []int{9} +} + +func (x *ControlPlaneStatusAuth) GetClusterCaCertificate() string { + if x != nil { + return x.ClusterCaCertificate + } + return "" +} + +var File_nebius_mk8s_v1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x0b, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x6b, 0x75, 0x62, + 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0xca, 0x01, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x09, + 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x08, 0x73, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2a, + 0x0a, 0x11, 0x65, 0x74, 0x63, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65, 0x74, 0x63, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x6e, 0x0a, 0x19, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x51, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x12, 0xbf, 0x01, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x99, 0x01, 0xba, + 0x48, 0x91, 0x01, 0xba, 0x01, 0x88, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x45, 0x65, 0x61, 0x63, 0x68, + 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x61, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x62, 0x65, + 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x2f, 0x31, 0x32, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x2f, 0x32, + 0x38, 0x1a, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x78, 0x2c, 0x20, 0x78, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x31, 0x5b, 0x32, + 0x2d, 0x39, 0x5d, 0x7c, 0x32, 0x5b, 0x30, 0x2d, 0x38, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x29, 0x92, + 0x01, 0x02, 0x10, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x69, 0x64, 0x72, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x4b, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, + 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x22, 0xb5, 0x01, 0x0a, 0x12, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x09, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, + 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, + 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x22, 0x71, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, + 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x4e, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x5f, 0x63, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x14, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x55, 0x0a, 0x15, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1_cluster_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1_cluster_proto_rawDescData = file_nebius_mk8s_v1_cluster_proto_rawDesc +) + +func file_nebius_mk8s_v1_cluster_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1_cluster_proto_rawDescData) + }) + return file_nebius_mk8s_v1_cluster_proto_rawDescData +} + +var file_nebius_mk8s_v1_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_mk8s_v1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_nebius_mk8s_v1_cluster_proto_goTypes = []any{ + (ClusterStatus_State)(0), // 0: nebius.mk8s.v1.ClusterStatus.State + (*Cluster)(nil), // 1: nebius.mk8s.v1.Cluster + (*ClusterSpec)(nil), // 2: nebius.mk8s.v1.ClusterSpec + (*ControlPlaneSpec)(nil), // 3: nebius.mk8s.v1.ControlPlaneSpec + (*ControlPlaneEndpointsSpec)(nil), // 4: nebius.mk8s.v1.ControlPlaneEndpointsSpec + (*PublicEndpointSpec)(nil), // 5: nebius.mk8s.v1.PublicEndpointSpec + (*KubeNetworkSpec)(nil), // 6: nebius.mk8s.v1.KubeNetworkSpec + (*ClusterStatus)(nil), // 7: nebius.mk8s.v1.ClusterStatus + (*ControlPlaneStatus)(nil), // 8: nebius.mk8s.v1.ControlPlaneStatus + (*ControlPlaneStatusEndpoints)(nil), // 9: nebius.mk8s.v1.ControlPlaneStatusEndpoints + (*ControlPlaneStatusAuth)(nil), // 10: nebius.mk8s.v1.ControlPlaneStatusAuth + (*v1.ResourceMetadata)(nil), // 11: nebius.common.v1.ResourceMetadata +} +var file_nebius_mk8s_v1_cluster_proto_depIdxs = []int32{ + 11, // 0: nebius.mk8s.v1.Cluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.mk8s.v1.Cluster.spec:type_name -> nebius.mk8s.v1.ClusterSpec + 7, // 2: nebius.mk8s.v1.Cluster.status:type_name -> nebius.mk8s.v1.ClusterStatus + 3, // 3: nebius.mk8s.v1.ClusterSpec.control_plane:type_name -> nebius.mk8s.v1.ControlPlaneSpec + 6, // 4: nebius.mk8s.v1.ClusterSpec.kube_network:type_name -> nebius.mk8s.v1.KubeNetworkSpec + 4, // 5: nebius.mk8s.v1.ControlPlaneSpec.endpoints:type_name -> nebius.mk8s.v1.ControlPlaneEndpointsSpec + 5, // 6: nebius.mk8s.v1.ControlPlaneEndpointsSpec.public_endpoint:type_name -> nebius.mk8s.v1.PublicEndpointSpec + 0, // 7: nebius.mk8s.v1.ClusterStatus.state:type_name -> nebius.mk8s.v1.ClusterStatus.State + 8, // 8: nebius.mk8s.v1.ClusterStatus.control_plane:type_name -> nebius.mk8s.v1.ControlPlaneStatus + 9, // 9: nebius.mk8s.v1.ControlPlaneStatus.endpoints:type_name -> nebius.mk8s.v1.ControlPlaneStatusEndpoints + 10, // 10: nebius.mk8s.v1.ControlPlaneStatus.auth:type_name -> nebius.mk8s.v1.ControlPlaneStatusAuth + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1_cluster_proto_init() } +func file_nebius_mk8s_v1_cluster_proto_init() { + if File_nebius_mk8s_v1_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneEndpointsSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*PublicEndpointSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*KubeNetworkSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatusEndpoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatusAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1_cluster_proto_rawDesc, + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1_cluster_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1_cluster_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1_cluster_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1_cluster_proto = out.File + file_nebius_mk8s_v1_cluster_proto_rawDesc = nil + file_nebius_mk8s_v1_cluster_proto_goTypes = nil + file_nebius_mk8s_v1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1/cluster.sensitive.pb.go b/proto/nebius/mk8s/v1/cluster.sensitive.pb.go new file mode 100644 index 0000000..6f79a42 --- /dev/null +++ b/proto/nebius/mk8s/v1/cluster.sensitive.pb.go @@ -0,0 +1,33 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Cluster) Sanitize() // is not generated as no sensitive fields found +// func (x *Cluster) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneEndpointsSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneEndpointsSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicEndpointSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicEndpointSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *KubeNetworkSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *KubeNetworkSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatusEndpoints) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatusEndpoints) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatusAuth) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatusAuth) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1/cluster_service.pb.go b/proto/nebius/mk8s/v1/cluster_service.pb.go new file mode 100644 index 0000000..3cb0bdf --- /dev/null +++ b/proto/nebius/mk8s/v1/cluster_service.pb.go @@ -0,0 +1,604 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1/cluster_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` +} + +func (x *GetClusterRequest) Reset() { + *x = GetClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterRequest) ProtoMessage() {} + +func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. +func (*GetClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetClusterRequest) GetResourceVersion() string { + if x != nil { + return x.ResourceVersion + } + return "" +} + +type ListClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the IAM container we are listing the resources in. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListClustersRequest) Reset() { + *x = ListClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersRequest) ProtoMessage() {} + +func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. +func (*ListClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Cluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListClustersResponse) Reset() { + *x = ListClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersResponse) ProtoMessage() {} + +func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. +func (*ListClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListClustersResponse) GetItems() []*Cluster { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the instance. + // Includes ID of the instance to update. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Updated specifications for the instance. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateClusterRequest) Reset() { + *x = UpdateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateClusterRequest) ProtoMessage() {} + +func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteClusterRequest) Reset() { + *x = DeleteClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterRequest) ProtoMessage() {} + +func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_mk8s_v1_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, + 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x56, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6d, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8f, 0x01, + 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, + 0x2e, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, + 0xd7, 0x03, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x41, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x06, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5c, 0x0a, 0x15, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1_cluster_service_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1_cluster_service_proto_rawDescData = file_nebius_mk8s_v1_cluster_service_proto_rawDesc +) + +func file_nebius_mk8s_v1_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1_cluster_service_proto_rawDescData) + }) + return file_nebius_mk8s_v1_cluster_service_proto_rawDescData +} + +var file_nebius_mk8s_v1_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_mk8s_v1_cluster_service_proto_goTypes = []any{ + (*CreateClusterRequest)(nil), // 0: nebius.mk8s.v1.CreateClusterRequest + (*GetClusterRequest)(nil), // 1: nebius.mk8s.v1.GetClusterRequest + (*ListClustersRequest)(nil), // 2: nebius.mk8s.v1.ListClustersRequest + (*ListClustersResponse)(nil), // 3: nebius.mk8s.v1.ListClustersResponse + (*UpdateClusterRequest)(nil), // 4: nebius.mk8s.v1.UpdateClusterRequest + (*DeleteClusterRequest)(nil), // 5: nebius.mk8s.v1.DeleteClusterRequest + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*ClusterSpec)(nil), // 7: nebius.mk8s.v1.ClusterSpec + (*Cluster)(nil), // 8: nebius.mk8s.v1.Cluster + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*v1.Operation)(nil), // 10: nebius.common.v1.Operation +} +var file_nebius_mk8s_v1_cluster_service_proto_depIdxs = []int32{ + 6, // 0: nebius.mk8s.v1.CreateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 1: nebius.mk8s.v1.CreateClusterRequest.spec:type_name -> nebius.mk8s.v1.ClusterSpec + 8, // 2: nebius.mk8s.v1.ListClustersResponse.items:type_name -> nebius.mk8s.v1.Cluster + 6, // 3: nebius.mk8s.v1.UpdateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 4: nebius.mk8s.v1.UpdateClusterRequest.spec:type_name -> nebius.mk8s.v1.ClusterSpec + 1, // 5: nebius.mk8s.v1.ClusterService.Get:input_type -> nebius.mk8s.v1.GetClusterRequest + 9, // 6: nebius.mk8s.v1.ClusterService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 2, // 7: nebius.mk8s.v1.ClusterService.List:input_type -> nebius.mk8s.v1.ListClustersRequest + 0, // 8: nebius.mk8s.v1.ClusterService.Create:input_type -> nebius.mk8s.v1.CreateClusterRequest + 4, // 9: nebius.mk8s.v1.ClusterService.Update:input_type -> nebius.mk8s.v1.UpdateClusterRequest + 5, // 10: nebius.mk8s.v1.ClusterService.Delete:input_type -> nebius.mk8s.v1.DeleteClusterRequest + 8, // 11: nebius.mk8s.v1.ClusterService.Get:output_type -> nebius.mk8s.v1.Cluster + 8, // 12: nebius.mk8s.v1.ClusterService.GetByName:output_type -> nebius.mk8s.v1.Cluster + 3, // 13: nebius.mk8s.v1.ClusterService.List:output_type -> nebius.mk8s.v1.ListClustersResponse + 10, // 14: nebius.mk8s.v1.ClusterService.Create:output_type -> nebius.common.v1.Operation + 10, // 15: nebius.mk8s.v1.ClusterService.Update:output_type -> nebius.common.v1.Operation + 10, // 16: nebius.mk8s.v1.ClusterService.Delete:output_type -> nebius.common.v1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1_cluster_service_proto_init() } +func file_nebius_mk8s_v1_cluster_service_proto_init() { + if File_nebius_mk8s_v1_cluster_service_proto != nil { + return + } + file_nebius_mk8s_v1_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_mk8s_v1_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_mk8s_v1_cluster_service_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1_cluster_service_proto = out.File + file_nebius_mk8s_v1_cluster_service_proto_rawDesc = nil + file_nebius_mk8s_v1_cluster_service_proto_goTypes = nil + file_nebius_mk8s_v1_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1/cluster_service.sensitive.pb.go b/proto/nebius/mk8s/v1/cluster_service.sensitive.pb.go new file mode 100644 index 0000000..c558a4e --- /dev/null +++ b/proto/nebius/mk8s/v1/cluster_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CreateClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1/cluster_service_grpc.pb.go b/proto/nebius/mk8s/v1/cluster_service_grpc.pb.go new file mode 100644 index 0000000..c111a22 --- /dev/null +++ b/proto/nebius/mk8s/v1/cluster_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/mk8s/v1/cluster_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterService_Get_FullMethodName = "/nebius.mk8s.v1.ClusterService/Get" + ClusterService_GetByName_FullMethodName = "/nebius.mk8s.v1.ClusterService/GetByName" + ClusterService_List_FullMethodName = "/nebius.mk8s.v1.ClusterService/List" + ClusterService_Create_FullMethodName = "/nebius.mk8s.v1.ClusterService/Create" + ClusterService_Update_FullMethodName = "/nebius.mk8s.v1.ClusterService/Update" + ClusterService_Delete_FullMethodName = "/nebius.mk8s.v1.ClusterService/Delete" +) + +// ClusterServiceClient is the client API for ClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterServiceClient interface { + Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Cluster, error) + List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { + out := new(ListClustersResponse) + err := c.cc.Invoke(ctx, ClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + Get(context.Context, *GetClusterRequest) (*Cluster, error) + GetByName(context.Context, *v1.GetByNameRequest) (*Cluster, error) + List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) + Create(context.Context, *CreateClusterRequest) (*v1.Operation, error) + Update(context.Context, *UpdateClusterRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteClusterRequest) (*v1.Operation, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Get(context.Context, *GetClusterRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedClusterServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Update(context.Context, *UpdateClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *DeleteClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Get(ctx, req.(*GetClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ListClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Update(ctx, req.(*UpdateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*DeleteClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.mk8s.v1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _ClusterService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/mk8s/v1/cluster_service.proto", +} diff --git a/proto/nebius/mk8s/v1/instance_template.pb.go b/proto/nebius/mk8s/v1/instance_template.pb.go new file mode 100644 index 0000000..73ee943 --- /dev/null +++ b/proto/nebius/mk8s/v1/instance_template.pb.go @@ -0,0 +1,418 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1/instance_template.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DiskSpec_DiskType int32 + +const ( + DiskSpec_UNSPECIFIED DiskSpec_DiskType = 0 + // the list of available types will be clarified later, it is not final version + DiskSpec_NETWORK_SSD DiskSpec_DiskType = 1 + DiskSpec_NETWORK_HDD DiskSpec_DiskType = 2 + DiskSpec_NETWORK_SSD_IO_M3 DiskSpec_DiskType = 3 + DiskSpec_NETWORK_SSD_NON_REPLICATED DiskSpec_DiskType = 4 +) + +// Enum value maps for DiskSpec_DiskType. +var ( + DiskSpec_DiskType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + 3: "NETWORK_SSD_IO_M3", + 4: "NETWORK_SSD_NON_REPLICATED", + } + DiskSpec_DiskType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + "NETWORK_SSD_IO_M3": 3, + "NETWORK_SSD_NON_REPLICATED": 4, + } +) + +func (x DiskSpec_DiskType) Enum() *DiskSpec_DiskType { + p := new(DiskSpec_DiskType) + *p = x + return p +} + +func (x DiskSpec_DiskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskSpec_DiskType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1_instance_template_proto_enumTypes[0].Descriptor() +} + +func (DiskSpec_DiskType) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1_instance_template_proto_enumTypes[0] +} + +func (x DiskSpec_DiskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskSpec_DiskType.Descriptor instead. +func (DiskSpec_DiskType) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_instance_template_proto_rawDescGZIP(), []int{0, 0} +} + +type DiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *DiskSpec_SizeBytes + // *DiskSpec_SizeKibibytes + // *DiskSpec_SizeMebibytes + // *DiskSpec_SizeGibibytes + Size isDiskSpec_Size `protobuf_oneof:"size"` + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + Type DiskSpec_DiskType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.mk8s.v1.DiskSpec_DiskType" json:"type,omitempty"` +} + +func (x *DiskSpec) Reset() { + *x = DiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_instance_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskSpec) ProtoMessage() {} + +func (x *DiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_instance_template_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskSpec.ProtoReflect.Descriptor instead. +func (*DiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_instance_template_proto_rawDescGZIP(), []int{0} +} + +func (m *DiskSpec) GetSize() isDiskSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *DiskSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +func (x *DiskSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +func (x *DiskSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +func (x *DiskSpec) GetType() DiskSpec_DiskType { + if x != nil { + return x.Type + } + return DiskSpec_UNSPECIFIED +} + +type isDiskSpec_Size interface { + isDiskSpec_Size() +} + +type DiskSpec_SizeBytes struct { + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type DiskSpec_SizeKibibytes struct { + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type DiskSpec_SizeMebibytes struct { + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type DiskSpec_SizeGibibytes struct { + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*DiskSpec_SizeBytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeKibibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeMebibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeGibibytes) isDiskSpec_Size() {} + +type ResourcesSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + // Types that are assignable to Size: + // + // *ResourcesSpec_Preset + Size isResourcesSpec_Size `protobuf_oneof:"size"` +} + +func (x *ResourcesSpec) Reset() { + *x = ResourcesSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_instance_template_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesSpec) ProtoMessage() {} + +func (x *ResourcesSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_instance_template_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesSpec.ProtoReflect.Descriptor instead. +func (*ResourcesSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_instance_template_proto_rawDescGZIP(), []int{1} +} + +func (x *ResourcesSpec) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (m *ResourcesSpec) GetSize() isResourcesSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *ResourcesSpec) GetPreset() string { + if x, ok := x.GetSize().(*ResourcesSpec_Preset); ok { + return x.Preset + } + return "" +} + +type isResourcesSpec_Size interface { + isResourcesSpec_Size() +} + +type ResourcesSpec_Preset struct { + Preset string `protobuf:"bytes,2,opt,name=preset,proto3,oneof"` +} + +func (*ResourcesSpec_Preset) isResourcesSpec_Size() {} + +var File_nebius_mk8s_v1_instance_template_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1_instance_template_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x92, 0x03, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0a, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, + 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4b, 0x69, 0x62, + 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, + 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x27, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, + 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x74, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, + 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, + 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x48, 0x44, 0x44, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x49, 0x4f, + 0x5f, 0x4d, 0x33, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, + 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x04, 0x42, 0x0d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0x5c, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, + 0x08, 0x01, 0x42, 0x5e, 0x0a, 0x15, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1_instance_template_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1_instance_template_proto_rawDescData = file_nebius_mk8s_v1_instance_template_proto_rawDesc +) + +func file_nebius_mk8s_v1_instance_template_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1_instance_template_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1_instance_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1_instance_template_proto_rawDescData) + }) + return file_nebius_mk8s_v1_instance_template_proto_rawDescData +} + +var file_nebius_mk8s_v1_instance_template_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_mk8s_v1_instance_template_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_mk8s_v1_instance_template_proto_goTypes = []any{ + (DiskSpec_DiskType)(0), // 0: nebius.mk8s.v1.DiskSpec.DiskType + (*DiskSpec)(nil), // 1: nebius.mk8s.v1.DiskSpec + (*ResourcesSpec)(nil), // 2: nebius.mk8s.v1.ResourcesSpec +} +var file_nebius_mk8s_v1_instance_template_proto_depIdxs = []int32{ + 0, // 0: nebius.mk8s.v1.DiskSpec.type:type_name -> nebius.mk8s.v1.DiskSpec.DiskType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1_instance_template_proto_init() } +func file_nebius_mk8s_v1_instance_template_proto_init() { + if File_nebius_mk8s_v1_instance_template_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1_instance_template_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*DiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_instance_template_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ResourcesSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1_instance_template_proto_msgTypes[0].OneofWrappers = []any{ + (*DiskSpec_SizeBytes)(nil), + (*DiskSpec_SizeKibibytes)(nil), + (*DiskSpec_SizeMebibytes)(nil), + (*DiskSpec_SizeGibibytes)(nil), + } + file_nebius_mk8s_v1_instance_template_proto_msgTypes[1].OneofWrappers = []any{ + (*ResourcesSpec_Preset)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1_instance_template_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1_instance_template_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1_instance_template_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1_instance_template_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1_instance_template_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1_instance_template_proto = out.File + file_nebius_mk8s_v1_instance_template_proto_rawDesc = nil + file_nebius_mk8s_v1_instance_template_proto_goTypes = nil + file_nebius_mk8s_v1_instance_template_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1/instance_template.sensitive.pb.go b/proto/nebius/mk8s/v1/instance_template.sensitive.pb.go new file mode 100644 index 0000000..8091c86 --- /dev/null +++ b/proto/nebius/mk8s/v1/instance_template.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *DiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourcesSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourcesSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1/node_group.pb.go b/proto/nebius/mk8s/v1/node_group.pb.go new file mode 100644 index 0000000..8f16dbb --- /dev/null +++ b/proto/nebius/mk8s/v1/node_group.pb.go @@ -0,0 +1,1668 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1/node_group.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AttachedFilesystemSpec_AttachMode int32 + +const ( + AttachedFilesystemSpec_UNSPECIFIED AttachedFilesystemSpec_AttachMode = 0 + AttachedFilesystemSpec_READ_ONLY AttachedFilesystemSpec_AttachMode = 1 + AttachedFilesystemSpec_READ_WRITE AttachedFilesystemSpec_AttachMode = 2 +) + +// Enum value maps for AttachedFilesystemSpec_AttachMode. +var ( + AttachedFilesystemSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedFilesystemSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedFilesystemSpec_AttachMode) Enum() *AttachedFilesystemSpec_AttachMode { + p := new(AttachedFilesystemSpec_AttachMode) + *p = x + return p +} + +func (x AttachedFilesystemSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedFilesystemSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1_node_group_proto_enumTypes[0].Descriptor() +} + +func (AttachedFilesystemSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1_node_group_proto_enumTypes[0] +} + +func (x AttachedFilesystemSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedFilesystemSpec_AttachMode.Descriptor instead. +func (AttachedFilesystemSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{7, 0} +} + +type NodeTaint_Effect int32 + +const ( + NodeTaint_EFFECT_UNSPECIFIED NodeTaint_Effect = 0 + NodeTaint_NO_EXECUTE NodeTaint_Effect = 1 + NodeTaint_NO_SCHEDULE NodeTaint_Effect = 2 + NodeTaint_PREFER_NO_SCHEDULE NodeTaint_Effect = 3 +) + +// Enum value maps for NodeTaint_Effect. +var ( + NodeTaint_Effect_name = map[int32]string{ + 0: "EFFECT_UNSPECIFIED", + 1: "NO_EXECUTE", + 2: "NO_SCHEDULE", + 3: "PREFER_NO_SCHEDULE", + } + NodeTaint_Effect_value = map[string]int32{ + "EFFECT_UNSPECIFIED": 0, + "NO_EXECUTE": 1, + "NO_SCHEDULE": 2, + "PREFER_NO_SCHEDULE": 3, + } +) + +func (x NodeTaint_Effect) Enum() *NodeTaint_Effect { + p := new(NodeTaint_Effect) + *p = x + return p +} + +func (x NodeTaint_Effect) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeTaint_Effect) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1_node_group_proto_enumTypes[1].Descriptor() +} + +func (NodeTaint_Effect) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1_node_group_proto_enumTypes[1] +} + +func (x NodeTaint_Effect) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeTaint_Effect.Descriptor instead. +func (NodeTaint_Effect) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{10, 0} +} + +type NodeGroupStatus_State int32 + +const ( + NodeGroupStatus_STATE_UNSPECIFIED NodeGroupStatus_State = 0 + NodeGroupStatus_PROVISIONING NodeGroupStatus_State = 1 + NodeGroupStatus_RUNNING NodeGroupStatus_State = 2 + NodeGroupStatus_DELETING NodeGroupStatus_State = 3 +) + +// Enum value maps for NodeGroupStatus_State. +var ( + NodeGroupStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PROVISIONING", + 2: "RUNNING", + 3: "DELETING", + } + NodeGroupStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "DELETING": 3, + } +) + +func (x NodeGroupStatus_State) Enum() *NodeGroupStatus_State { + p := new(NodeGroupStatus_State) + *p = x + return p +} + +func (x NodeGroupStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeGroupStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1_node_group_proto_enumTypes[2].Descriptor() +} + +func (NodeGroupStatus_State) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1_node_group_proto_enumTypes[2] +} + +func (x NodeGroupStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeGroupStatus_State.Descriptor instead. +func (NodeGroupStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{13, 0} +} + +// NodeGroup represents Kubernetes node pool +type NodeGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // the parent_id is an ID of Cluster + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *NodeGroupStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *NodeGroup) Reset() { + *x = NodeGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroup) ProtoMessage() {} + +func (x *NodeGroup) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroup.ProtoReflect.Descriptor instead. +func (*NodeGroup) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeGroup) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *NodeGroup) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *NodeGroup) GetStatus() *NodeGroupStatus { + if x != nil { + return x.Status + } + return nil +} + +type NodeGroupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version is desired Kubernetes version of the cluster. For now only acceptable format is + // `MAJOR.MINOR` like "1.30". Option for patch version update will be added later. + // By default the cluster control plane MAJOR.MINOR version will be used. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Types that are assignable to Size: + // + // *NodeGroupSpec_FixedNodeCount + // *NodeGroupSpec_Autoscaling + Size isNodeGroupSpec_Size `protobuf_oneof:"size"` + Template *NodeTemplate `protobuf:"bytes,3,opt,name=template,proto3" json:"template,omitempty"` + Strategy *NodeGroupDeploymentStrategy `protobuf:"bytes,4,opt,name=strategy,proto3" json:"strategy,omitempty"` +} + +func (x *NodeGroupSpec) Reset() { + *x = NodeGroupSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupSpec) ProtoMessage() {} + +func (x *NodeGroupSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupSpec.ProtoReflect.Descriptor instead. +func (*NodeGroupSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{1} +} + +func (x *NodeGroupSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (m *NodeGroupSpec) GetSize() isNodeGroupSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *NodeGroupSpec) GetFixedNodeCount() int64 { + if x, ok := x.GetSize().(*NodeGroupSpec_FixedNodeCount); ok { + return x.FixedNodeCount + } + return 0 +} + +func (x *NodeGroupSpec) GetAutoscaling() *NodeGroupAutoscalingSpec { + if x, ok := x.GetSize().(*NodeGroupSpec_Autoscaling); ok { + return x.Autoscaling + } + return nil +} + +func (x *NodeGroupSpec) GetTemplate() *NodeTemplate { + if x != nil { + return x.Template + } + return nil +} + +func (x *NodeGroupSpec) GetStrategy() *NodeGroupDeploymentStrategy { + if x != nil { + return x.Strategy + } + return nil +} + +type isNodeGroupSpec_Size interface { + isNodeGroupSpec_Size() +} + +type NodeGroupSpec_FixedNodeCount struct { + FixedNodeCount int64 `protobuf:"varint,2,opt,name=fixed_node_count,json=fixedNodeCount,proto3,oneof"` // number of nodes in the group +} + +type NodeGroupSpec_Autoscaling struct { + Autoscaling *NodeGroupAutoscalingSpec `protobuf:"bytes,5,opt,name=autoscaling,proto3,oneof"` +} + +func (*NodeGroupSpec_FixedNodeCount) isNodeGroupSpec_Size() {} + +func (*NodeGroupSpec_Autoscaling) isNodeGroupSpec_Size() {} + +type NodeTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *NodeMetadataTemplate `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Taints []*NodeTaint `protobuf:"bytes,2,rep,name=taints,proto3" json:"taints,omitempty"` + Resources *ResourcesSpec `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` + BootDisk *DiskSpec `protobuf:"bytes,9,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + GpuCluster *GpuClusterSpec `protobuf:"bytes,4,opt,name=gpu_cluster,json=gpuCluster,proto3" json:"gpu_cluster,omitempty"` + NetworkInterfaces []*NetworkInterfaceTemplate `protobuf:"bytes,5,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + Filesystems []*AttachedFilesystemSpec `protobuf:"bytes,7,rep,name=filesystems,proto3" json:"filesystems,omitempty"` + // cloud-init user-data. Must contain at least one SSH key. + CloudInitUserData string `protobuf:"bytes,6,opt,name=cloud_init_user_data,json=cloudInitUserData,proto3" json:"cloud_init_user_data,omitempty"` + // the Nebius service account whose credentials will be available on the nodes of the group. + // With these credentials, it is possible to make `npc` or public API requests from the nodes without the need for extra authentication. + // This service account is also used to make requests to container registry. + // + // `resource.serviceaccount.issueAccessToken` permission is required to use this field. + ServiceAccountId string `protobuf:"bytes,10,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` +} + +func (x *NodeTemplate) Reset() { + *x = NodeTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeTemplate) ProtoMessage() {} + +func (x *NodeTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeTemplate.ProtoReflect.Descriptor instead. +func (*NodeTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{2} +} + +func (x *NodeTemplate) GetMetadata() *NodeMetadataTemplate { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *NodeTemplate) GetTaints() []*NodeTaint { + if x != nil { + return x.Taints + } + return nil +} + +func (x *NodeTemplate) GetResources() *ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (x *NodeTemplate) GetBootDisk() *DiskSpec { + if x != nil { + return x.BootDisk + } + return nil +} + +func (x *NodeTemplate) GetGpuCluster() *GpuClusterSpec { + if x != nil { + return x.GpuCluster + } + return nil +} + +func (x *NodeTemplate) GetNetworkInterfaces() []*NetworkInterfaceTemplate { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +func (x *NodeTemplate) GetFilesystems() []*AttachedFilesystemSpec { + if x != nil { + return x.Filesystems + } + return nil +} + +func (x *NodeTemplate) GetCloudInitUserData() string { + if x != nil { + return x.CloudInitUserData + } + return "" +} + +func (x *NodeTemplate) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +type NodeMetadataTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Labels will be propagated into nodes metadata. + // System labels containing "kubernetes.io" and "k8s.io" will not be propagated. + // On update labels they will not be updated in nodes right away, only on node group update. + Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *NodeMetadataTemplate) Reset() { + *x = NodeMetadataTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeMetadataTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeMetadataTemplate) ProtoMessage() {} + +func (x *NodeMetadataTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeMetadataTemplate.ProtoReflect.Descriptor instead. +func (*NodeMetadataTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{3} +} + +func (x *NodeMetadataTemplate) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type GpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GpuClusterSpec) Reset() { + *x = GpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterSpec) ProtoMessage() {} + +func (x *GpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterSpec.ProtoReflect.Descriptor instead. +func (*GpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{4} +} + +func (x *GpuClusterSpec) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type NetworkInterfaceTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Public IPv4 address associated with the interface. + PublicIpAddress *PublicIPAddress `protobuf:"bytes,1,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` + // Subnet ID that will be attached to a node cloud intstance network interface. + // By default control plane subnet_id used. + // Subnet should be located in the same network with control plane and have same parent ID as cluster. + SubnetId string `protobuf:"bytes,3,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` +} + +func (x *NetworkInterfaceTemplate) Reset() { + *x = NetworkInterfaceTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceTemplate) ProtoMessage() {} + +func (x *NetworkInterfaceTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceTemplate.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{5} +} + +func (x *NetworkInterfaceTemplate) GetPublicIpAddress() *PublicIPAddress { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +func (x *NetworkInterfaceTemplate) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +// Describes a public IP address. +type PublicIPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublicIPAddress) Reset() { + *x = PublicIPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddress) ProtoMessage() {} + +func (x *PublicIPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddress.ProtoReflect.Descriptor instead. +func (*PublicIPAddress) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{6} +} + +type AttachedFilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttachMode AttachedFilesystemSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.mk8s.v1.AttachedFilesystemSpec_AttachMode" json:"attach_mode,omitempty"` + // Specifies the user-defined identifier, allowing to use it as a device in mount command. + MountTag string `protobuf:"bytes,2,opt,name=mount_tag,json=mountTag,proto3" json:"mount_tag,omitempty"` + // Types that are assignable to Type: + // + // *AttachedFilesystemSpec_ExistingFilesystem + Type isAttachedFilesystemSpec_Type `protobuf_oneof:"type"` +} + +func (x *AttachedFilesystemSpec) Reset() { + *x = AttachedFilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedFilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedFilesystemSpec) ProtoMessage() {} + +func (x *AttachedFilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedFilesystemSpec.ProtoReflect.Descriptor instead. +func (*AttachedFilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{7} +} + +func (x *AttachedFilesystemSpec) GetAttachMode() AttachedFilesystemSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedFilesystemSpec_UNSPECIFIED +} + +func (x *AttachedFilesystemSpec) GetMountTag() string { + if x != nil { + return x.MountTag + } + return "" +} + +func (m *AttachedFilesystemSpec) GetType() isAttachedFilesystemSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *AttachedFilesystemSpec) GetExistingFilesystem() *ExistingFilesystem { + if x, ok := x.GetType().(*AttachedFilesystemSpec_ExistingFilesystem); ok { + return x.ExistingFilesystem + } + return nil +} + +type isAttachedFilesystemSpec_Type interface { + isAttachedFilesystemSpec_Type() +} + +type AttachedFilesystemSpec_ExistingFilesystem struct { + ExistingFilesystem *ExistingFilesystem `protobuf:"bytes,3,opt,name=existing_filesystem,json=existingFilesystem,proto3,oneof"` +} + +func (*AttachedFilesystemSpec_ExistingFilesystem) isAttachedFilesystemSpec_Type() {} + +type ExistingFilesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingFilesystem) Reset() { + *x = ExistingFilesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingFilesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingFilesystem) ProtoMessage() {} + +func (x *ExistingFilesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingFilesystem.ProtoReflect.Descriptor instead. +func (*ExistingFilesystem) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{8} +} + +func (x *ExistingFilesystem) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type NodeGroupAutoscalingSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MinNodeCount int64 `protobuf:"varint,1,opt,name=min_node_count,json=minNodeCount,proto3" json:"min_node_count,omitempty"` + MaxNodeCount int64 `protobuf:"varint,2,opt,name=max_node_count,json=maxNodeCount,proto3" json:"max_node_count,omitempty"` +} + +func (x *NodeGroupAutoscalingSpec) Reset() { + *x = NodeGroupAutoscalingSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupAutoscalingSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupAutoscalingSpec) ProtoMessage() {} + +func (x *NodeGroupAutoscalingSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupAutoscalingSpec.ProtoReflect.Descriptor instead. +func (*NodeGroupAutoscalingSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{9} +} + +func (x *NodeGroupAutoscalingSpec) GetMinNodeCount() int64 { + if x != nil { + return x.MinNodeCount + } + return 0 +} + +func (x *NodeGroupAutoscalingSpec) GetMaxNodeCount() int64 { + if x != nil { + return x.MaxNodeCount + } + return 0 +} + +// See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ +type NodeTaint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Effect NodeTaint_Effect `protobuf:"varint,3,opt,name=effect,proto3,enum=nebius.mk8s.v1.NodeTaint_Effect" json:"effect,omitempty"` +} + +func (x *NodeTaint) Reset() { + *x = NodeTaint{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeTaint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeTaint) ProtoMessage() {} + +func (x *NodeTaint) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeTaint.ProtoReflect.Descriptor instead. +func (*NodeTaint) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{10} +} + +func (x *NodeTaint) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *NodeTaint) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *NodeTaint) GetEffect() NodeTaint_Effect { + if x != nil { + return x.Effect + } + return NodeTaint_EFFECT_UNSPECIFIED +} + +type NodeGroupDeploymentStrategy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of machines that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired + // machines (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 0. + // Example: when this is set to 30%, the old MachineSet can be scaled + // down to 70% of desired machines immediately when the rolling update + // starts. Once new machines are ready, old MachineSet can be scaled + // down further, followed by scaling up the new MachineSet, ensuring + // that the total number of machines available at all times + // during the update is at least 70% of desired machines. + MaxUnavailable *PercentOrCount `protobuf:"bytes,1,opt,name=max_unavailable,json=maxUnavailable,proto3" json:"max_unavailable,omitempty"` + // The maximum number of machines that can be scheduled above the + // desired number of machines. + // Value can be an absolute number (ex: 5) or a percentage of + // desired machines (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 1. + // Example: when this is set to 30%, the new MachineSet can be scaled + // up immediately when the rolling update starts, such that the total + // number of old and new machines do not exceed 130% of desired + // machines. Once old machines have been killed, new MachineSet can + // be scaled up further, ensuring that total number of machines running + // at any time during the update is at most 130% of desired machines. + MaxSurge *PercentOrCount `protobuf:"bytes,2,opt,name=max_surge,json=maxSurge,proto3" json:"max_surge,omitempty"` + // DrainTimeout is the total amount of time that the service will spend on draining a node. + // By default, node can be drained without any time limitations. + // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + DrainTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=drain_timeout,json=drainTimeout,proto3" json:"drain_timeout,omitempty"` +} + +func (x *NodeGroupDeploymentStrategy) Reset() { + *x = NodeGroupDeploymentStrategy{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupDeploymentStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupDeploymentStrategy) ProtoMessage() {} + +func (x *NodeGroupDeploymentStrategy) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupDeploymentStrategy.ProtoReflect.Descriptor instead. +func (*NodeGroupDeploymentStrategy) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{11} +} + +func (x *NodeGroupDeploymentStrategy) GetMaxUnavailable() *PercentOrCount { + if x != nil { + return x.MaxUnavailable + } + return nil +} + +func (x *NodeGroupDeploymentStrategy) GetMaxSurge() *PercentOrCount { + if x != nil { + return x.MaxSurge + } + return nil +} + +func (x *NodeGroupDeploymentStrategy) GetDrainTimeout() *durationpb.Duration { + if x != nil { + return x.DrainTimeout + } + return nil +} + +type PercentOrCount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Value: + // + // *PercentOrCount_Percent + // *PercentOrCount_Count + Value isPercentOrCount_Value `protobuf_oneof:"value"` +} + +func (x *PercentOrCount) Reset() { + *x = PercentOrCount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PercentOrCount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PercentOrCount) ProtoMessage() {} + +func (x *PercentOrCount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PercentOrCount.ProtoReflect.Descriptor instead. +func (*PercentOrCount) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{12} +} + +func (m *PercentOrCount) GetValue() isPercentOrCount_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *PercentOrCount) GetPercent() int64 { + if x, ok := x.GetValue().(*PercentOrCount_Percent); ok { + return x.Percent + } + return 0 +} + +func (x *PercentOrCount) GetCount() int64 { + if x, ok := x.GetValue().(*PercentOrCount_Count); ok { + return x.Count + } + return 0 +} + +type isPercentOrCount_Value interface { + isPercentOrCount_Value() +} + +type PercentOrCount_Percent struct { + Percent int64 `protobuf:"varint,1,opt,name=percent,proto3,oneof"` +} + +type PercentOrCount_Count struct { + Count int64 `protobuf:"varint,2,opt,name=count,proto3,oneof"` +} + +func (*PercentOrCount_Percent) isPercentOrCount_Value() {} + +func (*PercentOrCount_Count) isPercentOrCount_Value() {} + +type NodeGroupStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State NodeGroupStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.mk8s.v1.NodeGroupStatus_State" json:"state,omitempty"` + // Version have format `MAJOR.MINOR.PATCH-nebius-node.n` like "1.30.0-nebius-node.10". + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // Desired total number of nodes that should be in the node group. + // It is either fixed_node_count or arbitrary number between min_node_count and max_node_count decided by autoscaler. + TargetNodeCount int64 `protobuf:"varint,3,opt,name=target_node_count,json=targetNodeCount,proto3" json:"target_node_count,omitempty"` + // Total number of nodes that are currently in the node group. + // Both ready and not ready nodes are counted. + NodeCount int64 `protobuf:"varint,4,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` + // Total number of nodes that has outdated node configuration. + // These nodes will be replaced by new nodes with up-to-date configuration. + OutdatedNodeCount int64 `protobuf:"varint,5,opt,name=outdated_node_count,json=outdatedNodeCount,proto3" json:"outdated_node_count,omitempty"` + // Total number of nodes that successfully joined the cluster and are ready to serve workloads. + // Both outdated and up-to-date nodes are counted. + ReadyNodeCount int64 `protobuf:"varint,6,opt,name=ready_node_count,json=readyNodeCount,proto3" json:"ready_node_count,omitempty"` + // Show that changes are in flight + Reconciling bool `protobuf:"varint,100,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *NodeGroupStatus) Reset() { + *x = NodeGroupStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupStatus) ProtoMessage() {} + +func (x *NodeGroupStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupStatus.ProtoReflect.Descriptor instead. +func (*NodeGroupStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_proto_rawDescGZIP(), []int{13} +} + +func (x *NodeGroupStatus) GetState() NodeGroupStatus_State { + if x != nil { + return x.State + } + return NodeGroupStatus_STATE_UNSPECIFIED +} + +func (x *NodeGroupStatus) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *NodeGroupStatus) GetTargetNodeCount() int64 { + if x != nil { + return x.TargetNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetOutdatedNodeCount() int64 { + if x != nil { + return x.OutdatedNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetReadyNodeCount() int64 { + if x != nil { + return x.ReadyNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_mk8s_v1_node_group_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1_node_group_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbd, 0x02, 0x0a, 0x0d, + 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x70, + 0x65, 0x63, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x12, 0x40, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0d, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xd3, 0x04, 0x0a, 0x0c, + 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, + 0x0a, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x64, + 0x69, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, + 0x69, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0b, 0x67, 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x67, 0x70, 0x75, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, + 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x34, 0x0a, + 0x14, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, + 0x52, 0x11, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x14, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x20, 0x0a, 0x0e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x90, 0x01, 0x0a, 0x18, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x51, + 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, + 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x21, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xbd, 0x02, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x5a, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x23, + 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x61, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, + 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, + 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x42, 0x0d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x66, 0x0a, 0x18, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x4e, 0x6f, + 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xe0, 0x01, + 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x2e, 0x45, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x22, 0x59, 0x0a, 0x06, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, + 0x16, 0x0a, 0x12, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x5f, 0x45, 0x58, + 0x45, 0x43, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x53, 0x43, + 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x45, 0x46, + 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x03, + 0x22, 0xe3, 0x01, 0x0a, 0x1b, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x12, 0x47, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x4f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x55, 0x6e, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6d, 0x61, 0x78, + 0x5f, 0x73, 0x75, 0x72, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x6d, 0x61, + 0x78, 0x53, 0x75, 0x72, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x54, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x4f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xfc, 0x02, 0x0a, + 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x11, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, + 0x61, 0x64, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x4b, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, + 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x57, 0x0a, 0x15, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1_node_group_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1_node_group_proto_rawDescData = file_nebius_mk8s_v1_node_group_proto_rawDesc +) + +func file_nebius_mk8s_v1_node_group_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1_node_group_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1_node_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1_node_group_proto_rawDescData) + }) + return file_nebius_mk8s_v1_node_group_proto_rawDescData +} + +var file_nebius_mk8s_v1_node_group_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_nebius_mk8s_v1_node_group_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_nebius_mk8s_v1_node_group_proto_goTypes = []any{ + (AttachedFilesystemSpec_AttachMode)(0), // 0: nebius.mk8s.v1.AttachedFilesystemSpec.AttachMode + (NodeTaint_Effect)(0), // 1: nebius.mk8s.v1.NodeTaint.Effect + (NodeGroupStatus_State)(0), // 2: nebius.mk8s.v1.NodeGroupStatus.State + (*NodeGroup)(nil), // 3: nebius.mk8s.v1.NodeGroup + (*NodeGroupSpec)(nil), // 4: nebius.mk8s.v1.NodeGroupSpec + (*NodeTemplate)(nil), // 5: nebius.mk8s.v1.NodeTemplate + (*NodeMetadataTemplate)(nil), // 6: nebius.mk8s.v1.NodeMetadataTemplate + (*GpuClusterSpec)(nil), // 7: nebius.mk8s.v1.GpuClusterSpec + (*NetworkInterfaceTemplate)(nil), // 8: nebius.mk8s.v1.NetworkInterfaceTemplate + (*PublicIPAddress)(nil), // 9: nebius.mk8s.v1.PublicIPAddress + (*AttachedFilesystemSpec)(nil), // 10: nebius.mk8s.v1.AttachedFilesystemSpec + (*ExistingFilesystem)(nil), // 11: nebius.mk8s.v1.ExistingFilesystem + (*NodeGroupAutoscalingSpec)(nil), // 12: nebius.mk8s.v1.NodeGroupAutoscalingSpec + (*NodeTaint)(nil), // 13: nebius.mk8s.v1.NodeTaint + (*NodeGroupDeploymentStrategy)(nil), // 14: nebius.mk8s.v1.NodeGroupDeploymentStrategy + (*PercentOrCount)(nil), // 15: nebius.mk8s.v1.PercentOrCount + (*NodeGroupStatus)(nil), // 16: nebius.mk8s.v1.NodeGroupStatus + nil, // 17: nebius.mk8s.v1.NodeMetadataTemplate.LabelsEntry + (*v1.ResourceMetadata)(nil), // 18: nebius.common.v1.ResourceMetadata + (*ResourcesSpec)(nil), // 19: nebius.mk8s.v1.ResourcesSpec + (*DiskSpec)(nil), // 20: nebius.mk8s.v1.DiskSpec + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration +} +var file_nebius_mk8s_v1_node_group_proto_depIdxs = []int32{ + 18, // 0: nebius.mk8s.v1.NodeGroup.metadata:type_name -> nebius.common.v1.ResourceMetadata + 4, // 1: nebius.mk8s.v1.NodeGroup.spec:type_name -> nebius.mk8s.v1.NodeGroupSpec + 16, // 2: nebius.mk8s.v1.NodeGroup.status:type_name -> nebius.mk8s.v1.NodeGroupStatus + 12, // 3: nebius.mk8s.v1.NodeGroupSpec.autoscaling:type_name -> nebius.mk8s.v1.NodeGroupAutoscalingSpec + 5, // 4: nebius.mk8s.v1.NodeGroupSpec.template:type_name -> nebius.mk8s.v1.NodeTemplate + 14, // 5: nebius.mk8s.v1.NodeGroupSpec.strategy:type_name -> nebius.mk8s.v1.NodeGroupDeploymentStrategy + 6, // 6: nebius.mk8s.v1.NodeTemplate.metadata:type_name -> nebius.mk8s.v1.NodeMetadataTemplate + 13, // 7: nebius.mk8s.v1.NodeTemplate.taints:type_name -> nebius.mk8s.v1.NodeTaint + 19, // 8: nebius.mk8s.v1.NodeTemplate.resources:type_name -> nebius.mk8s.v1.ResourcesSpec + 20, // 9: nebius.mk8s.v1.NodeTemplate.boot_disk:type_name -> nebius.mk8s.v1.DiskSpec + 7, // 10: nebius.mk8s.v1.NodeTemplate.gpu_cluster:type_name -> nebius.mk8s.v1.GpuClusterSpec + 8, // 11: nebius.mk8s.v1.NodeTemplate.network_interfaces:type_name -> nebius.mk8s.v1.NetworkInterfaceTemplate + 10, // 12: nebius.mk8s.v1.NodeTemplate.filesystems:type_name -> nebius.mk8s.v1.AttachedFilesystemSpec + 17, // 13: nebius.mk8s.v1.NodeMetadataTemplate.labels:type_name -> nebius.mk8s.v1.NodeMetadataTemplate.LabelsEntry + 9, // 14: nebius.mk8s.v1.NetworkInterfaceTemplate.public_ip_address:type_name -> nebius.mk8s.v1.PublicIPAddress + 0, // 15: nebius.mk8s.v1.AttachedFilesystemSpec.attach_mode:type_name -> nebius.mk8s.v1.AttachedFilesystemSpec.AttachMode + 11, // 16: nebius.mk8s.v1.AttachedFilesystemSpec.existing_filesystem:type_name -> nebius.mk8s.v1.ExistingFilesystem + 1, // 17: nebius.mk8s.v1.NodeTaint.effect:type_name -> nebius.mk8s.v1.NodeTaint.Effect + 15, // 18: nebius.mk8s.v1.NodeGroupDeploymentStrategy.max_unavailable:type_name -> nebius.mk8s.v1.PercentOrCount + 15, // 19: nebius.mk8s.v1.NodeGroupDeploymentStrategy.max_surge:type_name -> nebius.mk8s.v1.PercentOrCount + 21, // 20: nebius.mk8s.v1.NodeGroupDeploymentStrategy.drain_timeout:type_name -> google.protobuf.Duration + 2, // 21: nebius.mk8s.v1.NodeGroupStatus.state:type_name -> nebius.mk8s.v1.NodeGroupStatus.State + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1_node_group_proto_init() } +func file_nebius_mk8s_v1_node_group_proto_init() { + if File_nebius_mk8s_v1_node_group_proto != nil { + return + } + file_nebius_mk8s_v1_instance_template_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1_node_group_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*NodeTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NodeMetadataTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*AttachedFilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ExistingFilesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupAutoscalingSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*NodeTaint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupDeploymentStrategy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*PercentOrCount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[1].OneofWrappers = []any{ + (*NodeGroupSpec_FixedNodeCount)(nil), + (*NodeGroupSpec_Autoscaling)(nil), + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[7].OneofWrappers = []any{ + (*AttachedFilesystemSpec_ExistingFilesystem)(nil), + } + file_nebius_mk8s_v1_node_group_proto_msgTypes[12].OneofWrappers = []any{ + (*PercentOrCount_Percent)(nil), + (*PercentOrCount_Count)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1_node_group_proto_rawDesc, + NumEnums: 3, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1_node_group_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1_node_group_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1_node_group_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1_node_group_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1_node_group_proto = out.File + file_nebius_mk8s_v1_node_group_proto_rawDesc = nil + file_nebius_mk8s_v1_node_group_proto_goTypes = nil + file_nebius_mk8s_v1_node_group_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1/node_group.sensitive.pb.go b/proto/nebius/mk8s/v1/node_group.sensitive.pb.go new file mode 100644 index 0000000..72871f0 --- /dev/null +++ b/proto/nebius/mk8s/v1/node_group.sensitive.pb.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [NodeGroup] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeGroup) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeGroup]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeGroup +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeGroup], use the following code: +// +// var original *NodeGroup +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeGroup) +func (x *NodeGroup) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeGroup) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeGroup)(c)) +} + +// wrapperNodeGroup is used to return [NodeGroup] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeGroup NodeGroup + +func (w *wrapperNodeGroup) String() string { + return (*NodeGroup)(w).String() +} + +func (*wrapperNodeGroup) ProtoMessage() {} + +func (w *wrapperNodeGroup) ProtoReflect() protoreflect.Message { + return (*NodeGroup)(w).ProtoReflect() +} + +// Sanitize mutates [NodeGroupSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeGroupSpec) Sanitize() { + if x == nil { + return + } + x.Template.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeGroupSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeGroupSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeGroupSpec], use the following code: +// +// var original *NodeGroupSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeGroupSpec) +func (x *NodeGroupSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeGroupSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeGroupSpec)(c)) +} + +// wrapperNodeGroupSpec is used to return [NodeGroupSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeGroupSpec NodeGroupSpec + +func (w *wrapperNodeGroupSpec) String() string { + return (*NodeGroupSpec)(w).String() +} + +func (*wrapperNodeGroupSpec) ProtoMessage() {} + +func (w *wrapperNodeGroupSpec) ProtoReflect() protoreflect.Message { + return (*NodeGroupSpec)(w).ProtoReflect() +} + +// Sanitize mutates [NodeTemplate] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeTemplate) Sanitize() { + if x == nil { + return + } + x.CloudInitUserData = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeTemplate]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeTemplate +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeTemplate], use the following code: +// +// var original *NodeTemplate +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeTemplate) +func (x *NodeTemplate) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeTemplate) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeTemplate)(c)) +} + +// wrapperNodeTemplate is used to return [NodeTemplate] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeTemplate NodeTemplate + +func (w *wrapperNodeTemplate) String() string { + return (*NodeTemplate)(w).String() +} + +func (*wrapperNodeTemplate) ProtoMessage() {} + +func (w *wrapperNodeTemplate) ProtoReflect() protoreflect.Message { + return (*NodeTemplate)(w).ProtoReflect() +} + +// func (x *NodeMetadataTemplate) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeMetadataTemplate) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceTemplate) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceTemplate) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedFilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedFilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingFilesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingFilesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupAutoscalingSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupAutoscalingSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeTaint) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeTaint) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupDeploymentStrategy) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupDeploymentStrategy) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PercentOrCount) Sanitize() // is not generated as no sensitive fields found +// func (x *PercentOrCount) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1/node_group_service.pb.go b/proto/nebius/mk8s/v1/node_group_service.pb.go new file mode 100644 index 0000000..d09bcbd --- /dev/null +++ b/proto/nebius/mk8s/v1/node_group_service.pb.go @@ -0,0 +1,720 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1/node_group_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateNodeGroupRequest) Reset() { + *x = CreateNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNodeGroupRequest) ProtoMessage() {} + +func (x *CreateNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateNodeGroupRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateNodeGroupRequest) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` +} + +func (x *GetNodeGroupRequest) Reset() { + *x = GetNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeGroupRequest) ProtoMessage() {} + +func (x *GetNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*GetNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetNodeGroupRequest) GetResourceVersion() string { + if x != nil { + return x.ResourceVersion + } + return "" +} + +type ListNodeGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the parent Cluster. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListNodeGroupsRequest) Reset() { + *x = ListNodeGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodeGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodeGroupsRequest) ProtoMessage() {} + +func (x *ListNodeGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNodeGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListNodeGroupsRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListNodeGroupsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListNodeGroupsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListNodeGroupsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListNodeGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*NodeGroup `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListNodeGroupsResponse) Reset() { + *x = ListNodeGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodeGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodeGroupsResponse) ProtoMessage() {} + +func (x *ListNodeGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNodeGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListNodeGroupsResponse) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListNodeGroupsResponse) GetItems() []*NodeGroup { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListNodeGroupsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdateNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateNodeGroupRequest) Reset() { + *x = UpdateNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNodeGroupRequest) ProtoMessage() {} + +func (x *UpdateNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateNodeGroupRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateNodeGroupRequest) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteNodeGroupRequest) Reset() { + *x = DeleteNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNodeGroupRequest) ProtoMessage() {} + +func (x *DeleteNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UpgradeNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to UpgradeType: + // + // *UpgradeNodeGroupRequest_LatestInfraVersion + UpgradeType isUpgradeNodeGroupRequest_UpgradeType `protobuf_oneof:"upgrade_type"` +} + +func (x *UpgradeNodeGroupRequest) Reset() { + *x = UpgradeNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeNodeGroupRequest) ProtoMessage() {} + +func (x *UpgradeNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1_node_group_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*UpgradeNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UpgradeNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *UpgradeNodeGroupRequest) GetUpgradeType() isUpgradeNodeGroupRequest_UpgradeType { + if m != nil { + return m.UpgradeType + } + return nil +} + +func (x *UpgradeNodeGroupRequest) GetLatestInfraVersion() *emptypb.Empty { + if x, ok := x.GetUpgradeType().(*UpgradeNodeGroupRequest_LatestInfraVersion); ok { + return x.LatestInfraVersion + } + return nil +} + +type isUpgradeNodeGroupRequest_UpgradeType interface { + isUpgradeNodeGroupRequest_UpgradeType() +} + +type UpgradeNodeGroupRequest_LatestInfraVersion struct { + // Upgrades to the latest infra version, which includes latest supported kubernetes patch version. Kubernetes minor version remain the same. + LatestInfraVersion *emptypb.Empty `protobuf:"bytes,2,opt,name=latest_infra_version,json=latestInfraVersion,proto3,oneof"` +} + +func (*UpgradeNodeGroupRequest_LatestInfraVersion) isUpgradeNodeGroupRequest_UpgradeType() {} + +var File_nebius_mk8s_v1_node_group_service_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1_node_group_service_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, + 0x58, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, + 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x71, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x30, 0x0a, 0x16, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x9a, + 0x01, 0x0a, 0x17, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x50, 0x0a, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, + 0x72, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x48, 0x00, + 0x52, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x15, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x32, 0xba, 0x04, 0x0a, 0x10, + 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x45, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5e, 0x0a, 0x15, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x15, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1_node_group_service_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1_node_group_service_proto_rawDescData = file_nebius_mk8s_v1_node_group_service_proto_rawDesc +) + +func file_nebius_mk8s_v1_node_group_service_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1_node_group_service_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1_node_group_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1_node_group_service_proto_rawDescData) + }) + return file_nebius_mk8s_v1_node_group_service_proto_rawDescData +} + +var file_nebius_mk8s_v1_node_group_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_mk8s_v1_node_group_service_proto_goTypes = []any{ + (*CreateNodeGroupRequest)(nil), // 0: nebius.mk8s.v1.CreateNodeGroupRequest + (*GetNodeGroupRequest)(nil), // 1: nebius.mk8s.v1.GetNodeGroupRequest + (*ListNodeGroupsRequest)(nil), // 2: nebius.mk8s.v1.ListNodeGroupsRequest + (*ListNodeGroupsResponse)(nil), // 3: nebius.mk8s.v1.ListNodeGroupsResponse + (*UpdateNodeGroupRequest)(nil), // 4: nebius.mk8s.v1.UpdateNodeGroupRequest + (*DeleteNodeGroupRequest)(nil), // 5: nebius.mk8s.v1.DeleteNodeGroupRequest + (*UpgradeNodeGroupRequest)(nil), // 6: nebius.mk8s.v1.UpgradeNodeGroupRequest + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*NodeGroupSpec)(nil), // 8: nebius.mk8s.v1.NodeGroupSpec + (*NodeGroup)(nil), // 9: nebius.mk8s.v1.NodeGroup + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty + (*v1.GetByNameRequest)(nil), // 11: nebius.common.v1.GetByNameRequest + (*v1.Operation)(nil), // 12: nebius.common.v1.Operation +} +var file_nebius_mk8s_v1_node_group_service_proto_depIdxs = []int32{ + 7, // 0: nebius.mk8s.v1.CreateNodeGroupRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 1: nebius.mk8s.v1.CreateNodeGroupRequest.spec:type_name -> nebius.mk8s.v1.NodeGroupSpec + 9, // 2: nebius.mk8s.v1.ListNodeGroupsResponse.items:type_name -> nebius.mk8s.v1.NodeGroup + 7, // 3: nebius.mk8s.v1.UpdateNodeGroupRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 4: nebius.mk8s.v1.UpdateNodeGroupRequest.spec:type_name -> nebius.mk8s.v1.NodeGroupSpec + 10, // 5: nebius.mk8s.v1.UpgradeNodeGroupRequest.latest_infra_version:type_name -> google.protobuf.Empty + 1, // 6: nebius.mk8s.v1.NodeGroupService.Get:input_type -> nebius.mk8s.v1.GetNodeGroupRequest + 11, // 7: nebius.mk8s.v1.NodeGroupService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 2, // 8: nebius.mk8s.v1.NodeGroupService.List:input_type -> nebius.mk8s.v1.ListNodeGroupsRequest + 0, // 9: nebius.mk8s.v1.NodeGroupService.Create:input_type -> nebius.mk8s.v1.CreateNodeGroupRequest + 4, // 10: nebius.mk8s.v1.NodeGroupService.Update:input_type -> nebius.mk8s.v1.UpdateNodeGroupRequest + 5, // 11: nebius.mk8s.v1.NodeGroupService.Delete:input_type -> nebius.mk8s.v1.DeleteNodeGroupRequest + 6, // 12: nebius.mk8s.v1.NodeGroupService.Upgrade:input_type -> nebius.mk8s.v1.UpgradeNodeGroupRequest + 9, // 13: nebius.mk8s.v1.NodeGroupService.Get:output_type -> nebius.mk8s.v1.NodeGroup + 9, // 14: nebius.mk8s.v1.NodeGroupService.GetByName:output_type -> nebius.mk8s.v1.NodeGroup + 3, // 15: nebius.mk8s.v1.NodeGroupService.List:output_type -> nebius.mk8s.v1.ListNodeGroupsResponse + 12, // 16: nebius.mk8s.v1.NodeGroupService.Create:output_type -> nebius.common.v1.Operation + 12, // 17: nebius.mk8s.v1.NodeGroupService.Update:output_type -> nebius.common.v1.Operation + 12, // 18: nebius.mk8s.v1.NodeGroupService.Delete:output_type -> nebius.common.v1.Operation + 12, // 19: nebius.mk8s.v1.NodeGroupService.Upgrade:output_type -> nebius.common.v1.Operation + 13, // [13:20] is the sub-list for method output_type + 6, // [6:13] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1_node_group_service_proto_init() } +func file_nebius_mk8s_v1_node_group_service_proto_init() { + if File_nebius_mk8s_v1_node_group_service_proto != nil { + return + } + file_nebius_mk8s_v1_node_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListNodeGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListNodeGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*UpgradeNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1_node_group_service_proto_msgTypes[6].OneofWrappers = []any{ + (*UpgradeNodeGroupRequest_LatestInfraVersion)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1_node_group_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_mk8s_v1_node_group_service_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1_node_group_service_proto_depIdxs, + MessageInfos: file_nebius_mk8s_v1_node_group_service_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1_node_group_service_proto = out.File + file_nebius_mk8s_v1_node_group_service_proto_rawDesc = nil + file_nebius_mk8s_v1_node_group_service_proto_goTypes = nil + file_nebius_mk8s_v1_node_group_service_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1/node_group_service.sensitive.pb.go b/proto/nebius/mk8s/v1/node_group_service.sensitive.pb.go new file mode 100644 index 0000000..68545ee --- /dev/null +++ b/proto/nebius/mk8s/v1/node_group_service.sensitive.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [CreateNodeGroupRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateNodeGroupRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateNodeGroupRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateNodeGroupRequest], use the following code: +// +// var original *CreateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateNodeGroupRequest) +func (x *CreateNodeGroupRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateNodeGroupRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateNodeGroupRequest)(c)) +} + +// wrapperCreateNodeGroupRequest is used to return [CreateNodeGroupRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateNodeGroupRequest CreateNodeGroupRequest + +func (w *wrapperCreateNodeGroupRequest) String() string { + return (*CreateNodeGroupRequest)(w).String() +} + +func (*wrapperCreateNodeGroupRequest) ProtoMessage() {} + +func (w *wrapperCreateNodeGroupRequest) ProtoReflect() protoreflect.Message { + return (*CreateNodeGroupRequest)(w).ProtoReflect() +} + +// func (x *GetNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNodeGroupsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNodeGroupsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListNodeGroupsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListNodeGroupsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListNodeGroupsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListNodeGroupsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListNodeGroupsResponse], use the following code: +// +// var original *ListNodeGroupsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListNodeGroupsResponse) +func (x *ListNodeGroupsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListNodeGroupsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListNodeGroupsResponse)(c)) +} + +// wrapperListNodeGroupsResponse is used to return [ListNodeGroupsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListNodeGroupsResponse ListNodeGroupsResponse + +func (w *wrapperListNodeGroupsResponse) String() string { + return (*ListNodeGroupsResponse)(w).String() +} + +func (*wrapperListNodeGroupsResponse) ProtoMessage() {} + +func (w *wrapperListNodeGroupsResponse) ProtoReflect() protoreflect.Message { + return (*ListNodeGroupsResponse)(w).ProtoReflect() +} + +// Sanitize mutates [UpdateNodeGroupRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateNodeGroupRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateNodeGroupRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateNodeGroupRequest], use the following code: +// +// var original *UpdateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateNodeGroupRequest) +func (x *UpdateNodeGroupRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateNodeGroupRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateNodeGroupRequest)(c)) +} + +// wrapperUpdateNodeGroupRequest is used to return [UpdateNodeGroupRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateNodeGroupRequest UpdateNodeGroupRequest + +func (w *wrapperUpdateNodeGroupRequest) String() string { + return (*UpdateNodeGroupRequest)(w).String() +} + +func (*wrapperUpdateNodeGroupRequest) ProtoMessage() {} + +func (w *wrapperUpdateNodeGroupRequest) ProtoReflect() protoreflect.Message { + return (*UpdateNodeGroupRequest)(w).ProtoReflect() +} + +// func (x *DeleteNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpgradeNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpgradeNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1/node_group_service_grpc.pb.go b/proto/nebius/mk8s/v1/node_group_service_grpc.pb.go new file mode 100644 index 0000000..2f9fa98 --- /dev/null +++ b/proto/nebius/mk8s/v1/node_group_service_grpc.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/mk8s/v1/node_group_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NodeGroupService_Get_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/Get" + NodeGroupService_GetByName_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/GetByName" + NodeGroupService_List_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/List" + NodeGroupService_Create_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/Create" + NodeGroupService_Update_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/Update" + NodeGroupService_Delete_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/Delete" + NodeGroupService_Upgrade_FullMethodName = "/nebius.mk8s.v1.NodeGroupService/Upgrade" +) + +// NodeGroupServiceClient is the client API for NodeGroupService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NodeGroupServiceClient interface { + Get(ctx context.Context, in *GetNodeGroupRequest, opts ...grpc.CallOption) (*NodeGroup, error) + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*NodeGroup, error) + List(ctx context.Context, in *ListNodeGroupsRequest, opts ...grpc.CallOption) (*ListNodeGroupsResponse, error) + Create(ctx context.Context, in *CreateNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Upgrade(ctx context.Context, in *UpgradeNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type nodeGroupServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNodeGroupServiceClient(cc grpc.ClientConnInterface) NodeGroupServiceClient { + return &nodeGroupServiceClient{cc} +} + +func (c *nodeGroupServiceClient) Get(ctx context.Context, in *GetNodeGroupRequest, opts ...grpc.CallOption) (*NodeGroup, error) { + out := new(NodeGroup) + err := c.cc.Invoke(ctx, NodeGroupService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*NodeGroup, error) { + out := new(NodeGroup) + err := c.cc.Invoke(ctx, NodeGroupService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) List(ctx context.Context, in *ListNodeGroupsRequest, opts ...grpc.CallOption) (*ListNodeGroupsResponse, error) { + out := new(ListNodeGroupsResponse) + err := c.cc.Invoke(ctx, NodeGroupService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Create(ctx context.Context, in *CreateNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Update(ctx context.Context, in *UpdateNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Delete(ctx context.Context, in *DeleteNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Upgrade(ctx context.Context, in *UpgradeNodeGroupRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Upgrade_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NodeGroupServiceServer is the server API for NodeGroupService service. +// All implementations should embed UnimplementedNodeGroupServiceServer +// for forward compatibility +type NodeGroupServiceServer interface { + Get(context.Context, *GetNodeGroupRequest) (*NodeGroup, error) + GetByName(context.Context, *v1.GetByNameRequest) (*NodeGroup, error) + List(context.Context, *ListNodeGroupsRequest) (*ListNodeGroupsResponse, error) + Create(context.Context, *CreateNodeGroupRequest) (*v1.Operation, error) + Update(context.Context, *UpdateNodeGroupRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteNodeGroupRequest) (*v1.Operation, error) + Upgrade(context.Context, *UpgradeNodeGroupRequest) (*v1.Operation, error) +} + +// UnimplementedNodeGroupServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNodeGroupServiceServer struct { +} + +func (UnimplementedNodeGroupServiceServer) Get(context.Context, *GetNodeGroupRequest) (*NodeGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedNodeGroupServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*NodeGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedNodeGroupServiceServer) List(context.Context, *ListNodeGroupsRequest) (*ListNodeGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedNodeGroupServiceServer) Create(context.Context, *CreateNodeGroupRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedNodeGroupServiceServer) Update(context.Context, *UpdateNodeGroupRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedNodeGroupServiceServer) Delete(context.Context, *DeleteNodeGroupRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedNodeGroupServiceServer) Upgrade(context.Context, *UpgradeNodeGroupRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Upgrade not implemented") +} + +// UnsafeNodeGroupServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NodeGroupServiceServer will +// result in compilation errors. +type UnsafeNodeGroupServiceServer interface { + mustEmbedUnimplementedNodeGroupServiceServer() +} + +func RegisterNodeGroupServiceServer(s grpc.ServiceRegistrar, srv NodeGroupServiceServer) { + s.RegisterService(&NodeGroupService_ServiceDesc, srv) +} + +func _NodeGroupService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Get(ctx, req.(*GetNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNodeGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).List(ctx, req.(*ListNodeGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Create(ctx, req.(*CreateNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Update(ctx, req.(*UpdateNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Delete(ctx, req.(*DeleteNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Upgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpgradeNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Upgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Upgrade_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Upgrade(ctx, req.(*UpgradeNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NodeGroupService_ServiceDesc is the grpc.ServiceDesc for NodeGroupService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NodeGroupService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.mk8s.v1.NodeGroupService", + HandlerType: (*NodeGroupServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _NodeGroupService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _NodeGroupService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _NodeGroupService_List_Handler, + }, + { + MethodName: "Create", + Handler: _NodeGroupService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _NodeGroupService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _NodeGroupService_Delete_Handler, + }, + { + MethodName: "Upgrade", + Handler: _NodeGroupService_Upgrade_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/mk8s/v1/node_group_service.proto", +} diff --git a/proto/nebius/mk8s/v1alpha1/cluster.pb.go b/proto/nebius/mk8s/v1alpha1/cluster.pb.go new file mode 100644 index 0000000..b5ebb9d --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/cluster.pb.go @@ -0,0 +1,958 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/cluster.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterStatus_State int32 + +const ( + ClusterStatus_STATE_UNSPECIFIED ClusterStatus_State = 0 + ClusterStatus_PROVISIONING ClusterStatus_State = 1 + ClusterStatus_RUNNING ClusterStatus_State = 2 + ClusterStatus_DELETING ClusterStatus_State = 3 +) + +// Enum value maps for ClusterStatus_State. +var ( + ClusterStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PROVISIONING", + 2: "RUNNING", + 3: "DELETING", + } + ClusterStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "DELETING": 3, + } +) + +func (x ClusterStatus_State) Enum() *ClusterStatus_State { + p := new(ClusterStatus_State) + *p = x + return p +} + +func (x ClusterStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1alpha1_cluster_proto_enumTypes[0].Descriptor() +} + +func (ClusterStatus_State) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1alpha1_cluster_proto_enumTypes[0] +} + +func (x ClusterStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterStatus_State.Descriptor instead. +func (ClusterStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{6, 0} +} + +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *Cluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Cluster) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Cluster) GetStatus() *ClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +type ClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ControlPlane *ControlPlaneSpec `protobuf:"bytes,2,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` + // Defines kubernetes network configuration, like IP allocation. + KubeNetwork *KubeNetworkSpec `protobuf:"bytes,3,opt,name=kube_network,json=kubeNetwork,proto3" json:"kube_network,omitempty"` +} + +func (x *ClusterSpec) Reset() { + *x = ClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpec) ProtoMessage() {} + +func (x *ClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpec.ProtoReflect.Descriptor instead. +func (*ClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterSpec) GetControlPlane() *ControlPlaneSpec { + if x != nil { + return x.ControlPlane + } + return nil +} + +func (x *ClusterSpec) GetKubeNetwork() *KubeNetworkSpec { + if x != nil { + return x.KubeNetwork + } + return nil +} + +type ControlPlaneSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version is desired Kubernetes version of the cluster. For now only acceptable format is + // `MAJOR.MINOR` like "1.30". Option for patch version update will be added later. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Subnet ID where control plane instances will be located. + SubnetId string `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + Endpoints *ControlPlaneEndpointsSpec `protobuf:"bytes,3,opt,name=endpoints,proto3" json:"endpoints,omitempty"` + EtcdClusterSize int64 `protobuf:"varint,4,opt,name=etcd_cluster_size,json=etcdClusterSize,proto3" json:"etcd_cluster_size,omitempty"` +} + +func (x *ControlPlaneSpec) Reset() { + *x = ControlPlaneSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneSpec) ProtoMessage() {} + +func (x *ControlPlaneSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneSpec.ProtoReflect.Descriptor instead. +func (*ControlPlaneSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *ControlPlaneSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ControlPlaneSpec) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +func (x *ControlPlaneSpec) GetEndpoints() *ControlPlaneEndpointsSpec { + if x != nil { + return x.Endpoints + } + return nil +} + +func (x *ControlPlaneSpec) GetEtcdClusterSize() int64 { + if x != nil { + return x.EtcdClusterSize + } + return 0 +} + +type ControlPlaneEndpointsSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // PublicEndpointSpec is a specification of public endpoint for control plane. + PublicEndpoint *PublicEndpointSpec `protobuf:"bytes,1,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` +} + +func (x *ControlPlaneEndpointsSpec) Reset() { + *x = ControlPlaneEndpointsSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneEndpointsSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneEndpointsSpec) ProtoMessage() {} + +func (x *ControlPlaneEndpointsSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneEndpointsSpec.ProtoReflect.Descriptor instead. +func (*ControlPlaneEndpointsSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *ControlPlaneEndpointsSpec) GetPublicEndpoint() *PublicEndpointSpec { + if x != nil { + return x.PublicEndpoint + } + return nil +} + +type PublicEndpointSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublicEndpointSpec) Reset() { + *x = PublicEndpointSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicEndpointSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicEndpointSpec) ProtoMessage() {} + +func (x *PublicEndpointSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicEndpointSpec.ProtoReflect.Descriptor instead. +func (*PublicEndpointSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{4} +} + +type KubeNetworkSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR blocks for Service ClusterIP allocation. For now, only one value is supported. + // For now, value should be in prefix length form (such as "/16"). + // Later a CIDR-formatted string (such as "10.1.2.0/16") will be supported. + // In case of prefix length, certain CIDR is auto allocated. + // Specified CIDR blocks will be reserved in Cluster.spec.control_plane.subnet_id to prevent address duplication. + // Allowed prefix length is from "/12" to "/28". + // Empty value treated as ["/16"]. + ServiceCidrs []string `protobuf:"bytes,1,rep,name=service_cidrs,json=serviceCidrs,proto3" json:"service_cidrs,omitempty"` +} + +func (x *KubeNetworkSpec) Reset() { + *x = KubeNetworkSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KubeNetworkSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KubeNetworkSpec) ProtoMessage() {} + +func (x *KubeNetworkSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KubeNetworkSpec.ProtoReflect.Descriptor instead. +func (*KubeNetworkSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{5} +} + +func (x *KubeNetworkSpec) GetServiceCidrs() []string { + if x != nil { + return x.ServiceCidrs + } + return nil +} + +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State ClusterStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.mk8s.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + ControlPlane *ControlPlaneStatus `protobuf:"bytes,2,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` + // Show that changes are in flight + Reconciling bool `protobuf:"varint,100,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{6} +} + +func (x *ClusterStatus) GetState() ClusterStatus_State { + if x != nil { + return x.State + } + return ClusterStatus_STATE_UNSPECIFIED +} + +func (x *ClusterStatus) GetControlPlane() *ControlPlaneStatus { + if x != nil { + return x.ControlPlane + } + return nil +} + +func (x *ClusterStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +type ControlPlaneStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version have format `major.minor.patch-nebius-cp.n` like "1.30.0-nebius-cp.3". + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Endpoints *ControlPlaneStatusEndpoints `protobuf:"bytes,2,opt,name=endpoints,proto3" json:"endpoints,omitempty"` + Auth *ControlPlaneStatusAuth `protobuf:"bytes,100,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *ControlPlaneStatus) Reset() { + *x = ControlPlaneStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatus) ProtoMessage() {} + +func (x *ControlPlaneStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatus.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{7} +} + +func (x *ControlPlaneStatus) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ControlPlaneStatus) GetEndpoints() *ControlPlaneStatusEndpoints { + if x != nil { + return x.Endpoints + } + return nil +} + +func (x *ControlPlaneStatus) GetAuth() *ControlPlaneStatusAuth { + if x != nil { + return x.Auth + } + return nil +} + +// Endpoints of Kubernetes control plane. Kubernetes API can be accessed at `https://endpoint/`. +type ControlPlaneStatusEndpoints struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DNS name or IP address accessible from the Internet. + PublicEndpoint string `protobuf:"bytes,1,opt,name=public_endpoint,json=publicEndpoint,proto3" json:"public_endpoint,omitempty"` + // DNS name or IP address accessible from the user VPC. + PrivateEndpoint string `protobuf:"bytes,2,opt,name=private_endpoint,json=privateEndpoint,proto3" json:"private_endpoint,omitempty"` +} + +func (x *ControlPlaneStatusEndpoints) Reset() { + *x = ControlPlaneStatusEndpoints{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatusEndpoints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatusEndpoints) ProtoMessage() {} + +func (x *ControlPlaneStatusEndpoints) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatusEndpoints.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatusEndpoints) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{8} +} + +func (x *ControlPlaneStatusEndpoints) GetPublicEndpoint() string { + if x != nil { + return x.PublicEndpoint + } + return "" +} + +func (x *ControlPlaneStatusEndpoints) GetPrivateEndpoint() string { + if x != nil { + return x.PrivateEndpoint + } + return "" +} + +type ControlPlaneStatusAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterCaCertificate string `protobuf:"bytes,1,opt,name=cluster_ca_certificate,json=clusterCaCertificate,proto3" json:"cluster_ca_certificate,omitempty"` +} + +func (x *ControlPlaneStatusAuth) Reset() { + *x = ControlPlaneStatusAuth{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ControlPlaneStatusAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlPlaneStatusAuth) ProtoMessage() {} + +func (x *ControlPlaneStatusAuth) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlPlaneStatusAuth.ProtoReflect.Descriptor instead. +func (*ControlPlaneStatusAuth) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP(), []int{9} +} + +func (x *ControlPlaneStatusAuth) GetClusterCaCertificate() string { + if x != nil { + return x.ClusterCaCertificate + } + return "" +} + +var File_nebius_mk8s_v1alpha1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1alpha1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x53, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x48, 0x0a, 0x0c, 0x6b, 0x75, 0x62, 0x65, 0x5f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x6b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x22, 0xd0, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, + 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x27, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x09, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x74, 0x63, 0x64, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0f, 0x65, 0x74, 0x63, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0x74, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, + 0x6c, 0x61, 0x6e, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x57, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x12, 0xbf, 0x01, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x99, 0x01, 0xba, + 0x48, 0x91, 0x01, 0xba, 0x01, 0x88, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x45, 0x65, 0x61, 0x63, 0x68, + 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x61, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x62, 0x65, + 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x2f, 0x31, 0x32, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x2f, 0x32, + 0x38, 0x1a, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x78, 0x2c, 0x20, 0x78, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x31, 0x5b, 0x32, + 0x2d, 0x39, 0x5d, 0x7c, 0x32, 0x5b, 0x30, 0x2d, 0x38, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x29, 0x92, + 0x01, 0x02, 0x10, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x69, 0x64, 0x72, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, + 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, + 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, + 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x4b, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, + 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, + 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x22, 0xc1, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x09, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x68, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x22, 0x71, 0x0a, 0x1b, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x4e, + 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x61, + 0x0a, 0x1b, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1alpha1_cluster_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1alpha1_cluster_proto_rawDescData = file_nebius_mk8s_v1alpha1_cluster_proto_rawDesc +) + +func file_nebius_mk8s_v1alpha1_cluster_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1alpha1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1alpha1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1alpha1_cluster_proto_rawDescData) + }) + return file_nebius_mk8s_v1alpha1_cluster_proto_rawDescData +} + +var file_nebius_mk8s_v1alpha1_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_nebius_mk8s_v1alpha1_cluster_proto_goTypes = []any{ + (ClusterStatus_State)(0), // 0: nebius.mk8s.v1alpha1.ClusterStatus.State + (*Cluster)(nil), // 1: nebius.mk8s.v1alpha1.Cluster + (*ClusterSpec)(nil), // 2: nebius.mk8s.v1alpha1.ClusterSpec + (*ControlPlaneSpec)(nil), // 3: nebius.mk8s.v1alpha1.ControlPlaneSpec + (*ControlPlaneEndpointsSpec)(nil), // 4: nebius.mk8s.v1alpha1.ControlPlaneEndpointsSpec + (*PublicEndpointSpec)(nil), // 5: nebius.mk8s.v1alpha1.PublicEndpointSpec + (*KubeNetworkSpec)(nil), // 6: nebius.mk8s.v1alpha1.KubeNetworkSpec + (*ClusterStatus)(nil), // 7: nebius.mk8s.v1alpha1.ClusterStatus + (*ControlPlaneStatus)(nil), // 8: nebius.mk8s.v1alpha1.ControlPlaneStatus + (*ControlPlaneStatusEndpoints)(nil), // 9: nebius.mk8s.v1alpha1.ControlPlaneStatusEndpoints + (*ControlPlaneStatusAuth)(nil), // 10: nebius.mk8s.v1alpha1.ControlPlaneStatusAuth + (*v1.ResourceMetadata)(nil), // 11: nebius.common.v1.ResourceMetadata +} +var file_nebius_mk8s_v1alpha1_cluster_proto_depIdxs = []int32{ + 11, // 0: nebius.mk8s.v1alpha1.Cluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.mk8s.v1alpha1.Cluster.spec:type_name -> nebius.mk8s.v1alpha1.ClusterSpec + 7, // 2: nebius.mk8s.v1alpha1.Cluster.status:type_name -> nebius.mk8s.v1alpha1.ClusterStatus + 3, // 3: nebius.mk8s.v1alpha1.ClusterSpec.control_plane:type_name -> nebius.mk8s.v1alpha1.ControlPlaneSpec + 6, // 4: nebius.mk8s.v1alpha1.ClusterSpec.kube_network:type_name -> nebius.mk8s.v1alpha1.KubeNetworkSpec + 4, // 5: nebius.mk8s.v1alpha1.ControlPlaneSpec.endpoints:type_name -> nebius.mk8s.v1alpha1.ControlPlaneEndpointsSpec + 5, // 6: nebius.mk8s.v1alpha1.ControlPlaneEndpointsSpec.public_endpoint:type_name -> nebius.mk8s.v1alpha1.PublicEndpointSpec + 0, // 7: nebius.mk8s.v1alpha1.ClusterStatus.state:type_name -> nebius.mk8s.v1alpha1.ClusterStatus.State + 8, // 8: nebius.mk8s.v1alpha1.ClusterStatus.control_plane:type_name -> nebius.mk8s.v1alpha1.ControlPlaneStatus + 9, // 9: nebius.mk8s.v1alpha1.ControlPlaneStatus.endpoints:type_name -> nebius.mk8s.v1alpha1.ControlPlaneStatusEndpoints + 10, // 10: nebius.mk8s.v1alpha1.ControlPlaneStatus.auth:type_name -> nebius.mk8s.v1alpha1.ControlPlaneStatusAuth + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1alpha1_cluster_proto_init() } +func file_nebius_mk8s_v1alpha1_cluster_proto_init() { + if File_nebius_mk8s_v1alpha1_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneEndpointsSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*PublicEndpointSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*KubeNetworkSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatusEndpoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ControlPlaneStatusAuth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1alpha1_cluster_proto_rawDesc, + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1alpha1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1alpha1_cluster_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1alpha1_cluster_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1alpha1_cluster_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1alpha1_cluster_proto = out.File + file_nebius_mk8s_v1alpha1_cluster_proto_rawDesc = nil + file_nebius_mk8s_v1alpha1_cluster_proto_goTypes = nil + file_nebius_mk8s_v1alpha1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1alpha1/cluster.sensitive.pb.go b/proto/nebius/mk8s/v1alpha1/cluster.sensitive.pb.go new file mode 100644 index 0000000..b96064b --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/cluster.sensitive.pb.go @@ -0,0 +1,33 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Cluster) Sanitize() // is not generated as no sensitive fields found +// func (x *Cluster) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneEndpointsSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneEndpointsSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicEndpointSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicEndpointSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *KubeNetworkSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *KubeNetworkSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatusEndpoints) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatusEndpoints) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ControlPlaneStatusAuth) Sanitize() // is not generated as no sensitive fields found +// func (x *ControlPlaneStatusAuth) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1alpha1/cluster_service.pb.go b/proto/nebius/mk8s/v1alpha1/cluster_service.pb.go new file mode 100644 index 0000000..95de6fd --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/cluster_service.pb.go @@ -0,0 +1,686 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` +} + +func (x *GetClusterRequest) Reset() { + *x = GetClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterRequest) ProtoMessage() {} + +func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. +func (*GetClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetClusterRequest) GetResourceVersion() string { + if x != nil { + return x.ResourceVersion + } + return "" +} + +type GetClusterByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetClusterByNameRequest) Reset() { + *x = GetClusterByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterByNameRequest) ProtoMessage() {} + +func (x *GetClusterByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterByNameRequest.ProtoReflect.Descriptor instead. +func (*GetClusterByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetClusterByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetClusterByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the IAM container we are listing the resources in. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListClustersRequest) Reset() { + *x = ListClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersRequest) ProtoMessage() {} + +func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. +func (*ListClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Cluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListClustersResponse) Reset() { + *x = ListClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersResponse) ProtoMessage() {} + +func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. +func (*ListClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListClustersResponse) GetItems() []*Cluster { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the instance. + // Includes ID of the instance to update. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Updated specifications for the instance. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateClusterRequest) Reset() { + *x = UpdateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateClusterRequest) ProtoMessage() {} + +func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteClusterRequest) Reset() { + *x = DeleteClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterRequest) ProtoMessage() {} + +func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_mk8s_v1alpha1_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x56, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x76, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x95, 0x01, + 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x2e, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xa4, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, + 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x57, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x68, 0x0a, 0x1b, + 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescData = file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDesc +) + +func file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescData) + }) + return file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDescData +} + +var file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_mk8s_v1alpha1_cluster_service_proto_goTypes = []any{ + (*CreateClusterRequest)(nil), // 0: nebius.mk8s.v1alpha1.CreateClusterRequest + (*GetClusterRequest)(nil), // 1: nebius.mk8s.v1alpha1.GetClusterRequest + (*GetClusterByNameRequest)(nil), // 2: nebius.mk8s.v1alpha1.GetClusterByNameRequest + (*ListClustersRequest)(nil), // 3: nebius.mk8s.v1alpha1.ListClustersRequest + (*ListClustersResponse)(nil), // 4: nebius.mk8s.v1alpha1.ListClustersResponse + (*UpdateClusterRequest)(nil), // 5: nebius.mk8s.v1alpha1.UpdateClusterRequest + (*DeleteClusterRequest)(nil), // 6: nebius.mk8s.v1alpha1.DeleteClusterRequest + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*ClusterSpec)(nil), // 8: nebius.mk8s.v1alpha1.ClusterSpec + (*Cluster)(nil), // 9: nebius.mk8s.v1alpha1.Cluster + (*v1alpha1.Operation)(nil), // 10: nebius.common.v1alpha1.Operation +} +var file_nebius_mk8s_v1alpha1_cluster_service_proto_depIdxs = []int32{ + 7, // 0: nebius.mk8s.v1alpha1.CreateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 1: nebius.mk8s.v1alpha1.CreateClusterRequest.spec:type_name -> nebius.mk8s.v1alpha1.ClusterSpec + 9, // 2: nebius.mk8s.v1alpha1.ListClustersResponse.items:type_name -> nebius.mk8s.v1alpha1.Cluster + 7, // 3: nebius.mk8s.v1alpha1.UpdateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 4: nebius.mk8s.v1alpha1.UpdateClusterRequest.spec:type_name -> nebius.mk8s.v1alpha1.ClusterSpec + 1, // 5: nebius.mk8s.v1alpha1.ClusterService.Get:input_type -> nebius.mk8s.v1alpha1.GetClusterRequest + 2, // 6: nebius.mk8s.v1alpha1.ClusterService.GetByName:input_type -> nebius.mk8s.v1alpha1.GetClusterByNameRequest + 3, // 7: nebius.mk8s.v1alpha1.ClusterService.List:input_type -> nebius.mk8s.v1alpha1.ListClustersRequest + 0, // 8: nebius.mk8s.v1alpha1.ClusterService.Create:input_type -> nebius.mk8s.v1alpha1.CreateClusterRequest + 5, // 9: nebius.mk8s.v1alpha1.ClusterService.Update:input_type -> nebius.mk8s.v1alpha1.UpdateClusterRequest + 6, // 10: nebius.mk8s.v1alpha1.ClusterService.Delete:input_type -> nebius.mk8s.v1alpha1.DeleteClusterRequest + 9, // 11: nebius.mk8s.v1alpha1.ClusterService.Get:output_type -> nebius.mk8s.v1alpha1.Cluster + 9, // 12: nebius.mk8s.v1alpha1.ClusterService.GetByName:output_type -> nebius.mk8s.v1alpha1.Cluster + 4, // 13: nebius.mk8s.v1alpha1.ClusterService.List:output_type -> nebius.mk8s.v1alpha1.ListClustersResponse + 10, // 14: nebius.mk8s.v1alpha1.ClusterService.Create:output_type -> nebius.common.v1alpha1.Operation + 10, // 15: nebius.mk8s.v1alpha1.ClusterService.Update:output_type -> nebius.common.v1alpha1.Operation + 10, // 16: nebius.mk8s.v1alpha1.ClusterService.Delete:output_type -> nebius.common.v1alpha1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1alpha1_cluster_service_proto_init() } +func file_nebius_mk8s_v1alpha1_cluster_service_proto_init() { + if File_nebius_mk8s_v1alpha1_cluster_service_proto != nil { + return + } + file_nebius_mk8s_v1alpha1_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_mk8s_v1alpha1_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1alpha1_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_mk8s_v1alpha1_cluster_service_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1alpha1_cluster_service_proto = out.File + file_nebius_mk8s_v1alpha1_cluster_service_proto_rawDesc = nil + file_nebius_mk8s_v1alpha1_cluster_service_proto_goTypes = nil + file_nebius_mk8s_v1alpha1_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1alpha1/cluster_service.sensitive.pb.go b/proto/nebius/mk8s/v1alpha1/cluster_service.sensitive.pb.go new file mode 100644 index 0000000..a39143d --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/cluster_service.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *CreateClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetClusterByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1alpha1/cluster_service_grpc.pb.go b/proto/nebius/mk8s/v1alpha1/cluster_service_grpc.pb.go new file mode 100644 index 0000000..fa9badf --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/cluster_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + context "context" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterService_Get_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/Get" + ClusterService_GetByName_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/GetByName" + ClusterService_List_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/List" + ClusterService_Create_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/Create" + ClusterService_Update_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/Update" + ClusterService_Delete_FullMethodName = "/nebius.mk8s.v1alpha1.ClusterService/Delete" +) + +// ClusterServiceClient is the client API for ClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterServiceClient interface { + Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) + GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) + List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { + out := new(ListClustersResponse) + err := c.cc.Invoke(ctx, ClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + Get(context.Context, *GetClusterRequest) (*Cluster, error) + GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) + List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) + Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateClusterRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Get(context.Context, *GetClusterRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedClusterServiceServer) GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Update(context.Context, *UpdateClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Get(ctx, req.(*GetClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetByName(ctx, req.(*GetClusterByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ListClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Update(ctx, req.(*UpdateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*DeleteClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.mk8s.v1alpha1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _ClusterService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/mk8s/v1alpha1/cluster_service.proto", +} diff --git a/proto/nebius/mk8s/v1alpha1/instance_template.pb.go b/proto/nebius/mk8s/v1alpha1/instance_template.pb.go new file mode 100644 index 0000000..e65e838 --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/instance_template.pb.go @@ -0,0 +1,420 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/instance_template.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DiskSpec_DiskType int32 + +const ( + DiskSpec_UNSPECIFIED DiskSpec_DiskType = 0 + // the list of available types will be clarified later, it is not final version + DiskSpec_NETWORK_SSD DiskSpec_DiskType = 1 + DiskSpec_NETWORK_HDD DiskSpec_DiskType = 2 + DiskSpec_NETWORK_SSD_IO_M3 DiskSpec_DiskType = 3 + DiskSpec_NETWORK_SSD_NON_REPLICATED DiskSpec_DiskType = 4 +) + +// Enum value maps for DiskSpec_DiskType. +var ( + DiskSpec_DiskType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "NETWORK_SSD", + 2: "NETWORK_HDD", + 3: "NETWORK_SSD_IO_M3", + 4: "NETWORK_SSD_NON_REPLICATED", + } + DiskSpec_DiskType_value = map[string]int32{ + "UNSPECIFIED": 0, + "NETWORK_SSD": 1, + "NETWORK_HDD": 2, + "NETWORK_SSD_IO_M3": 3, + "NETWORK_SSD_NON_REPLICATED": 4, + } +) + +func (x DiskSpec_DiskType) Enum() *DiskSpec_DiskType { + p := new(DiskSpec_DiskType) + *p = x + return p +} + +func (x DiskSpec_DiskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskSpec_DiskType) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1alpha1_instance_template_proto_enumTypes[0].Descriptor() +} + +func (DiskSpec_DiskType) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1alpha1_instance_template_proto_enumTypes[0] +} + +func (x DiskSpec_DiskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskSpec_DiskType.Descriptor instead. +func (DiskSpec_DiskType) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescGZIP(), []int{0, 0} +} + +type DiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Size: + // + // *DiskSpec_SizeBytes + // *DiskSpec_SizeKibibytes + // *DiskSpec_SizeMebibytes + // *DiskSpec_SizeGibibytes + Size isDiskSpec_Size `protobuf_oneof:"size"` + BlockSizeBytes int64 `protobuf:"varint,5,opt,name=block_size_bytes,json=blockSizeBytes,proto3" json:"block_size_bytes,omitempty"` + Type DiskSpec_DiskType `protobuf:"varint,6,opt,name=type,proto3,enum=nebius.mk8s.v1alpha1.DiskSpec_DiskType" json:"type,omitempty"` +} + +func (x *DiskSpec) Reset() { + *x = DiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskSpec) ProtoMessage() {} + +func (x *DiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskSpec.ProtoReflect.Descriptor instead. +func (*DiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescGZIP(), []int{0} +} + +func (m *DiskSpec) GetSize() isDiskSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *DiskSpec) GetSizeBytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeBytes); ok { + return x.SizeBytes + } + return 0 +} + +func (x *DiskSpec) GetSizeKibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeKibibytes); ok { + return x.SizeKibibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeMebibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeMebibytes); ok { + return x.SizeMebibytes + } + return 0 +} + +func (x *DiskSpec) GetSizeGibibytes() int64 { + if x, ok := x.GetSize().(*DiskSpec_SizeGibibytes); ok { + return x.SizeGibibytes + } + return 0 +} + +func (x *DiskSpec) GetBlockSizeBytes() int64 { + if x != nil { + return x.BlockSizeBytes + } + return 0 +} + +func (x *DiskSpec) GetType() DiskSpec_DiskType { + if x != nil { + return x.Type + } + return DiskSpec_UNSPECIFIED +} + +type isDiskSpec_Size interface { + isDiskSpec_Size() +} + +type DiskSpec_SizeBytes struct { + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3,oneof"` +} + +type DiskSpec_SizeKibibytes struct { + SizeKibibytes int64 `protobuf:"varint,2,opt,name=size_kibibytes,json=sizeKibibytes,proto3,oneof"` +} + +type DiskSpec_SizeMebibytes struct { + SizeMebibytes int64 `protobuf:"varint,3,opt,name=size_mebibytes,json=sizeMebibytes,proto3,oneof"` +} + +type DiskSpec_SizeGibibytes struct { + SizeGibibytes int64 `protobuf:"varint,4,opt,name=size_gibibytes,json=sizeGibibytes,proto3,oneof"` +} + +func (*DiskSpec_SizeBytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeKibibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeMebibytes) isDiskSpec_Size() {} + +func (*DiskSpec_SizeGibibytes) isDiskSpec_Size() {} + +type ResourcesSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + // Types that are assignable to Size: + // + // *ResourcesSpec_Preset + Size isResourcesSpec_Size `protobuf_oneof:"size"` +} + +func (x *ResourcesSpec) Reset() { + *x = ResourcesSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesSpec) ProtoMessage() {} + +func (x *ResourcesSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesSpec.ProtoReflect.Descriptor instead. +func (*ResourcesSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescGZIP(), []int{1} +} + +func (x *ResourcesSpec) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (m *ResourcesSpec) GetSize() isResourcesSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *ResourcesSpec) GetPreset() string { + if x, ok := x.GetSize().(*ResourcesSpec_Preset); ok { + return x.Preset + } + return "" +} + +type isResourcesSpec_Size interface { + isResourcesSpec_Size() +} + +type ResourcesSpec_Preset struct { + Preset string `protobuf:"bytes,2,opt,name=preset,proto3,oneof"` +} + +func (*ResourcesSpec_Preset) isResourcesSpec_Size() {} + +var File_nebius_mk8s_v1alpha1_instance_template_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1alpha1_instance_template_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x03, 0x0a, 0x08, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x6b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x4b, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6d, 0x65, 0x62, 0x69, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, + 0x7a, 0x65, 0x4d, 0x65, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0e, 0x73, + 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x69, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x41, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x69, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x74, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, + 0x0f, 0x0a, 0x0b, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x48, 0x44, 0x44, 0x10, 0x02, + 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x5f, + 0x49, 0x4f, 0x5f, 0x4d, 0x33, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x45, 0x54, 0x57, 0x4f, + 0x52, 0x4b, 0x5f, 0x53, 0x53, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, + 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x04, 0x42, 0x0d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x5c, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x06, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x42, 0x6a, 0x0a, 0x1b, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x15, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescData = file_nebius_mk8s_v1alpha1_instance_template_proto_rawDesc +) + +func file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescData) + }) + return file_nebius_mk8s_v1alpha1_instance_template_proto_rawDescData +} + +var file_nebius_mk8s_v1alpha1_instance_template_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_mk8s_v1alpha1_instance_template_proto_goTypes = []any{ + (DiskSpec_DiskType)(0), // 0: nebius.mk8s.v1alpha1.DiskSpec.DiskType + (*DiskSpec)(nil), // 1: nebius.mk8s.v1alpha1.DiskSpec + (*ResourcesSpec)(nil), // 2: nebius.mk8s.v1alpha1.ResourcesSpec +} +var file_nebius_mk8s_v1alpha1_instance_template_proto_depIdxs = []int32{ + 0, // 0: nebius.mk8s.v1alpha1.DiskSpec.type:type_name -> nebius.mk8s.v1alpha1.DiskSpec.DiskType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1alpha1_instance_template_proto_init() } +func file_nebius_mk8s_v1alpha1_instance_template_proto_init() { + if File_nebius_mk8s_v1alpha1_instance_template_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*DiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ResourcesSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[0].OneofWrappers = []any{ + (*DiskSpec_SizeBytes)(nil), + (*DiskSpec_SizeKibibytes)(nil), + (*DiskSpec_SizeMebibytes)(nil), + (*DiskSpec_SizeGibibytes)(nil), + } + file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes[1].OneofWrappers = []any{ + (*ResourcesSpec_Preset)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1alpha1_instance_template_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1alpha1_instance_template_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1alpha1_instance_template_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1alpha1_instance_template_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1alpha1_instance_template_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1alpha1_instance_template_proto = out.File + file_nebius_mk8s_v1alpha1_instance_template_proto_rawDesc = nil + file_nebius_mk8s_v1alpha1_instance_template_proto_goTypes = nil + file_nebius_mk8s_v1alpha1_instance_template_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1alpha1/instance_template.sensitive.pb.go b/proto/nebius/mk8s/v1alpha1/instance_template.sensitive.pb.go new file mode 100644 index 0000000..a0677dd --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/instance_template.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *DiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourcesSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourcesSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1alpha1/node_group.pb.go b/proto/nebius/mk8s/v1alpha1/node_group.pb.go new file mode 100644 index 0000000..65f6dd2 --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/node_group.pb.go @@ -0,0 +1,1677 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/node_group.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AttachedFilesystemSpec_AttachMode int32 + +const ( + AttachedFilesystemSpec_UNSPECIFIED AttachedFilesystemSpec_AttachMode = 0 + AttachedFilesystemSpec_READ_ONLY AttachedFilesystemSpec_AttachMode = 1 + AttachedFilesystemSpec_READ_WRITE AttachedFilesystemSpec_AttachMode = 2 +) + +// Enum value maps for AttachedFilesystemSpec_AttachMode. +var ( + AttachedFilesystemSpec_AttachMode_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "READ_ONLY", + 2: "READ_WRITE", + } + AttachedFilesystemSpec_AttachMode_value = map[string]int32{ + "UNSPECIFIED": 0, + "READ_ONLY": 1, + "READ_WRITE": 2, + } +) + +func (x AttachedFilesystemSpec_AttachMode) Enum() *AttachedFilesystemSpec_AttachMode { + p := new(AttachedFilesystemSpec_AttachMode) + *p = x + return p +} + +func (x AttachedFilesystemSpec_AttachMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttachedFilesystemSpec_AttachMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[0].Descriptor() +} + +func (AttachedFilesystemSpec_AttachMode) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[0] +} + +func (x AttachedFilesystemSpec_AttachMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttachedFilesystemSpec_AttachMode.Descriptor instead. +func (AttachedFilesystemSpec_AttachMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{7, 0} +} + +type NodeTaint_Effect int32 + +const ( + NodeTaint_EFFECT_UNSPECIFIED NodeTaint_Effect = 0 + NodeTaint_NO_EXECUTE NodeTaint_Effect = 1 + NodeTaint_NO_SCHEDULE NodeTaint_Effect = 2 + NodeTaint_PREFER_NO_SCHEDULE NodeTaint_Effect = 3 +) + +// Enum value maps for NodeTaint_Effect. +var ( + NodeTaint_Effect_name = map[int32]string{ + 0: "EFFECT_UNSPECIFIED", + 1: "NO_EXECUTE", + 2: "NO_SCHEDULE", + 3: "PREFER_NO_SCHEDULE", + } + NodeTaint_Effect_value = map[string]int32{ + "EFFECT_UNSPECIFIED": 0, + "NO_EXECUTE": 1, + "NO_SCHEDULE": 2, + "PREFER_NO_SCHEDULE": 3, + } +) + +func (x NodeTaint_Effect) Enum() *NodeTaint_Effect { + p := new(NodeTaint_Effect) + *p = x + return p +} + +func (x NodeTaint_Effect) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeTaint_Effect) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[1].Descriptor() +} + +func (NodeTaint_Effect) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[1] +} + +func (x NodeTaint_Effect) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeTaint_Effect.Descriptor instead. +func (NodeTaint_Effect) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{10, 0} +} + +type NodeGroupStatus_State int32 + +const ( + NodeGroupStatus_STATE_UNSPECIFIED NodeGroupStatus_State = 0 + NodeGroupStatus_PROVISIONING NodeGroupStatus_State = 1 + NodeGroupStatus_RUNNING NodeGroupStatus_State = 2 + NodeGroupStatus_DELETING NodeGroupStatus_State = 3 +) + +// Enum value maps for NodeGroupStatus_State. +var ( + NodeGroupStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "PROVISIONING", + 2: "RUNNING", + 3: "DELETING", + } + NodeGroupStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "DELETING": 3, + } +) + +func (x NodeGroupStatus_State) Enum() *NodeGroupStatus_State { + p := new(NodeGroupStatus_State) + *p = x + return p +} + +func (x NodeGroupStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeGroupStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[2].Descriptor() +} + +func (NodeGroupStatus_State) Type() protoreflect.EnumType { + return &file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes[2] +} + +func (x NodeGroupStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeGroupStatus_State.Descriptor instead. +func (NodeGroupStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{13, 0} +} + +// NodeGroup represents Kubernetes node pool +type NodeGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // the parent_id is an ID of Cluster + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *NodeGroupStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *NodeGroup) Reset() { + *x = NodeGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroup) ProtoMessage() {} + +func (x *NodeGroup) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroup.ProtoReflect.Descriptor instead. +func (*NodeGroup) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeGroup) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *NodeGroup) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *NodeGroup) GetStatus() *NodeGroupStatus { + if x != nil { + return x.Status + } + return nil +} + +type NodeGroupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version is desired Kubernetes version of the cluster. For now only acceptable format is + // `MAJOR.MINOR` like "1.30". Option for patch version update will be added later. + // By default the cluster control plane MAJOR.MINOR version will be used. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Types that are assignable to Size: + // + // *NodeGroupSpec_FixedNodeCount + // *NodeGroupSpec_Autoscaling + Size isNodeGroupSpec_Size `protobuf_oneof:"size"` + Template *NodeTemplate `protobuf:"bytes,3,opt,name=template,proto3" json:"template,omitempty"` + Strategy *NodeGroupDeploymentStrategy `protobuf:"bytes,4,opt,name=strategy,proto3" json:"strategy,omitempty"` +} + +func (x *NodeGroupSpec) Reset() { + *x = NodeGroupSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupSpec) ProtoMessage() {} + +func (x *NodeGroupSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupSpec.ProtoReflect.Descriptor instead. +func (*NodeGroupSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{1} +} + +func (x *NodeGroupSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (m *NodeGroupSpec) GetSize() isNodeGroupSpec_Size { + if m != nil { + return m.Size + } + return nil +} + +func (x *NodeGroupSpec) GetFixedNodeCount() int64 { + if x, ok := x.GetSize().(*NodeGroupSpec_FixedNodeCount); ok { + return x.FixedNodeCount + } + return 0 +} + +func (x *NodeGroupSpec) GetAutoscaling() *NodeGroupAutoscalingSpec { + if x, ok := x.GetSize().(*NodeGroupSpec_Autoscaling); ok { + return x.Autoscaling + } + return nil +} + +func (x *NodeGroupSpec) GetTemplate() *NodeTemplate { + if x != nil { + return x.Template + } + return nil +} + +func (x *NodeGroupSpec) GetStrategy() *NodeGroupDeploymentStrategy { + if x != nil { + return x.Strategy + } + return nil +} + +type isNodeGroupSpec_Size interface { + isNodeGroupSpec_Size() +} + +type NodeGroupSpec_FixedNodeCount struct { + FixedNodeCount int64 `protobuf:"varint,2,opt,name=fixed_node_count,json=fixedNodeCount,proto3,oneof"` // number of nodes in the group +} + +type NodeGroupSpec_Autoscaling struct { + Autoscaling *NodeGroupAutoscalingSpec `protobuf:"bytes,5,opt,name=autoscaling,proto3,oneof"` +} + +func (*NodeGroupSpec_FixedNodeCount) isNodeGroupSpec_Size() {} + +func (*NodeGroupSpec_Autoscaling) isNodeGroupSpec_Size() {} + +type NodeTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *NodeMetadataTemplate `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Taints []*NodeTaint `protobuf:"bytes,2,rep,name=taints,proto3" json:"taints,omitempty"` + Resources *ResourcesSpec `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` + BootDisk *DiskSpec `protobuf:"bytes,9,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + GpuCluster *GpuClusterSpec `protobuf:"bytes,4,opt,name=gpu_cluster,json=gpuCluster,proto3" json:"gpu_cluster,omitempty"` + NetworkInterfaces []*NetworkInterfaceTemplate `protobuf:"bytes,5,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + Filesystems []*AttachedFilesystemSpec `protobuf:"bytes,7,rep,name=filesystems,proto3" json:"filesystems,omitempty"` + // cloud-init user-data. Must contain at least one SSH key. + CloudInitUserData string `protobuf:"bytes,6,opt,name=cloud_init_user_data,json=cloudInitUserData,proto3" json:"cloud_init_user_data,omitempty"` + // the Nebius service account whose credentials will be available on the nodes of the group. + // With these credentials, it is possible to make `npc` or public API requests from the nodes without the need for extra authentication. + // This service account is also used to make requests to container registry. + // + // `resource.serviceaccount.issueAccessToken` permission is required to use this field. + ServiceAccountId string `protobuf:"bytes,10,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` +} + +func (x *NodeTemplate) Reset() { + *x = NodeTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeTemplate) ProtoMessage() {} + +func (x *NodeTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeTemplate.ProtoReflect.Descriptor instead. +func (*NodeTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{2} +} + +func (x *NodeTemplate) GetMetadata() *NodeMetadataTemplate { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *NodeTemplate) GetTaints() []*NodeTaint { + if x != nil { + return x.Taints + } + return nil +} + +func (x *NodeTemplate) GetResources() *ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (x *NodeTemplate) GetBootDisk() *DiskSpec { + if x != nil { + return x.BootDisk + } + return nil +} + +func (x *NodeTemplate) GetGpuCluster() *GpuClusterSpec { + if x != nil { + return x.GpuCluster + } + return nil +} + +func (x *NodeTemplate) GetNetworkInterfaces() []*NetworkInterfaceTemplate { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +func (x *NodeTemplate) GetFilesystems() []*AttachedFilesystemSpec { + if x != nil { + return x.Filesystems + } + return nil +} + +func (x *NodeTemplate) GetCloudInitUserData() string { + if x != nil { + return x.CloudInitUserData + } + return "" +} + +func (x *NodeTemplate) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +type NodeMetadataTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Labels will be propagated into nodes metadata. + // System labels containing "kubernetes.io" and "k8s.io" will not be propagated. + // On update labels they will not be updated in nodes right away, only on node group update. + Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *NodeMetadataTemplate) Reset() { + *x = NodeMetadataTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeMetadataTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeMetadataTemplate) ProtoMessage() {} + +func (x *NodeMetadataTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeMetadataTemplate.ProtoReflect.Descriptor instead. +func (*NodeMetadataTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{3} +} + +func (x *NodeMetadataTemplate) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type GpuClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GpuClusterSpec) Reset() { + *x = GpuClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GpuClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GpuClusterSpec) ProtoMessage() {} + +func (x *GpuClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GpuClusterSpec.ProtoReflect.Descriptor instead. +func (*GpuClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{4} +} + +func (x *GpuClusterSpec) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type NetworkInterfaceTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Public IPv4 address associated with the interface. + PublicIpAddress *PublicIPAddress `protobuf:"bytes,1,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` + // Subnet ID that will be attached to a node cloud intstance network interface. + // By default control plane subnet_id used. + // Subnet should be located in the same network with control plane and have same parent ID as cluster. + SubnetId string `protobuf:"bytes,3,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` +} + +func (x *NetworkInterfaceTemplate) Reset() { + *x = NetworkInterfaceTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceTemplate) ProtoMessage() {} + +func (x *NetworkInterfaceTemplate) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceTemplate.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceTemplate) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{5} +} + +func (x *NetworkInterfaceTemplate) GetPublicIpAddress() *PublicIPAddress { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +func (x *NetworkInterfaceTemplate) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +// Describes a public IP address. +type PublicIPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublicIPAddress) Reset() { + *x = PublicIPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddress) ProtoMessage() {} + +func (x *PublicIPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddress.ProtoReflect.Descriptor instead. +func (*PublicIPAddress) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{6} +} + +type AttachedFilesystemSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttachMode AttachedFilesystemSpec_AttachMode `protobuf:"varint,1,opt,name=attach_mode,json=attachMode,proto3,enum=nebius.mk8s.v1alpha1.AttachedFilesystemSpec_AttachMode" json:"attach_mode,omitempty"` + DeviceName string `protobuf:"bytes,2,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + // Types that are assignable to Type: + // + // *AttachedFilesystemSpec_ExistingFilesystem + Type isAttachedFilesystemSpec_Type `protobuf_oneof:"type"` +} + +func (x *AttachedFilesystemSpec) Reset() { + *x = AttachedFilesystemSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttachedFilesystemSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttachedFilesystemSpec) ProtoMessage() {} + +func (x *AttachedFilesystemSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttachedFilesystemSpec.ProtoReflect.Descriptor instead. +func (*AttachedFilesystemSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{7} +} + +func (x *AttachedFilesystemSpec) GetAttachMode() AttachedFilesystemSpec_AttachMode { + if x != nil { + return x.AttachMode + } + return AttachedFilesystemSpec_UNSPECIFIED +} + +func (x *AttachedFilesystemSpec) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +func (m *AttachedFilesystemSpec) GetType() isAttachedFilesystemSpec_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *AttachedFilesystemSpec) GetExistingFilesystem() *ExistingFilesystem { + if x, ok := x.GetType().(*AttachedFilesystemSpec_ExistingFilesystem); ok { + return x.ExistingFilesystem + } + return nil +} + +type isAttachedFilesystemSpec_Type interface { + isAttachedFilesystemSpec_Type() +} + +type AttachedFilesystemSpec_ExistingFilesystem struct { + ExistingFilesystem *ExistingFilesystem `protobuf:"bytes,3,opt,name=existing_filesystem,json=existingFilesystem,proto3,oneof"` +} + +func (*AttachedFilesystemSpec_ExistingFilesystem) isAttachedFilesystemSpec_Type() {} + +type ExistingFilesystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ExistingFilesystem) Reset() { + *x = ExistingFilesystem{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistingFilesystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistingFilesystem) ProtoMessage() {} + +func (x *ExistingFilesystem) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExistingFilesystem.ProtoReflect.Descriptor instead. +func (*ExistingFilesystem) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{8} +} + +func (x *ExistingFilesystem) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type NodeGroupAutoscalingSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MinNodeCount int64 `protobuf:"varint,1,opt,name=min_node_count,json=minNodeCount,proto3" json:"min_node_count,omitempty"` + MaxNodeCount int64 `protobuf:"varint,2,opt,name=max_node_count,json=maxNodeCount,proto3" json:"max_node_count,omitempty"` +} + +func (x *NodeGroupAutoscalingSpec) Reset() { + *x = NodeGroupAutoscalingSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupAutoscalingSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupAutoscalingSpec) ProtoMessage() {} + +func (x *NodeGroupAutoscalingSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupAutoscalingSpec.ProtoReflect.Descriptor instead. +func (*NodeGroupAutoscalingSpec) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{9} +} + +func (x *NodeGroupAutoscalingSpec) GetMinNodeCount() int64 { + if x != nil { + return x.MinNodeCount + } + return 0 +} + +func (x *NodeGroupAutoscalingSpec) GetMaxNodeCount() int64 { + if x != nil { + return x.MaxNodeCount + } + return 0 +} + +// See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ +type NodeTaint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Effect NodeTaint_Effect `protobuf:"varint,3,opt,name=effect,proto3,enum=nebius.mk8s.v1alpha1.NodeTaint_Effect" json:"effect,omitempty"` +} + +func (x *NodeTaint) Reset() { + *x = NodeTaint{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeTaint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeTaint) ProtoMessage() {} + +func (x *NodeTaint) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeTaint.ProtoReflect.Descriptor instead. +func (*NodeTaint) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{10} +} + +func (x *NodeTaint) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *NodeTaint) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *NodeTaint) GetEffect() NodeTaint_Effect { + if x != nil { + return x.Effect + } + return NodeTaint_EFFECT_UNSPECIFIED +} + +type NodeGroupDeploymentStrategy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of machines that can be unavailable during the update. + // Value can be an absolute number (ex: 5) or a percentage of desired + // machines (ex: 10%). + // Absolute number is calculated from percentage by rounding down. + // This can not be 0 if MaxSurge is 0. + // Defaults to 0. + // Example: when this is set to 30%, the old MachineSet can be scaled + // down to 70% of desired machines immediately when the rolling update + // starts. Once new machines are ready, old MachineSet can be scaled + // down further, followed by scaling up the new MachineSet, ensuring + // that the total number of machines available at all times + // during the update is at least 70% of desired machines. + MaxUnavailable *PercentOrCount `protobuf:"bytes,1,opt,name=max_unavailable,json=maxUnavailable,proto3" json:"max_unavailable,omitempty"` + // The maximum number of machines that can be scheduled above the + // desired number of machines. + // Value can be an absolute number (ex: 5) or a percentage of + // desired machines (ex: 10%). + // This can not be 0 if MaxUnavailable is 0. + // Absolute number is calculated from percentage by rounding up. + // Defaults to 1. + // Example: when this is set to 30%, the new MachineSet can be scaled + // up immediately when the rolling update starts, such that the total + // number of old and new machines do not exceed 130% of desired + // machines. Once old machines have been killed, new MachineSet can + // be scaled up further, ensuring that total number of machines running + // at any time during the update is at most 130% of desired machines. + MaxSurge *PercentOrCount `protobuf:"bytes,2,opt,name=max_surge,json=maxSurge,proto3" json:"max_surge,omitempty"` + // DrainTimeout is the total amount of time that the service will spend on draining a node. + // By default, node can be drained without any time limitations. + // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` + DrainTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=drain_timeout,json=drainTimeout,proto3" json:"drain_timeout,omitempty"` +} + +func (x *NodeGroupDeploymentStrategy) Reset() { + *x = NodeGroupDeploymentStrategy{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupDeploymentStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupDeploymentStrategy) ProtoMessage() {} + +func (x *NodeGroupDeploymentStrategy) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupDeploymentStrategy.ProtoReflect.Descriptor instead. +func (*NodeGroupDeploymentStrategy) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{11} +} + +func (x *NodeGroupDeploymentStrategy) GetMaxUnavailable() *PercentOrCount { + if x != nil { + return x.MaxUnavailable + } + return nil +} + +func (x *NodeGroupDeploymentStrategy) GetMaxSurge() *PercentOrCount { + if x != nil { + return x.MaxSurge + } + return nil +} + +func (x *NodeGroupDeploymentStrategy) GetDrainTimeout() *durationpb.Duration { + if x != nil { + return x.DrainTimeout + } + return nil +} + +type PercentOrCount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Value: + // + // *PercentOrCount_Percent + // *PercentOrCount_Count + Value isPercentOrCount_Value `protobuf_oneof:"value"` +} + +func (x *PercentOrCount) Reset() { + *x = PercentOrCount{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PercentOrCount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PercentOrCount) ProtoMessage() {} + +func (x *PercentOrCount) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PercentOrCount.ProtoReflect.Descriptor instead. +func (*PercentOrCount) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{12} +} + +func (m *PercentOrCount) GetValue() isPercentOrCount_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *PercentOrCount) GetPercent() int64 { + if x, ok := x.GetValue().(*PercentOrCount_Percent); ok { + return x.Percent + } + return 0 +} + +func (x *PercentOrCount) GetCount() int64 { + if x, ok := x.GetValue().(*PercentOrCount_Count); ok { + return x.Count + } + return 0 +} + +type isPercentOrCount_Value interface { + isPercentOrCount_Value() +} + +type PercentOrCount_Percent struct { + Percent int64 `protobuf:"varint,1,opt,name=percent,proto3,oneof"` +} + +type PercentOrCount_Count struct { + Count int64 `protobuf:"varint,2,opt,name=count,proto3,oneof"` +} + +func (*PercentOrCount_Percent) isPercentOrCount_Value() {} + +func (*PercentOrCount_Count) isPercentOrCount_Value() {} + +type NodeGroupStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State NodeGroupStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.mk8s.v1alpha1.NodeGroupStatus_State" json:"state,omitempty"` + // Version have format `MAJOR.MINOR.PATCH-nebius-node.n` like "1.30.0-nebius-node.10". + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // Desired total number of nodes that should be in the node group. + // It is either fixed_node_count or arbitrary number between min_node_count and max_node_count decided by autoscaler. + TargetNodeCount int64 `protobuf:"varint,3,opt,name=target_node_count,json=targetNodeCount,proto3" json:"target_node_count,omitempty"` + // Total number of nodes that are currently in the node group. + // Both ready and not ready nodes are counted. + NodeCount int64 `protobuf:"varint,4,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` + // Total number of nodes that has outdated node configuration. + // These nodes will be replaced by new nodes with up-to-date configuration. + OutdatedNodeCount int64 `protobuf:"varint,5,opt,name=outdated_node_count,json=outdatedNodeCount,proto3" json:"outdated_node_count,omitempty"` + // Total number of nodes that successfully joined the cluster and are ready to serve workloads. + // Both outdated and up-to-date nodes are counted. + ReadyNodeCount int64 `protobuf:"varint,6,opt,name=ready_node_count,json=readyNodeCount,proto3" json:"ready_node_count,omitempty"` + // Show that changes are in flight + Reconciling bool `protobuf:"varint,100,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *NodeGroupStatus) Reset() { + *x = NodeGroupStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeGroupStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeGroupStatus) ProtoMessage() {} + +func (x *NodeGroupStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeGroupStatus.ProtoReflect.Descriptor instead. +func (*NodeGroupStatus) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP(), []int{13} +} + +func (x *NodeGroupStatus) GetState() NodeGroupStatus_State { + if x != nil { + return x.State + } + return NodeGroupStatus_STATE_UNSPECIFIED +} + +func (x *NodeGroupStatus) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *NodeGroupStatus) GetTargetNodeCount() int64 { + if x != nil { + return x.TargetNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetOutdatedNodeCount() int64 { + if x != nil { + return x.OutdatedNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetReadyNodeCount() int64 { + if x != nil { + return x.ReadyNodeCount + } + return 0 +} + +func (x *NodeGroupStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_mk8s_v1alpha1_node_group_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1alpha1_node_group_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, + 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, + 0x38, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x01, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x37, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xcf, 0x02, 0x0a, 0x0d, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, + 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x0d, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xfd, 0x04, 0x0a, 0x0c, + 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x46, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x54, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x49, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, + 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x07, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x0b, 0x67, + 0x70, 0x75, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x67, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x63, 0x0a, 0x12, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x07, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xc0, 0x4a, 0x01, 0x52, 0x11, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x49, 0x6e, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, + 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x14, + 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, + 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x20, 0x0a, 0x0e, 0x47, 0x70, 0x75, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x96, 0x01, 0x0a, 0x18, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x57, + 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, + 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xcd, 0x02, + 0x0a, 0x16, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0b, 0x64, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x5b, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x22, 0x3c, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, + 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x02, 0x42, 0x0d, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x2c, 0x0a, + 0x12, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x66, 0x0a, 0x18, 0x4e, + 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, + 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x6d, 0x69, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, + 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xe6, 0x01, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x69, 0x6e, + 0x74, 0x12, 0x18, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x22, 0x59, 0x0a, 0x06, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x45, + 0x46, 0x46, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, + 0x4c, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x4e, + 0x4f, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x03, 0x22, 0xef, 0x01, 0x0a, + 0x1b, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x4d, 0x0a, 0x0f, + 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, + 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x5f, 0x73, 0x75, 0x72, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x72, 0x67, 0x65, 0x12, 0x3e, + 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x54, + 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0x82, 0x03, 0x0a, 0x0f, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6f, + 0x75, 0x74, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, + 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x4b, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x63, 0x0a, 0x1b, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1alpha1_node_group_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1alpha1_node_group_proto_rawDescData = file_nebius_mk8s_v1alpha1_node_group_proto_rawDesc +) + +func file_nebius_mk8s_v1alpha1_node_group_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1alpha1_node_group_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1alpha1_node_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1alpha1_node_group_proto_rawDescData) + }) + return file_nebius_mk8s_v1alpha1_node_group_proto_rawDescData +} + +var file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_nebius_mk8s_v1alpha1_node_group_proto_goTypes = []any{ + (AttachedFilesystemSpec_AttachMode)(0), // 0: nebius.mk8s.v1alpha1.AttachedFilesystemSpec.AttachMode + (NodeTaint_Effect)(0), // 1: nebius.mk8s.v1alpha1.NodeTaint.Effect + (NodeGroupStatus_State)(0), // 2: nebius.mk8s.v1alpha1.NodeGroupStatus.State + (*NodeGroup)(nil), // 3: nebius.mk8s.v1alpha1.NodeGroup + (*NodeGroupSpec)(nil), // 4: nebius.mk8s.v1alpha1.NodeGroupSpec + (*NodeTemplate)(nil), // 5: nebius.mk8s.v1alpha1.NodeTemplate + (*NodeMetadataTemplate)(nil), // 6: nebius.mk8s.v1alpha1.NodeMetadataTemplate + (*GpuClusterSpec)(nil), // 7: nebius.mk8s.v1alpha1.GpuClusterSpec + (*NetworkInterfaceTemplate)(nil), // 8: nebius.mk8s.v1alpha1.NetworkInterfaceTemplate + (*PublicIPAddress)(nil), // 9: nebius.mk8s.v1alpha1.PublicIPAddress + (*AttachedFilesystemSpec)(nil), // 10: nebius.mk8s.v1alpha1.AttachedFilesystemSpec + (*ExistingFilesystem)(nil), // 11: nebius.mk8s.v1alpha1.ExistingFilesystem + (*NodeGroupAutoscalingSpec)(nil), // 12: nebius.mk8s.v1alpha1.NodeGroupAutoscalingSpec + (*NodeTaint)(nil), // 13: nebius.mk8s.v1alpha1.NodeTaint + (*NodeGroupDeploymentStrategy)(nil), // 14: nebius.mk8s.v1alpha1.NodeGroupDeploymentStrategy + (*PercentOrCount)(nil), // 15: nebius.mk8s.v1alpha1.PercentOrCount + (*NodeGroupStatus)(nil), // 16: nebius.mk8s.v1alpha1.NodeGroupStatus + nil, // 17: nebius.mk8s.v1alpha1.NodeMetadataTemplate.LabelsEntry + (*v1.ResourceMetadata)(nil), // 18: nebius.common.v1.ResourceMetadata + (*ResourcesSpec)(nil), // 19: nebius.mk8s.v1alpha1.ResourcesSpec + (*DiskSpec)(nil), // 20: nebius.mk8s.v1alpha1.DiskSpec + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration +} +var file_nebius_mk8s_v1alpha1_node_group_proto_depIdxs = []int32{ + 18, // 0: nebius.mk8s.v1alpha1.NodeGroup.metadata:type_name -> nebius.common.v1.ResourceMetadata + 4, // 1: nebius.mk8s.v1alpha1.NodeGroup.spec:type_name -> nebius.mk8s.v1alpha1.NodeGroupSpec + 16, // 2: nebius.mk8s.v1alpha1.NodeGroup.status:type_name -> nebius.mk8s.v1alpha1.NodeGroupStatus + 12, // 3: nebius.mk8s.v1alpha1.NodeGroupSpec.autoscaling:type_name -> nebius.mk8s.v1alpha1.NodeGroupAutoscalingSpec + 5, // 4: nebius.mk8s.v1alpha1.NodeGroupSpec.template:type_name -> nebius.mk8s.v1alpha1.NodeTemplate + 14, // 5: nebius.mk8s.v1alpha1.NodeGroupSpec.strategy:type_name -> nebius.mk8s.v1alpha1.NodeGroupDeploymentStrategy + 6, // 6: nebius.mk8s.v1alpha1.NodeTemplate.metadata:type_name -> nebius.mk8s.v1alpha1.NodeMetadataTemplate + 13, // 7: nebius.mk8s.v1alpha1.NodeTemplate.taints:type_name -> nebius.mk8s.v1alpha1.NodeTaint + 19, // 8: nebius.mk8s.v1alpha1.NodeTemplate.resources:type_name -> nebius.mk8s.v1alpha1.ResourcesSpec + 20, // 9: nebius.mk8s.v1alpha1.NodeTemplate.boot_disk:type_name -> nebius.mk8s.v1alpha1.DiskSpec + 7, // 10: nebius.mk8s.v1alpha1.NodeTemplate.gpu_cluster:type_name -> nebius.mk8s.v1alpha1.GpuClusterSpec + 8, // 11: nebius.mk8s.v1alpha1.NodeTemplate.network_interfaces:type_name -> nebius.mk8s.v1alpha1.NetworkInterfaceTemplate + 10, // 12: nebius.mk8s.v1alpha1.NodeTemplate.filesystems:type_name -> nebius.mk8s.v1alpha1.AttachedFilesystemSpec + 17, // 13: nebius.mk8s.v1alpha1.NodeMetadataTemplate.labels:type_name -> nebius.mk8s.v1alpha1.NodeMetadataTemplate.LabelsEntry + 9, // 14: nebius.mk8s.v1alpha1.NetworkInterfaceTemplate.public_ip_address:type_name -> nebius.mk8s.v1alpha1.PublicIPAddress + 0, // 15: nebius.mk8s.v1alpha1.AttachedFilesystemSpec.attach_mode:type_name -> nebius.mk8s.v1alpha1.AttachedFilesystemSpec.AttachMode + 11, // 16: nebius.mk8s.v1alpha1.AttachedFilesystemSpec.existing_filesystem:type_name -> nebius.mk8s.v1alpha1.ExistingFilesystem + 1, // 17: nebius.mk8s.v1alpha1.NodeTaint.effect:type_name -> nebius.mk8s.v1alpha1.NodeTaint.Effect + 15, // 18: nebius.mk8s.v1alpha1.NodeGroupDeploymentStrategy.max_unavailable:type_name -> nebius.mk8s.v1alpha1.PercentOrCount + 15, // 19: nebius.mk8s.v1alpha1.NodeGroupDeploymentStrategy.max_surge:type_name -> nebius.mk8s.v1alpha1.PercentOrCount + 21, // 20: nebius.mk8s.v1alpha1.NodeGroupDeploymentStrategy.drain_timeout:type_name -> google.protobuf.Duration + 2, // 21: nebius.mk8s.v1alpha1.NodeGroupStatus.state:type_name -> nebius.mk8s.v1alpha1.NodeGroupStatus.State + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1alpha1_node_group_proto_init() } +func file_nebius_mk8s_v1alpha1_node_group_proto_init() { + if File_nebius_mk8s_v1alpha1_node_group_proto != nil { + return + } + file_nebius_mk8s_v1alpha1_instance_template_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*NodeTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NodeMetadataTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GpuClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*AttachedFilesystemSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ExistingFilesystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupAutoscalingSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*NodeTaint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupDeploymentStrategy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*PercentOrCount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*NodeGroupStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[1].OneofWrappers = []any{ + (*NodeGroupSpec_FixedNodeCount)(nil), + (*NodeGroupSpec_Autoscaling)(nil), + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[7].OneofWrappers = []any{ + (*AttachedFilesystemSpec_ExistingFilesystem)(nil), + } + file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes[12].OneofWrappers = []any{ + (*PercentOrCount_Percent)(nil), + (*PercentOrCount_Count)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1alpha1_node_group_proto_rawDesc, + NumEnums: 3, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_mk8s_v1alpha1_node_group_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1alpha1_node_group_proto_depIdxs, + EnumInfos: file_nebius_mk8s_v1alpha1_node_group_proto_enumTypes, + MessageInfos: file_nebius_mk8s_v1alpha1_node_group_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1alpha1_node_group_proto = out.File + file_nebius_mk8s_v1alpha1_node_group_proto_rawDesc = nil + file_nebius_mk8s_v1alpha1_node_group_proto_goTypes = nil + file_nebius_mk8s_v1alpha1_node_group_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1alpha1/node_group.sensitive.pb.go b/proto/nebius/mk8s/v1alpha1/node_group.sensitive.pb.go new file mode 100644 index 0000000..4a5d07b --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/node_group.sensitive.pb.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [NodeGroup] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeGroup) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeGroup]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeGroup +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeGroup], use the following code: +// +// var original *NodeGroup +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeGroup) +func (x *NodeGroup) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeGroup) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeGroup)(c)) +} + +// wrapperNodeGroup is used to return [NodeGroup] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeGroup NodeGroup + +func (w *wrapperNodeGroup) String() string { + return (*NodeGroup)(w).String() +} + +func (*wrapperNodeGroup) ProtoMessage() {} + +func (w *wrapperNodeGroup) ProtoReflect() protoreflect.Message { + return (*NodeGroup)(w).ProtoReflect() +} + +// Sanitize mutates [NodeGroupSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeGroupSpec) Sanitize() { + if x == nil { + return + } + x.Template.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeGroupSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeGroupSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeGroupSpec], use the following code: +// +// var original *NodeGroupSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeGroupSpec) +func (x *NodeGroupSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeGroupSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeGroupSpec)(c)) +} + +// wrapperNodeGroupSpec is used to return [NodeGroupSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeGroupSpec NodeGroupSpec + +func (w *wrapperNodeGroupSpec) String() string { + return (*NodeGroupSpec)(w).String() +} + +func (*wrapperNodeGroupSpec) ProtoMessage() {} + +func (w *wrapperNodeGroupSpec) ProtoReflect() protoreflect.Message { + return (*NodeGroupSpec)(w).ProtoReflect() +} + +// Sanitize mutates [NodeTemplate] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *NodeTemplate) Sanitize() { + if x == nil { + return + } + x.CloudInitUserData = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [NodeTemplate]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *NodeTemplate +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [NodeTemplate], use the following code: +// +// var original *NodeTemplate +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*NodeTemplate) +func (x *NodeTemplate) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*NodeTemplate) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperNodeTemplate)(c)) +} + +// wrapperNodeTemplate is used to return [NodeTemplate] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperNodeTemplate NodeTemplate + +func (w *wrapperNodeTemplate) String() string { + return (*NodeTemplate)(w).String() +} + +func (*wrapperNodeTemplate) ProtoMessage() {} + +func (w *wrapperNodeTemplate) ProtoReflect() protoreflect.Message { + return (*NodeTemplate)(w).ProtoReflect() +} + +// func (x *NodeMetadataTemplate) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeMetadataTemplate) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GpuClusterSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *GpuClusterSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceTemplate) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceTemplate) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AttachedFilesystemSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AttachedFilesystemSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExistingFilesystem) Sanitize() // is not generated as no sensitive fields found +// func (x *ExistingFilesystem) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupAutoscalingSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupAutoscalingSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeTaint) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeTaint) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupDeploymentStrategy) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupDeploymentStrategy) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PercentOrCount) Sanitize() // is not generated as no sensitive fields found +// func (x *PercentOrCount) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NodeGroupStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NodeGroupStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1alpha1/node_group_service.pb.go b/proto/nebius/mk8s/v1alpha1/node_group_service.pb.go new file mode 100644 index 0000000..21f646f --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/node_group_service.pb.go @@ -0,0 +1,803 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/node_group_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateNodeGroupRequest) Reset() { + *x = CreateNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNodeGroupRequest) ProtoMessage() {} + +func (x *CreateNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateNodeGroupRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateNodeGroupRequest) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +type GetNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` +} + +func (x *GetNodeGroupRequest) Reset() { + *x = GetNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeGroupRequest) ProtoMessage() {} + +func (x *GetNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*GetNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetNodeGroupRequest) GetResourceVersion() string { + if x != nil { + return x.ResourceVersion + } + return "" +} + +type GetNodeGroupByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetNodeGroupByNameRequest) Reset() { + *x = GetNodeGroupByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeGroupByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeGroupByNameRequest) ProtoMessage() {} + +func (x *GetNodeGroupByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeGroupByNameRequest.ProtoReflect.Descriptor instead. +func (*GetNodeGroupByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetNodeGroupByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetNodeGroupByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListNodeGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the parent Cluster. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListNodeGroupsRequest) Reset() { + *x = ListNodeGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodeGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodeGroupsRequest) ProtoMessage() {} + +func (x *ListNodeGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNodeGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListNodeGroupsRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListNodeGroupsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListNodeGroupsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListNodeGroupsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListNodeGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*NodeGroup `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListNodeGroupsResponse) Reset() { + *x = ListNodeGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodeGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodeGroupsResponse) ProtoMessage() {} + +func (x *ListNodeGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNodeGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListNodeGroupsResponse) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListNodeGroupsResponse) GetItems() []*NodeGroup { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListNodeGroupsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdateNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *NodeGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateNodeGroupRequest) Reset() { + *x = UpdateNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNodeGroupRequest) ProtoMessage() {} + +func (x *UpdateNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateNodeGroupRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateNodeGroupRequest) GetSpec() *NodeGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteNodeGroupRequest) Reset() { + *x = DeleteNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNodeGroupRequest) ProtoMessage() {} + +func (x *DeleteNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UpgradeNodeGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to UpgradeType: + // + // *UpgradeNodeGroupRequest_LatestInfraVersion + UpgradeType isUpgradeNodeGroupRequest_UpgradeType `protobuf_oneof:"upgrade_type"` +} + +func (x *UpgradeNodeGroupRequest) Reset() { + *x = UpgradeNodeGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeNodeGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeNodeGroupRequest) ProtoMessage() {} + +func (x *UpgradeNodeGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeNodeGroupRequest.ProtoReflect.Descriptor instead. +func (*UpgradeNodeGroupRequest) Descriptor() ([]byte, []int) { + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpgradeNodeGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *UpgradeNodeGroupRequest) GetUpgradeType() isUpgradeNodeGroupRequest_UpgradeType { + if m != nil { + return m.UpgradeType + } + return nil +} + +func (x *UpgradeNodeGroupRequest) GetLatestInfraVersion() *emptypb.Empty { + if x, ok := x.GetUpgradeType().(*UpgradeNodeGroupRequest_LatestInfraVersion); ok { + return x.LatestInfraVersion + } + return nil +} + +type isUpgradeNodeGroupRequest_UpgradeType interface { + isUpgradeNodeGroupRequest_UpgradeType() +} + +type UpgradeNodeGroupRequest_LatestInfraVersion struct { + // Upgrades to the latest infra version, which includes latest supported kubernetes patch version. Kubernetes minor version remain the same. + LatestInfraVersion *emptypb.Empty `protobuf:"bytes,2,opt,name=latest_infra_version,json=latestInfraVersion,proto3,oneof"` +} + +func (*UpgradeNodeGroupRequest_LatestInfraVersion) isUpgradeNodeGroupRequest_UpgradeType() {} + +var File_nebius_mk8s_v1alpha1_node_group_service_proto protoreflect.FileDescriptor + +var file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x58, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x77, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x30, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x50, 0x0a, 0x14, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x49, 0x6e, 0x66, 0x72, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x15, 0x0a, 0x0c, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x05, 0xba, 0x48, + 0x02, 0x08, 0x01, 0x32, 0x95, 0x05, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, + 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5d, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x61, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, + 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2c, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, + 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x6b, 0x38, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6a, 0x0a, 0x1b, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x6b, 0x38, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x4e, 0x6f, 0x64, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x6b, 0x38, 0x73, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescOnce sync.Once + file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescData = file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDesc +) + +func file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescGZIP() []byte { + file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescOnce.Do(func() { + file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescData) + }) + return file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDescData +} + +var file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_nebius_mk8s_v1alpha1_node_group_service_proto_goTypes = []any{ + (*CreateNodeGroupRequest)(nil), // 0: nebius.mk8s.v1alpha1.CreateNodeGroupRequest + (*GetNodeGroupRequest)(nil), // 1: nebius.mk8s.v1alpha1.GetNodeGroupRequest + (*GetNodeGroupByNameRequest)(nil), // 2: nebius.mk8s.v1alpha1.GetNodeGroupByNameRequest + (*ListNodeGroupsRequest)(nil), // 3: nebius.mk8s.v1alpha1.ListNodeGroupsRequest + (*ListNodeGroupsResponse)(nil), // 4: nebius.mk8s.v1alpha1.ListNodeGroupsResponse + (*UpdateNodeGroupRequest)(nil), // 5: nebius.mk8s.v1alpha1.UpdateNodeGroupRequest + (*DeleteNodeGroupRequest)(nil), // 6: nebius.mk8s.v1alpha1.DeleteNodeGroupRequest + (*UpgradeNodeGroupRequest)(nil), // 7: nebius.mk8s.v1alpha1.UpgradeNodeGroupRequest + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*NodeGroupSpec)(nil), // 9: nebius.mk8s.v1alpha1.NodeGroupSpec + (*NodeGroup)(nil), // 10: nebius.mk8s.v1alpha1.NodeGroup + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty + (*v1alpha1.Operation)(nil), // 12: nebius.common.v1alpha1.Operation +} +var file_nebius_mk8s_v1alpha1_node_group_service_proto_depIdxs = []int32{ + 8, // 0: nebius.mk8s.v1alpha1.CreateNodeGroupRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 1: nebius.mk8s.v1alpha1.CreateNodeGroupRequest.spec:type_name -> nebius.mk8s.v1alpha1.NodeGroupSpec + 10, // 2: nebius.mk8s.v1alpha1.ListNodeGroupsResponse.items:type_name -> nebius.mk8s.v1alpha1.NodeGroup + 8, // 3: nebius.mk8s.v1alpha1.UpdateNodeGroupRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 4: nebius.mk8s.v1alpha1.UpdateNodeGroupRequest.spec:type_name -> nebius.mk8s.v1alpha1.NodeGroupSpec + 11, // 5: nebius.mk8s.v1alpha1.UpgradeNodeGroupRequest.latest_infra_version:type_name -> google.protobuf.Empty + 1, // 6: nebius.mk8s.v1alpha1.NodeGroupService.Get:input_type -> nebius.mk8s.v1alpha1.GetNodeGroupRequest + 2, // 7: nebius.mk8s.v1alpha1.NodeGroupService.GetByName:input_type -> nebius.mk8s.v1alpha1.GetNodeGroupByNameRequest + 3, // 8: nebius.mk8s.v1alpha1.NodeGroupService.List:input_type -> nebius.mk8s.v1alpha1.ListNodeGroupsRequest + 0, // 9: nebius.mk8s.v1alpha1.NodeGroupService.Create:input_type -> nebius.mk8s.v1alpha1.CreateNodeGroupRequest + 5, // 10: nebius.mk8s.v1alpha1.NodeGroupService.Update:input_type -> nebius.mk8s.v1alpha1.UpdateNodeGroupRequest + 6, // 11: nebius.mk8s.v1alpha1.NodeGroupService.Delete:input_type -> nebius.mk8s.v1alpha1.DeleteNodeGroupRequest + 7, // 12: nebius.mk8s.v1alpha1.NodeGroupService.Upgrade:input_type -> nebius.mk8s.v1alpha1.UpgradeNodeGroupRequest + 10, // 13: nebius.mk8s.v1alpha1.NodeGroupService.Get:output_type -> nebius.mk8s.v1alpha1.NodeGroup + 10, // 14: nebius.mk8s.v1alpha1.NodeGroupService.GetByName:output_type -> nebius.mk8s.v1alpha1.NodeGroup + 4, // 15: nebius.mk8s.v1alpha1.NodeGroupService.List:output_type -> nebius.mk8s.v1alpha1.ListNodeGroupsResponse + 12, // 16: nebius.mk8s.v1alpha1.NodeGroupService.Create:output_type -> nebius.common.v1alpha1.Operation + 12, // 17: nebius.mk8s.v1alpha1.NodeGroupService.Update:output_type -> nebius.common.v1alpha1.Operation + 12, // 18: nebius.mk8s.v1alpha1.NodeGroupService.Delete:output_type -> nebius.common.v1alpha1.Operation + 12, // 19: nebius.mk8s.v1alpha1.NodeGroupService.Upgrade:output_type -> nebius.common.v1alpha1.Operation + 13, // [13:20] is the sub-list for method output_type + 6, // [6:13] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_mk8s_v1alpha1_node_group_service_proto_init() } +func file_nebius_mk8s_v1alpha1_node_group_service_proto_init() { + if File_nebius_mk8s_v1alpha1_node_group_service_proto != nil { + return + } + file_nebius_mk8s_v1alpha1_node_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeGroupByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListNodeGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListNodeGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*UpgradeNodeGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes[7].OneofWrappers = []any{ + (*UpgradeNodeGroupRequest_LatestInfraVersion)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_mk8s_v1alpha1_node_group_service_proto_goTypes, + DependencyIndexes: file_nebius_mk8s_v1alpha1_node_group_service_proto_depIdxs, + MessageInfos: file_nebius_mk8s_v1alpha1_node_group_service_proto_msgTypes, + }.Build() + File_nebius_mk8s_v1alpha1_node_group_service_proto = out.File + file_nebius_mk8s_v1alpha1_node_group_service_proto_rawDesc = nil + file_nebius_mk8s_v1alpha1_node_group_service_proto_goTypes = nil + file_nebius_mk8s_v1alpha1_node_group_service_proto_depIdxs = nil +} diff --git a/proto/nebius/mk8s/v1alpha1/node_group_service.sensitive.pb.go b/proto/nebius/mk8s/v1alpha1/node_group_service.sensitive.pb.go new file mode 100644 index 0000000..de88eeb --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/node_group_service.sensitive.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [CreateNodeGroupRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateNodeGroupRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateNodeGroupRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateNodeGroupRequest], use the following code: +// +// var original *CreateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateNodeGroupRequest) +func (x *CreateNodeGroupRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateNodeGroupRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateNodeGroupRequest)(c)) +} + +// wrapperCreateNodeGroupRequest is used to return [CreateNodeGroupRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateNodeGroupRequest CreateNodeGroupRequest + +func (w *wrapperCreateNodeGroupRequest) String() string { + return (*CreateNodeGroupRequest)(w).String() +} + +func (*wrapperCreateNodeGroupRequest) ProtoMessage() {} + +func (w *wrapperCreateNodeGroupRequest) ProtoReflect() protoreflect.Message { + return (*CreateNodeGroupRequest)(w).ProtoReflect() +} + +// func (x *GetNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetNodeGroupByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNodeGroupByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNodeGroupsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNodeGroupsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListNodeGroupsResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListNodeGroupsResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListNodeGroupsResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListNodeGroupsResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListNodeGroupsResponse], use the following code: +// +// var original *ListNodeGroupsResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListNodeGroupsResponse) +func (x *ListNodeGroupsResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListNodeGroupsResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListNodeGroupsResponse)(c)) +} + +// wrapperListNodeGroupsResponse is used to return [ListNodeGroupsResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListNodeGroupsResponse ListNodeGroupsResponse + +func (w *wrapperListNodeGroupsResponse) String() string { + return (*ListNodeGroupsResponse)(w).String() +} + +func (*wrapperListNodeGroupsResponse) ProtoMessage() {} + +func (w *wrapperListNodeGroupsResponse) ProtoReflect() protoreflect.Message { + return (*ListNodeGroupsResponse)(w).ProtoReflect() +} + +// Sanitize mutates [UpdateNodeGroupRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateNodeGroupRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateNodeGroupRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateNodeGroupRequest], use the following code: +// +// var original *UpdateNodeGroupRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateNodeGroupRequest) +func (x *UpdateNodeGroupRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateNodeGroupRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateNodeGroupRequest)(c)) +} + +// wrapperUpdateNodeGroupRequest is used to return [UpdateNodeGroupRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateNodeGroupRequest UpdateNodeGroupRequest + +func (w *wrapperUpdateNodeGroupRequest) String() string { + return (*UpdateNodeGroupRequest)(w).String() +} + +func (*wrapperUpdateNodeGroupRequest) ProtoMessage() {} + +func (w *wrapperUpdateNodeGroupRequest) ProtoReflect() protoreflect.Message { + return (*UpdateNodeGroupRequest)(w).ProtoReflect() +} + +// func (x *DeleteNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpgradeNodeGroupRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpgradeNodeGroupRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/mk8s/v1alpha1/node_group_service_grpc.pb.go b/proto/nebius/mk8s/v1alpha1/node_group_service_grpc.pb.go new file mode 100644 index 0000000..e186bdf --- /dev/null +++ b/proto/nebius/mk8s/v1alpha1/node_group_service_grpc.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/mk8s/v1alpha1/node_group_service.proto + +package v1alpha1 + +import ( + context "context" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NodeGroupService_Get_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/Get" + NodeGroupService_GetByName_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/GetByName" + NodeGroupService_List_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/List" + NodeGroupService_Create_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/Create" + NodeGroupService_Update_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/Update" + NodeGroupService_Delete_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/Delete" + NodeGroupService_Upgrade_FullMethodName = "/nebius.mk8s.v1alpha1.NodeGroupService/Upgrade" +) + +// NodeGroupServiceClient is the client API for NodeGroupService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NodeGroupServiceClient interface { + Get(ctx context.Context, in *GetNodeGroupRequest, opts ...grpc.CallOption) (*NodeGroup, error) + GetByName(ctx context.Context, in *GetNodeGroupByNameRequest, opts ...grpc.CallOption) (*NodeGroup, error) + List(ctx context.Context, in *ListNodeGroupsRequest, opts ...grpc.CallOption) (*ListNodeGroupsResponse, error) + Create(ctx context.Context, in *CreateNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Upgrade(ctx context.Context, in *UpgradeNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) +} + +type nodeGroupServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNodeGroupServiceClient(cc grpc.ClientConnInterface) NodeGroupServiceClient { + return &nodeGroupServiceClient{cc} +} + +func (c *nodeGroupServiceClient) Get(ctx context.Context, in *GetNodeGroupRequest, opts ...grpc.CallOption) (*NodeGroup, error) { + out := new(NodeGroup) + err := c.cc.Invoke(ctx, NodeGroupService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) GetByName(ctx context.Context, in *GetNodeGroupByNameRequest, opts ...grpc.CallOption) (*NodeGroup, error) { + out := new(NodeGroup) + err := c.cc.Invoke(ctx, NodeGroupService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) List(ctx context.Context, in *ListNodeGroupsRequest, opts ...grpc.CallOption) (*ListNodeGroupsResponse, error) { + out := new(ListNodeGroupsResponse) + err := c.cc.Invoke(ctx, NodeGroupService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Create(ctx context.Context, in *CreateNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Update(ctx context.Context, in *UpdateNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Delete(ctx context.Context, in *DeleteNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeGroupServiceClient) Upgrade(ctx context.Context, in *UpgradeNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, NodeGroupService_Upgrade_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NodeGroupServiceServer is the server API for NodeGroupService service. +// All implementations should embed UnimplementedNodeGroupServiceServer +// for forward compatibility +type NodeGroupServiceServer interface { + Get(context.Context, *GetNodeGroupRequest) (*NodeGroup, error) + GetByName(context.Context, *GetNodeGroupByNameRequest) (*NodeGroup, error) + List(context.Context, *ListNodeGroupsRequest) (*ListNodeGroupsResponse, error) + Create(context.Context, *CreateNodeGroupRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateNodeGroupRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteNodeGroupRequest) (*v1alpha1.Operation, error) + Upgrade(context.Context, *UpgradeNodeGroupRequest) (*v1alpha1.Operation, error) +} + +// UnimplementedNodeGroupServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNodeGroupServiceServer struct { +} + +func (UnimplementedNodeGroupServiceServer) Get(context.Context, *GetNodeGroupRequest) (*NodeGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedNodeGroupServiceServer) GetByName(context.Context, *GetNodeGroupByNameRequest) (*NodeGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedNodeGroupServiceServer) List(context.Context, *ListNodeGroupsRequest) (*ListNodeGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedNodeGroupServiceServer) Create(context.Context, *CreateNodeGroupRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedNodeGroupServiceServer) Update(context.Context, *UpdateNodeGroupRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedNodeGroupServiceServer) Delete(context.Context, *DeleteNodeGroupRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedNodeGroupServiceServer) Upgrade(context.Context, *UpgradeNodeGroupRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Upgrade not implemented") +} + +// UnsafeNodeGroupServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NodeGroupServiceServer will +// result in compilation errors. +type UnsafeNodeGroupServiceServer interface { + mustEmbedUnimplementedNodeGroupServiceServer() +} + +func RegisterNodeGroupServiceServer(s grpc.ServiceRegistrar, srv NodeGroupServiceServer) { + s.RegisterService(&NodeGroupService_ServiceDesc, srv) +} + +func _NodeGroupService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Get(ctx, req.(*GetNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeGroupByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).GetByName(ctx, req.(*GetNodeGroupByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNodeGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).List(ctx, req.(*ListNodeGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Create(ctx, req.(*CreateNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Update(ctx, req.(*UpdateNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Delete(ctx, req.(*DeleteNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NodeGroupService_Upgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpgradeNodeGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeGroupServiceServer).Upgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NodeGroupService_Upgrade_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeGroupServiceServer).Upgrade(ctx, req.(*UpgradeNodeGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NodeGroupService_ServiceDesc is the grpc.ServiceDesc for NodeGroupService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NodeGroupService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.mk8s.v1alpha1.NodeGroupService", + HandlerType: (*NodeGroupServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _NodeGroupService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _NodeGroupService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _NodeGroupService_List_Handler, + }, + { + MethodName: "Create", + Handler: _NodeGroupService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _NodeGroupService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _NodeGroupService_Delete_Handler, + }, + { + MethodName: "Upgrade", + Handler: _NodeGroupService_Upgrade_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/mk8s/v1alpha1/node_group_service.proto", +} diff --git a/proto/nebius/msp/mlflow/v1alpha1/cluster.pb.go b/proto/nebius/msp/mlflow/v1alpha1/cluster.pb.go new file mode 100644 index 0000000..791bd49 --- /dev/null +++ b/proto/nebius/msp/mlflow/v1alpha1/cluster.pb.go @@ -0,0 +1,463 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/mlflow/v1alpha1/cluster.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *MlflowClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *Cluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Cluster) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Cluster) GetStatus() *MlflowClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +// Cluster specification +type ClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of the cluster. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Either make cluster public accessible or accessible only via private VPC. + PublicAccess bool `protobuf:"varint,2,opt,name=public_access,json=publicAccess,proto3" json:"public_access,omitempty"` + // MLflow admin username. + AdminUsername string `protobuf:"bytes,4,opt,name=admin_username,json=adminUsername,proto3" json:"admin_username,omitempty"` + // MLflow admin password. + AdminPassword string `protobuf:"bytes,5,opt,name=admin_password,json=adminPassword,proto3" json:"admin_password,omitempty"` + // Id of the service account that will be used to access S3 bucket (and create one if not provided). + ServiceAccountId string `protobuf:"bytes,6,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` + // Name of the Nebius S3 bucket for MLflow artifacts. If not provided, will be created under the same parent. + StorageBucketName string `protobuf:"bytes,7,opt,name=storage_bucket_name,json=storageBucketName,proto3" json:"storage_bucket_name,omitempty"` + // ID of the vpc network. + NetworkId string `protobuf:"bytes,8,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` +} + +func (x *ClusterSpec) Reset() { + *x = ClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpec) ProtoMessage() {} + +func (x *ClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpec.ProtoReflect.Descriptor instead. +func (*ClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ClusterSpec) GetPublicAccess() bool { + if x != nil { + return x.PublicAccess + } + return false +} + +func (x *ClusterSpec) GetAdminUsername() string { + if x != nil { + return x.AdminUsername + } + return "" +} + +func (x *ClusterSpec) GetAdminPassword() string { + if x != nil { + return x.AdminPassword + } + return "" +} + +func (x *ClusterSpec) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +func (x *ClusterSpec) GetStorageBucketName() string { + if x != nil { + return x.StorageBucketName + } + return "" +} + +func (x *ClusterSpec) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +type MlflowClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase of the cluster. + Phase v1alpha1.ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the phase to define whether it's healthy or not. + State v1alpha1.ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + // Tracking endpoint url. + TrackingEndpoint string `protobuf:"bytes,3,opt,name=tracking_endpoint,json=trackingEndpoint,proto3" json:"tracking_endpoint,omitempty"` + // Name of the Nebius S3 bucket for MLflow artifacts. + EffectiveStorageBucketName string `protobuf:"bytes,4,opt,name=effective_storage_bucket_name,json=effectiveStorageBucketName,proto3" json:"effective_storage_bucket_name,omitempty"` + // Count of experiments in the MLflow cluster + ExperimentsCount uint32 `protobuf:"varint,5,opt,name=experiments_count,json=experimentsCount,proto3" json:"experiments_count,omitempty"` + // MLflow version + MlflowVersion string `protobuf:"bytes,6,opt,name=mlflow_version,json=mlflowVersion,proto3" json:"mlflow_version,omitempty"` +} + +func (x *MlflowClusterStatus) Reset() { + *x = MlflowClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MlflowClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MlflowClusterStatus) ProtoMessage() {} + +func (x *MlflowClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MlflowClusterStatus.ProtoReflect.Descriptor instead. +func (*MlflowClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *MlflowClusterStatus) GetPhase() v1alpha1.ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return v1alpha1.ClusterStatus_Phase(0) +} + +func (x *MlflowClusterStatus) GetState() v1alpha1.ClusterStatus_State { + if x != nil { + return x.State + } + return v1alpha1.ClusterStatus_State(0) +} + +func (x *MlflowClusterStatus) GetTrackingEndpoint() string { + if x != nil { + return x.TrackingEndpoint + } + return "" +} + +func (x *MlflowClusterStatus) GetEffectiveStorageBucketName() string { + if x != nil { + return x.EffectiveStorageBucketName + } + return "" +} + +func (x *MlflowClusterStatus) GetExperimentsCount() uint32 { + if x != nil { + return x.ExperimentsCount + } + return 0 +} + +func (x *MlflowClusterStatus) GetMlflowVersion() string { + if x != nil { + return x.MlflowVersion + } + return "" +} + +var File_nebius_msp_mlflow_v1alpha1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x6d, 0x6c, 0x66, + 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4d, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x0b, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x2d, 0x0a, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x34, 0x0a, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, + 0x4a, 0x01, 0x04, 0xc0, 0x4a, 0x01, 0x52, 0x0d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x34, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x0a, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xd9, 0x02, 0x0a, + 0x13, 0x4d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, + 0x68, 0x61, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x10, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, + 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x6d, 0x0a, 0x21, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescOnce sync.Once + file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescData = file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDesc +) + +func file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescGZIP() []byte { + file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescData) + }) + return file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDescData +} + +var file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_msp_mlflow_v1alpha1_cluster_proto_goTypes = []any{ + (*Cluster)(nil), // 0: nebius.msp.mlflow.v1alpha1.Cluster + (*ClusterSpec)(nil), // 1: nebius.msp.mlflow.v1alpha1.ClusterSpec + (*MlflowClusterStatus)(nil), // 2: nebius.msp.mlflow.v1alpha1.MlflowClusterStatus + (*v1.ResourceMetadata)(nil), // 3: nebius.common.v1.ResourceMetadata + (v1alpha1.ClusterStatus_Phase)(0), // 4: nebius.msp.v1alpha1.ClusterStatus.Phase + (v1alpha1.ClusterStatus_State)(0), // 5: nebius.msp.v1alpha1.ClusterStatus.State +} +var file_nebius_msp_mlflow_v1alpha1_cluster_proto_depIdxs = []int32{ + 3, // 0: nebius.msp.mlflow.v1alpha1.Cluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.msp.mlflow.v1alpha1.Cluster.spec:type_name -> nebius.msp.mlflow.v1alpha1.ClusterSpec + 2, // 2: nebius.msp.mlflow.v1alpha1.Cluster.status:type_name -> nebius.msp.mlflow.v1alpha1.MlflowClusterStatus + 4, // 3: nebius.msp.mlflow.v1alpha1.MlflowClusterStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 5, // 4: nebius.msp.mlflow.v1alpha1.MlflowClusterStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_msp_mlflow_v1alpha1_cluster_proto_init() } +func file_nebius_msp_mlflow_v1alpha1_cluster_proto_init() { + if File_nebius_msp_mlflow_v1alpha1_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*MlflowClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_mlflow_v1alpha1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_msp_mlflow_v1alpha1_cluster_proto_depIdxs, + MessageInfos: file_nebius_msp_mlflow_v1alpha1_cluster_proto_msgTypes, + }.Build() + File_nebius_msp_mlflow_v1alpha1_cluster_proto = out.File + file_nebius_msp_mlflow_v1alpha1_cluster_proto_rawDesc = nil + file_nebius_msp_mlflow_v1alpha1_cluster_proto_goTypes = nil + file_nebius_msp_mlflow_v1alpha1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/mlflow/v1alpha1/cluster.sensitive.pb.go b/proto/nebius/msp/mlflow/v1alpha1/cluster.sensitive.pb.go new file mode 100644 index 0000000..c7e5ccc --- /dev/null +++ b/proto/nebius/msp/mlflow/v1alpha1/cluster.sensitive.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Cluster] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Cluster) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Cluster]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Cluster], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Cluster) +func (x *Cluster) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Cluster) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCluster)(c)) +} + +// wrapperCluster is used to return [Cluster] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCluster Cluster + +func (w *wrapperCluster) String() string { + return (*Cluster)(w).String() +} + +func (*wrapperCluster) ProtoMessage() {} + +func (w *wrapperCluster) ProtoReflect() protoreflect.Message { + return (*Cluster)(w).ProtoReflect() +} + +// Sanitize mutates [ClusterSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ClusterSpec) Sanitize() { + if x == nil { + return + } + x.AdminPassword = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ClusterSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ClusterSpec], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ClusterSpec) +func (x *ClusterSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ClusterSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperClusterSpec)(c)) +} + +// wrapperClusterSpec is used to return [ClusterSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperClusterSpec ClusterSpec + +func (w *wrapperClusterSpec) String() string { + return (*ClusterSpec)(w).String() +} + +func (*wrapperClusterSpec) ProtoMessage() {} + +func (w *wrapperClusterSpec) ProtoReflect() protoreflect.Message { + return (*ClusterSpec)(w).ProtoReflect() +} + +// func (x *MlflowClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *MlflowClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/mlflow/v1alpha1/cluster_service.pb.go b/proto/nebius/msp/mlflow/v1alpha1/cluster_service.pb.go new file mode 100644 index 0000000..c1c08bd --- /dev/null +++ b/proto/nebius/msp/mlflow/v1alpha1/cluster_service.pb.go @@ -0,0 +1,614 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/mlflow/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the cluster to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetClusterRequest) Reset() { + *x = GetClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterRequest) ProtoMessage() {} + +func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. +func (*GetClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetClusterByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to get cluster from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Name of the cluster. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetClusterByNameRequest) Reset() { + *x = GetClusterByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterByNameRequest) ProtoMessage() {} + +func (x *GetClusterByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterByNameRequest.ProtoReflect.Descriptor instead. +func (*GetClusterByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetClusterByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetClusterByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to list clusters from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. Default value is 100. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListClustersRequest) Reset() { + *x = ListClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersRequest) ProtoMessage() {} + +func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. +func (*ListClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of clusters. + Items []*Cluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListClustersResponse) Reset() { + *x = ListClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersResponse) ProtoMessage() {} + +func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. +func (*ListClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListClustersResponse) GetItems() []*Cluster { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the new cluster. Must include parent_id in which we create the cluster. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification for the new cluster. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the cluster to delete. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteClusterRequest) Reset() { + *x = DeleteClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterRequest) ProtoMessage() {} + +func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_msp_mlflow_v1alpha1_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x6d, 0x6c, 0x66, + 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, + 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x76, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, + 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd3, 0x02, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x3a, 0xad, 0x01, 0xba, 0x48, 0xa9, 0x01, 0x1a, 0x5a, 0x0a, 0x12, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x12, 0x26, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x29, 0x1a, 0x4b, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x68, 0x61, 0x73, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x29, 0x22, 0x2e, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x32, 0x8a, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x65, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, + 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x0d, 0xba, 0x4a, 0x0a, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x6d, 0x73, 0x70, + 0x42, 0x74, 0x0a, 0x21, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x6d, 0x6c, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescOnce sync.Once + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescData = file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDesc +) + +func file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescData) + }) + return file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDescData +} + +var file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_goTypes = []any{ + (*GetClusterRequest)(nil), // 0: nebius.msp.mlflow.v1alpha1.GetClusterRequest + (*GetClusterByNameRequest)(nil), // 1: nebius.msp.mlflow.v1alpha1.GetClusterByNameRequest + (*ListClustersRequest)(nil), // 2: nebius.msp.mlflow.v1alpha1.ListClustersRequest + (*ListClustersResponse)(nil), // 3: nebius.msp.mlflow.v1alpha1.ListClustersResponse + (*CreateClusterRequest)(nil), // 4: nebius.msp.mlflow.v1alpha1.CreateClusterRequest + (*DeleteClusterRequest)(nil), // 5: nebius.msp.mlflow.v1alpha1.DeleteClusterRequest + (*Cluster)(nil), // 6: nebius.msp.mlflow.v1alpha1.Cluster + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*ClusterSpec)(nil), // 8: nebius.msp.mlflow.v1alpha1.ClusterSpec + (*v1alpha1.Operation)(nil), // 9: nebius.common.v1alpha1.Operation +} +var file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_depIdxs = []int32{ + 6, // 0: nebius.msp.mlflow.v1alpha1.ListClustersResponse.items:type_name -> nebius.msp.mlflow.v1alpha1.Cluster + 7, // 1: nebius.msp.mlflow.v1alpha1.CreateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 2: nebius.msp.mlflow.v1alpha1.CreateClusterRequest.spec:type_name -> nebius.msp.mlflow.v1alpha1.ClusterSpec + 0, // 3: nebius.msp.mlflow.v1alpha1.ClusterService.Get:input_type -> nebius.msp.mlflow.v1alpha1.GetClusterRequest + 1, // 4: nebius.msp.mlflow.v1alpha1.ClusterService.GetByName:input_type -> nebius.msp.mlflow.v1alpha1.GetClusterByNameRequest + 2, // 5: nebius.msp.mlflow.v1alpha1.ClusterService.List:input_type -> nebius.msp.mlflow.v1alpha1.ListClustersRequest + 4, // 6: nebius.msp.mlflow.v1alpha1.ClusterService.Create:input_type -> nebius.msp.mlflow.v1alpha1.CreateClusterRequest + 5, // 7: nebius.msp.mlflow.v1alpha1.ClusterService.Delete:input_type -> nebius.msp.mlflow.v1alpha1.DeleteClusterRequest + 6, // 8: nebius.msp.mlflow.v1alpha1.ClusterService.Get:output_type -> nebius.msp.mlflow.v1alpha1.Cluster + 6, // 9: nebius.msp.mlflow.v1alpha1.ClusterService.GetByName:output_type -> nebius.msp.mlflow.v1alpha1.Cluster + 3, // 10: nebius.msp.mlflow.v1alpha1.ClusterService.List:output_type -> nebius.msp.mlflow.v1alpha1.ListClustersResponse + 9, // 11: nebius.msp.mlflow.v1alpha1.ClusterService.Create:output_type -> nebius.common.v1alpha1.Operation + 9, // 12: nebius.msp.mlflow.v1alpha1.ClusterService.Delete:output_type -> nebius.common.v1alpha1.Operation + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_init() } +func file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_init() { + if File_nebius_msp_mlflow_v1alpha1_cluster_service_proto != nil { + return + } + file_nebius_msp_mlflow_v1alpha1_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_msgTypes, + }.Build() + File_nebius_msp_mlflow_v1alpha1_cluster_service_proto = out.File + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_rawDesc = nil + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_goTypes = nil + file_nebius_msp_mlflow_v1alpha1_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/mlflow/v1alpha1/cluster_service.sensitive.pb.go b/proto/nebius/msp/mlflow/v1alpha1/cluster_service.sensitive.pb.go new file mode 100644 index 0000000..25eaa4a --- /dev/null +++ b/proto/nebius/msp/mlflow/v1alpha1/cluster_service.sensitive.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetClusterByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListClustersResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListClustersResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListClustersResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListClustersResponse], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListClustersResponse) +func (x *ListClustersResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListClustersResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListClustersResponse)(c)) +} + +// wrapperListClustersResponse is used to return [ListClustersResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListClustersResponse ListClustersResponse + +func (w *wrapperListClustersResponse) String() string { + return (*ListClustersResponse)(w).String() +} + +func (*wrapperListClustersResponse) ProtoMessage() {} + +func (w *wrapperListClustersResponse) ProtoReflect() protoreflect.Message { + return (*ListClustersResponse)(w).ProtoReflect() +} + +// Sanitize mutates [CreateClusterRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateClusterRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateClusterRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateClusterRequest], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateClusterRequest) +func (x *CreateClusterRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateClusterRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateClusterRequest)(c)) +} + +// wrapperCreateClusterRequest is used to return [CreateClusterRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateClusterRequest CreateClusterRequest + +func (w *wrapperCreateClusterRequest) String() string { + return (*CreateClusterRequest)(w).String() +} + +func (*wrapperCreateClusterRequest) ProtoMessage() {} + +func (w *wrapperCreateClusterRequest) ProtoReflect() protoreflect.Message { + return (*CreateClusterRequest)(w).ProtoReflect() +} + +// func (x *DeleteClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/mlflow/v1alpha1/cluster_service_grpc.pb.go b/proto/nebius/msp/mlflow/v1alpha1/cluster_service_grpc.pb.go new file mode 100644 index 0000000..543805c --- /dev/null +++ b/proto/nebius/msp/mlflow/v1alpha1/cluster_service_grpc.pb.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/mlflow/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + context "context" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterService_Get_FullMethodName = "/nebius.msp.mlflow.v1alpha1.ClusterService/Get" + ClusterService_GetByName_FullMethodName = "/nebius.msp.mlflow.v1alpha1.ClusterService/GetByName" + ClusterService_List_FullMethodName = "/nebius.msp.mlflow.v1alpha1.ClusterService/List" + ClusterService_Create_FullMethodName = "/nebius.msp.mlflow.v1alpha1.ClusterService/Create" + ClusterService_Delete_FullMethodName = "/nebius.msp.mlflow.v1alpha1.ClusterService/Delete" +) + +// ClusterServiceClient is the client API for ClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterServiceClient interface { + // Returns the specified cluster. + Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) + // Returns the specified cluster. + GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) + // Retrieves a list of clusters. + List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) + // Creates a cluster. + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + // Delete a cluster. + Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { + out := new(ListClustersResponse) + err := c.cc.Invoke(ctx, ClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + // Returns the specified cluster. + Get(context.Context, *GetClusterRequest) (*Cluster, error) + // Returns the specified cluster. + GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) + // Retrieves a list of clusters. + List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) + // Creates a cluster. + Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) + // Delete a cluster. + Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Get(context.Context, *GetClusterRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedClusterServiceServer) GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Get(ctx, req.(*GetClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetByName(ctx, req.(*GetClusterByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ListClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*DeleteClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.mlflow.v1alpha1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/mlflow/v1alpha1/cluster_service.proto", +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/cluster.pb.go b/proto/nebius/msp/postgresql/v1alpha1/cluster.pb.go new file mode 100644 index 0000000..300e237 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/cluster.pb.go @@ -0,0 +1,1138 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/postgresql/v1alpha1/cluster.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + config "github.com/nebius/gosdk/proto/nebius/msp/postgresql/v1alpha1/config" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ConnectionPoolerConfig_PoolingMode int32 + +const ( + ConnectionPoolerConfig_POOLING_MODE_UNSPECIFIED ConnectionPoolerConfig_PoolingMode = 0 + // Session pooling mode. + ConnectionPoolerConfig_SESSION ConnectionPoolerConfig_PoolingMode = 1 + // Transaction pooling mode. + ConnectionPoolerConfig_TRANSACTION ConnectionPoolerConfig_PoolingMode = 2 +) + +// Enum value maps for ConnectionPoolerConfig_PoolingMode. +var ( + ConnectionPoolerConfig_PoolingMode_name = map[int32]string{ + 0: "POOLING_MODE_UNSPECIFIED", + 1: "SESSION", + 2: "TRANSACTION", + } + ConnectionPoolerConfig_PoolingMode_value = map[string]int32{ + "POOLING_MODE_UNSPECIFIED": 0, + "SESSION": 1, + "TRANSACTION": 2, + } +) + +func (x ConnectionPoolerConfig_PoolingMode) Enum() *ConnectionPoolerConfig_PoolingMode { + p := new(ConnectionPoolerConfig_PoolingMode) + *p = x + return p +} + +func (x ConnectionPoolerConfig_PoolingMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConnectionPoolerConfig_PoolingMode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_enumTypes[0].Descriptor() +} + +func (ConnectionPoolerConfig_PoolingMode) Type() protoreflect.EnumType { + return &file_nebius_msp_postgresql_v1alpha1_cluster_proto_enumTypes[0] +} + +func (x ConnectionPoolerConfig_PoolingMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConnectionPoolerConfig_PoolingMode.Descriptor instead. +func (ConnectionPoolerConfig_PoolingMode) EnumDescriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{1, 0} +} + +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *Cluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Cluster) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Cluster) GetStatus() *ClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +type ConnectionPoolerConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mode that the connection pooler is working in. + PoolingMode ConnectionPoolerConfig_PoolingMode `protobuf:"varint,1,opt,name=pooling_mode,json=poolingMode,proto3,enum=nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig_PoolingMode" json:"pooling_mode,omitempty"` + // Maximum number of connections in the pool for a single database. + MaxPoolSize *int64 `protobuf:"varint,2,opt,name=max_pool_size,json=maxPoolSize,proto3,oneof" json:"max_pool_size,omitempty"` +} + +func (x *ConnectionPoolerConfig) Reset() { + *x = ConnectionPoolerConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionPoolerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionPoolerConfig) ProtoMessage() {} + +func (x *ConnectionPoolerConfig) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionPoolerConfig.ProtoReflect.Descriptor instead. +func (*ConnectionPoolerConfig) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *ConnectionPoolerConfig) GetPoolingMode() ConnectionPoolerConfig_PoolingMode { + if x != nil { + return x.PoolingMode + } + return ConnectionPoolerConfig_POOLING_MODE_UNSPECIFIED +} + +func (x *ConnectionPoolerConfig) GetMaxPoolSize() int64 { + if x != nil && x.MaxPoolSize != nil { + return *x.MaxPoolSize + } + return 0 +} + +type ClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of the PostgreSQL cluster. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Network ID in which the cluster is created. + NetworkId string `protobuf:"bytes,6,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + Config *ConfigSpec `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + Bootstrap *BootstrapSpec `protobuf:"bytes,4,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` + Backup *BackupSpec `protobuf:"bytes,5,opt,name=backup,proto3" json:"backup,omitempty"` +} + +func (x *ClusterSpec) Reset() { + *x = ClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpec) ProtoMessage() {} + +func (x *ClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpec.ProtoReflect.Descriptor instead. +func (*ClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *ClusterSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ClusterSpec) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *ClusterSpec) GetConfig() *ConfigSpec { + if x != nil { + return x.Config + } + return nil +} + +func (x *ClusterSpec) GetBootstrap() *BootstrapSpec { + if x != nil { + return x.Bootstrap + } + return nil +} + +func (x *ClusterSpec) GetBackup() *BackupSpec { + if x != nil { + return x.Backup + } + return nil +} + +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase of the cluster. + Phase v1alpha1.ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the phase to define whether it's healthy or not. + State v1alpha1.ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + // Endpoints of the PostgreSQL cluster. + // + // Deprecated: Marked as deprecated in nebius/msp/postgresql/v1alpha1/cluster.proto. + Endpoints *EndpointsSpec `protobuf:"bytes,3,opt,name=endpoints,proto3" json:"endpoints,omitempty"` + // Cluster resource preset details + PresetDetails *resource.PresetDetails `protobuf:"bytes,4,opt,name=preset_details,json=presetDetails,proto3" json:"preset_details,omitempty"` + // Connection endpoints of the PostgreSQL cluster. + ConnectionEndpoints *Endpoints `protobuf:"bytes,5,opt,name=connection_endpoints,json=connectionEndpoints,proto3" json:"connection_endpoints,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *ClusterStatus) GetPhase() v1alpha1.ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return v1alpha1.ClusterStatus_Phase(0) +} + +func (x *ClusterStatus) GetState() v1alpha1.ClusterStatus_State { + if x != nil { + return x.State + } + return v1alpha1.ClusterStatus_State(0) +} + +// Deprecated: Marked as deprecated in nebius/msp/postgresql/v1alpha1/cluster.proto. +func (x *ClusterStatus) GetEndpoints() *EndpointsSpec { + if x != nil { + return x.Endpoints + } + return nil +} + +func (x *ClusterStatus) GetPresetDetails() *resource.PresetDetails { + if x != nil { + return x.PresetDetails + } + return nil +} + +func (x *ClusterStatus) GetConnectionEndpoints() *Endpoints { + if x != nil { + return x.ConnectionEndpoints + } + return nil +} + +// Deprecated in favor of Endpoints (see below) +type EndpointsSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReadWriteEndpoint string `protobuf:"bytes,1,opt,name=read_write_endpoint,json=readWriteEndpoint,proto3" json:"read_write_endpoint,omitempty"` + ReadOnlyEndpoint *string `protobuf:"bytes,2,opt,name=read_only_endpoint,json=readOnlyEndpoint,proto3,oneof" json:"read_only_endpoint,omitempty"` +} + +func (x *EndpointsSpec) Reset() { + *x = EndpointsSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointsSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointsSpec) ProtoMessage() {} + +func (x *EndpointsSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointsSpec.ProtoReflect.Descriptor instead. +func (*EndpointsSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{4} +} + +func (x *EndpointsSpec) GetReadWriteEndpoint() string { + if x != nil { + return x.ReadWriteEndpoint + } + return "" +} + +func (x *EndpointsSpec) GetReadOnlyEndpoint() string { + if x != nil && x.ReadOnlyEndpoint != nil { + return *x.ReadOnlyEndpoint + } + return "" +} + +type Endpoints struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Read write endpoint of the PostgreSQL cluster accessible from the private VPC. + PrivateReadWrite string `protobuf:"bytes,1,opt,name=private_read_write,json=privateReadWrite,proto3" json:"private_read_write,omitempty"` + // Read only endpoint of the PostgreSQL cluster accessible from the private VPC. + PrivateReadOnly string `protobuf:"bytes,2,opt,name=private_read_only,json=privateReadOnly,proto3" json:"private_read_only,omitempty"` + // Read write endpoint of the PostgreSQL cluster accessible from the internet. + PublicReadWrite string `protobuf:"bytes,3,opt,name=public_read_write,json=publicReadWrite,proto3" json:"public_read_write,omitempty"` + // Read only endpoint of the PostgreSQL cluster accessible from the internet. + PublicReadOnly string `protobuf:"bytes,4,opt,name=public_read_only,json=publicReadOnly,proto3" json:"public_read_only,omitempty"` +} + +func (x *Endpoints) Reset() { + *x = Endpoints{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Endpoints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Endpoints) ProtoMessage() {} + +func (x *Endpoints) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Endpoints.ProtoReflect.Descriptor instead. +func (*Endpoints) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{5} +} + +func (x *Endpoints) GetPrivateReadWrite() string { + if x != nil { + return x.PrivateReadWrite + } + return "" +} + +func (x *Endpoints) GetPrivateReadOnly() string { + if x != nil { + return x.PrivateReadOnly + } + return "" +} + +func (x *Endpoints) GetPublicReadWrite() string { + if x != nil { + return x.PublicReadWrite + } + return "" +} + +func (x *Endpoints) GetPublicReadOnly() string { + if x != nil { + return x.PublicReadOnly + } + return "" +} + +type ConfigSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of PostgreSQL used in the cluster. + // Possible values: `16` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Configuration of the connection pooler. + PoolerConfig *ConnectionPoolerConfig `protobuf:"bytes,2,opt,name=pooler_config,json=poolerConfig,proto3" json:"pooler_config,omitempty"` + // Resources allocated to PostgreSQL hosts. + Resources *TemplateSpec `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` + // Config of the PostgreSQL cluster. + // + // Types that are assignable to Config: + // + // *ConfigSpec_PostgresqlConfig_16 + Config isConfigSpec_Config `protobuf_oneof:"config"` + // Either make cluster public accessible or accessible only via private VPC. + PublicAccess bool `protobuf:"varint,5,opt,name=public_access,json=publicAccess,proto3" json:"public_access,omitempty"` +} + +func (x *ConfigSpec) Reset() { + *x = ConfigSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfigSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigSpec) ProtoMessage() {} + +func (x *ConfigSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigSpec.ProtoReflect.Descriptor instead. +func (*ConfigSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{6} +} + +func (x *ConfigSpec) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ConfigSpec) GetPoolerConfig() *ConnectionPoolerConfig { + if x != nil { + return x.PoolerConfig + } + return nil +} + +func (x *ConfigSpec) GetResources() *TemplateSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (m *ConfigSpec) GetConfig() isConfigSpec_Config { + if m != nil { + return m.Config + } + return nil +} + +func (x *ConfigSpec) GetPostgresqlConfig_16() *config.PostgresqlConfig16 { + if x, ok := x.GetConfig().(*ConfigSpec_PostgresqlConfig_16); ok { + return x.PostgresqlConfig_16 + } + return nil +} + +func (x *ConfigSpec) GetPublicAccess() bool { + if x != nil { + return x.PublicAccess + } + return false +} + +type isConfigSpec_Config interface { + isConfigSpec_Config() +} + +type ConfigSpec_PostgresqlConfig_16 struct { + // Configuration parameters for postgres + PostgresqlConfig_16 *config.PostgresqlConfig16 `protobuf:"bytes,4,opt,name=postgresql_config_16,json=postgresqlConfig16,proto3,oneof"` +} + +func (*ConfigSpec_PostgresqlConfig_16) isConfigSpec_Config() {} + +type BootstrapSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the bootstrap PostgreSQL user. + UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + // Password of the bootstrap PostgreSQL user. + UserPassword string `protobuf:"bytes,2,opt,name=user_password,json=userPassword,proto3" json:"user_password,omitempty"` + // Name of the PostgreSQL database. 1-63 characters long. + DbName string `protobuf:"bytes,3,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"` +} + +func (x *BootstrapSpec) Reset() { + *x = BootstrapSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapSpec) ProtoMessage() {} + +func (x *BootstrapSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapSpec.ProtoReflect.Descriptor instead. +func (*BootstrapSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{7} +} + +func (x *BootstrapSpec) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *BootstrapSpec) GetUserPassword() string { + if x != nil { + return x.UserPassword + } + return "" +} + +func (x *BootstrapSpec) GetDbName() string { + if x != nil { + return x.DbName + } + return "" +} + +type BackupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Backup window start in "HH:MM:SS" format (UTC Time) + BackupWindowStart string `protobuf:"bytes,1,opt,name=backup_window_start,json=backupWindowStart,proto3" json:"backup_window_start,omitempty"` + // Retention policy to be used for backups and WALs (i.e. '7d') + RetentionPolicy string `protobuf:"bytes,2,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"` +} + +func (x *BackupSpec) Reset() { + *x = BackupSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupSpec) ProtoMessage() {} + +func (x *BackupSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupSpec.ProtoReflect.Descriptor instead. +func (*BackupSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP(), []int{8} +} + +func (x *BackupSpec) GetBackupWindowStart() string { + if x != nil { + return x.BackupWindowStart + } + return "" +} + +func (x *BackupSpec) GetRetentionPolicy() string { + if x != nil { + return x.RetentionPolicy + } + return "" +} + +var File_nebius_msp_postgresql_v1alpha1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x36, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x07, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x47, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x65, 0x0a, 0x0c, 0x70, 0x6f, 0x6f, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, + 0x6f, 0x6f, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x70, 0x6f, 0x6f, 0x6c, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x70, + 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0a, + 0xba, 0x48, 0x07, 0x22, 0x05, 0x18, 0x80, 0x64, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x22, 0x49, 0x0a, 0x0b, + 0x50, 0x6f, 0x6f, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, + 0x4f, 0x4f, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xc3, 0x02, 0x0a, 0x0b, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2a, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, + 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x06, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, + 0x92, 0x03, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x4f, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x5c, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, + 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x34, 0x0a, 0x13, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x11, 0x72, 0x65, 0x61, 0x64, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x12, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x48, 0x00, + 0x52, 0x10, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xd3, 0x01, 0x0a, + 0x09, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x12, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x10, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x30, + 0x0a, 0x11, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, + 0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, + 0x12, 0x30, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x05, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x65, 0x61, 0x64, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x05, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, + 0x6c, 0x79, 0x22, 0xfd, 0x02, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x20, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x70, 0x6f, 0x6f, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0c, 0x70, 0x6f, 0x6f, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x52, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x6d, 0x0a, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x31, 0x36, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x31, 0x36, 0x48, 0x00, 0x52, + 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x31, 0x36, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0xf9, 0x05, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x53, 0x70, 0x65, 0x63, 0x12, 0xda, 0x02, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xbc, 0x02, 0xba, 0x48, 0xb8, 0x02, 0xba, + 0x01, 0x56, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x6d, 0x69, + 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2d, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6e, + 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, + 0x65, 0x61, 0x73, 0x74, 0x20, 0x31, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, + 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x2e, 0x1a, 0x0f, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x29, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0xba, 0x01, 0x52, 0x0a, 0x14, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x28, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x20, 0x36, 0x33, 0x20, + 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x1a, 0x10, 0x73, 0x69, 0x7a, + 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3c, 0x3d, 0x20, 0x36, 0x33, 0xba, 0x01, 0x83, + 0x01, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x40, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x3a, 0x20, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, + 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, + 0x5f, 0x2d, 0x5d, 0x2a, 0x24, 0x27, 0x1a, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, + 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x2d, 0x5d, + 0x2a, 0x24, 0x27, 0x29, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x2c, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x4a, 0x01, 0x04, 0xc0, 0x4a, + 0x01, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0xdc, 0x02, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0xc2, 0x02, 0xba, 0x48, 0xbe, 0x02, 0xba, 0x01, 0x58, 0x0a, 0x12, 0x64, 0x62, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, + 0x31, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6c, 0x6f, 0x6e, + 0x67, 0x2e, 0x1a, 0x0f, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, + 0x3d, 0x20, 0x31, 0xba, 0x01, 0x54, 0x0a, 0x12, 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, + 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2c, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x20, 0x36, 0x33, 0x20, 0x63, 0x68, 0x61, + 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x1a, 0x10, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x29, 0x20, 0x3c, 0x3d, 0x20, 0x36, 0x33, 0xba, 0x01, 0x85, 0x01, 0x0a, 0x0f, + 0x64, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x44, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x3a, 0x20, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, + 0x2d, 0x5d, 0x2a, 0x24, 0x27, 0x1a, 0x2c, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x2d, 0x5d, 0x2a, + 0x24, 0x27, 0x29, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x67, + 0x0a, 0x0a, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2e, 0x0a, 0x13, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, + 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x75, 0x0a, 0x25, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescOnce sync.Once + file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescData = file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDesc +) + +func file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescGZIP() []byte { + file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescData) + }) + return file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDescData +} + +var file_nebius_msp_postgresql_v1alpha1_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_msp_postgresql_v1alpha1_cluster_proto_goTypes = []any{ + (ConnectionPoolerConfig_PoolingMode)(0), // 0: nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig.PoolingMode + (*Cluster)(nil), // 1: nebius.msp.postgresql.v1alpha1.Cluster + (*ConnectionPoolerConfig)(nil), // 2: nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig + (*ClusterSpec)(nil), // 3: nebius.msp.postgresql.v1alpha1.ClusterSpec + (*ClusterStatus)(nil), // 4: nebius.msp.postgresql.v1alpha1.ClusterStatus + (*EndpointsSpec)(nil), // 5: nebius.msp.postgresql.v1alpha1.EndpointsSpec + (*Endpoints)(nil), // 6: nebius.msp.postgresql.v1alpha1.Endpoints + (*ConfigSpec)(nil), // 7: nebius.msp.postgresql.v1alpha1.ConfigSpec + (*BootstrapSpec)(nil), // 8: nebius.msp.postgresql.v1alpha1.BootstrapSpec + (*BackupSpec)(nil), // 9: nebius.msp.postgresql.v1alpha1.BackupSpec + (*v1.ResourceMetadata)(nil), // 10: nebius.common.v1.ResourceMetadata + (v1alpha1.ClusterStatus_Phase)(0), // 11: nebius.msp.v1alpha1.ClusterStatus.Phase + (v1alpha1.ClusterStatus_State)(0), // 12: nebius.msp.v1alpha1.ClusterStatus.State + (*resource.PresetDetails)(nil), // 13: nebius.msp.v1alpha1.resource.PresetDetails + (*TemplateSpec)(nil), // 14: nebius.msp.postgresql.v1alpha1.TemplateSpec + (*config.PostgresqlConfig16)(nil), // 15: nebius.msp.postgresql.v1alpha1.config.PostgresqlConfig16 +} +var file_nebius_msp_postgresql_v1alpha1_cluster_proto_depIdxs = []int32{ + 10, // 0: nebius.msp.postgresql.v1alpha1.Cluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.msp.postgresql.v1alpha1.Cluster.spec:type_name -> nebius.msp.postgresql.v1alpha1.ClusterSpec + 4, // 2: nebius.msp.postgresql.v1alpha1.Cluster.status:type_name -> nebius.msp.postgresql.v1alpha1.ClusterStatus + 0, // 3: nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig.pooling_mode:type_name -> nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig.PoolingMode + 7, // 4: nebius.msp.postgresql.v1alpha1.ClusterSpec.config:type_name -> nebius.msp.postgresql.v1alpha1.ConfigSpec + 8, // 5: nebius.msp.postgresql.v1alpha1.ClusterSpec.bootstrap:type_name -> nebius.msp.postgresql.v1alpha1.BootstrapSpec + 9, // 6: nebius.msp.postgresql.v1alpha1.ClusterSpec.backup:type_name -> nebius.msp.postgresql.v1alpha1.BackupSpec + 11, // 7: nebius.msp.postgresql.v1alpha1.ClusterStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 12, // 8: nebius.msp.postgresql.v1alpha1.ClusterStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 5, // 9: nebius.msp.postgresql.v1alpha1.ClusterStatus.endpoints:type_name -> nebius.msp.postgresql.v1alpha1.EndpointsSpec + 13, // 10: nebius.msp.postgresql.v1alpha1.ClusterStatus.preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 6, // 11: nebius.msp.postgresql.v1alpha1.ClusterStatus.connection_endpoints:type_name -> nebius.msp.postgresql.v1alpha1.Endpoints + 2, // 12: nebius.msp.postgresql.v1alpha1.ConfigSpec.pooler_config:type_name -> nebius.msp.postgresql.v1alpha1.ConnectionPoolerConfig + 14, // 13: nebius.msp.postgresql.v1alpha1.ConfigSpec.resources:type_name -> nebius.msp.postgresql.v1alpha1.TemplateSpec + 15, // 14: nebius.msp.postgresql.v1alpha1.ConfigSpec.postgresql_config_16:type_name -> nebius.msp.postgresql.v1alpha1.config.PostgresqlConfig16 + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_nebius_msp_postgresql_v1alpha1_cluster_proto_init() } +func file_nebius_msp_postgresql_v1alpha1_cluster_proto_init() { + if File_nebius_msp_postgresql_v1alpha1_cluster_proto != nil { + return + } + file_nebius_msp_postgresql_v1alpha1_preset_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ConnectionPoolerConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*EndpointsSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*Endpoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ConfigSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*BootstrapSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*BackupSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[1].OneofWrappers = []any{} + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[4].OneofWrappers = []any{} + file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes[6].OneofWrappers = []any{ + (*ConfigSpec_PostgresqlConfig_16)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_postgresql_v1alpha1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_msp_postgresql_v1alpha1_cluster_proto_depIdxs, + EnumInfos: file_nebius_msp_postgresql_v1alpha1_cluster_proto_enumTypes, + MessageInfos: file_nebius_msp_postgresql_v1alpha1_cluster_proto_msgTypes, + }.Build() + File_nebius_msp_postgresql_v1alpha1_cluster_proto = out.File + file_nebius_msp_postgresql_v1alpha1_cluster_proto_rawDesc = nil + file_nebius_msp_postgresql_v1alpha1_cluster_proto_goTypes = nil + file_nebius_msp_postgresql_v1alpha1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/cluster.sensitive.pb.go b/proto/nebius/msp/postgresql/v1alpha1/cluster.sensitive.pb.go new file mode 100644 index 0000000..0870133 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/cluster.sensitive.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Cluster] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Cluster) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Cluster]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Cluster], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Cluster) +func (x *Cluster) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Cluster) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCluster)(c)) +} + +// wrapperCluster is used to return [Cluster] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCluster Cluster + +func (w *wrapperCluster) String() string { + return (*Cluster)(w).String() +} + +func (*wrapperCluster) ProtoMessage() {} + +func (w *wrapperCluster) ProtoReflect() protoreflect.Message { + return (*Cluster)(w).ProtoReflect() +} + +// func (x *ConnectionPoolerConfig) Sanitize() // is not generated as no sensitive fields found +// func (x *ConnectionPoolerConfig) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ClusterSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ClusterSpec) Sanitize() { + if x == nil { + return + } + x.Bootstrap.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ClusterSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ClusterSpec], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ClusterSpec) +func (x *ClusterSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ClusterSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperClusterSpec)(c)) +} + +// wrapperClusterSpec is used to return [ClusterSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperClusterSpec ClusterSpec + +func (w *wrapperClusterSpec) String() string { + return (*ClusterSpec)(w).String() +} + +func (*wrapperClusterSpec) ProtoMessage() {} + +func (w *wrapperClusterSpec) ProtoReflect() protoreflect.Message { + return (*ClusterSpec)(w).ProtoReflect() +} + +// func (x *ClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *EndpointsSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *EndpointsSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Endpoints) Sanitize() // is not generated as no sensitive fields found +// func (x *Endpoints) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ConfigSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ConfigSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [BootstrapSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *BootstrapSpec) Sanitize() { + if x == nil { + return + } + x.UserPassword = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [BootstrapSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *BootstrapSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [BootstrapSpec], use the following code: +// +// var original *BootstrapSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*BootstrapSpec) +func (x *BootstrapSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*BootstrapSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperBootstrapSpec)(c)) +} + +// wrapperBootstrapSpec is used to return [BootstrapSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperBootstrapSpec BootstrapSpec + +func (w *wrapperBootstrapSpec) String() string { + return (*BootstrapSpec)(w).String() +} + +func (*wrapperBootstrapSpec) ProtoMessage() {} + +func (w *wrapperBootstrapSpec) ProtoReflect() protoreflect.Message { + return (*BootstrapSpec)(w).ProtoReflect() +} + +// func (x *BackupSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *BackupSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/postgresql/v1alpha1/cluster_service.pb.go b/proto/nebius/msp/postgresql/v1alpha1/cluster_service.pb.go new file mode 100644 index 0000000..9ac34e1 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/cluster_service.pb.go @@ -0,0 +1,626 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/postgresql/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the PostgreSQL Cluster resource to return. + // To get the cluster ID use a [ClusterService.List] request. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetClusterRequest) Reset() { + *x = GetClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterRequest) ProtoMessage() {} + +func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. +func (*GetClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to list clusters from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListClustersRequest) Reset() { + *x = ListClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersRequest) ProtoMessage() {} + +func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. +func (*ListClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of PostgreSQL Cluster resources. + Clusters []*Cluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value + // for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListClustersResponse) Reset() { + *x = ListClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersResponse) ProtoMessage() {} + +func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. +func (*ListClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListClustersResponse) GetClusters() []*Cluster { + if x != nil { + return x.Clusters + } + return nil +} + +func (x *ListClustersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the new cluster. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification for the new cluster. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the PostgreSQL cluster to delete. + // To get the PostgreSQL cluster ID, use a [ClusterService.List] request. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteClusterRequest) Reset() { + *x = DeleteClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterRequest) ProtoMessage() {} + +func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UpdateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the cluster. Must include id of the cluster we are going to update. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Updated specification for the cluster. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateClusterRequest) Reset() { + *x = UpdateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateClusterRequest) ProtoMessage() {} + +func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +var File_nebius_msp_postgresql_v1alpha1_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x76, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x08, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xa7, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x47, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x9f, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x32, 0xfc, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x31, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x71, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x12, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x06, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x11, 0xba, 0x4a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x6d, + 0x73, 0x70, 0x42, 0x7c, 0x0a, 0x25, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescOnce sync.Once + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescData = file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDesc +) + +func file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescData) + }) + return file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDescData +} + +var file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_goTypes = []any{ + (*GetClusterRequest)(nil), // 0: nebius.msp.postgresql.v1alpha1.GetClusterRequest + (*ListClustersRequest)(nil), // 1: nebius.msp.postgresql.v1alpha1.ListClustersRequest + (*ListClustersResponse)(nil), // 2: nebius.msp.postgresql.v1alpha1.ListClustersResponse + (*CreateClusterRequest)(nil), // 3: nebius.msp.postgresql.v1alpha1.CreateClusterRequest + (*DeleteClusterRequest)(nil), // 4: nebius.msp.postgresql.v1alpha1.DeleteClusterRequest + (*UpdateClusterRequest)(nil), // 5: nebius.msp.postgresql.v1alpha1.UpdateClusterRequest + (*Cluster)(nil), // 6: nebius.msp.postgresql.v1alpha1.Cluster + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*ClusterSpec)(nil), // 8: nebius.msp.postgresql.v1alpha1.ClusterSpec + (*v1.GetByNameRequest)(nil), // 9: nebius.common.v1.GetByNameRequest + (*v1alpha1.Operation)(nil), // 10: nebius.common.v1alpha1.Operation +} +var file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_depIdxs = []int32{ + 6, // 0: nebius.msp.postgresql.v1alpha1.ListClustersResponse.clusters:type_name -> nebius.msp.postgresql.v1alpha1.Cluster + 7, // 1: nebius.msp.postgresql.v1alpha1.CreateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 2: nebius.msp.postgresql.v1alpha1.CreateClusterRequest.spec:type_name -> nebius.msp.postgresql.v1alpha1.ClusterSpec + 7, // 3: nebius.msp.postgresql.v1alpha1.UpdateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 4: nebius.msp.postgresql.v1alpha1.UpdateClusterRequest.spec:type_name -> nebius.msp.postgresql.v1alpha1.ClusterSpec + 0, // 5: nebius.msp.postgresql.v1alpha1.ClusterService.Get:input_type -> nebius.msp.postgresql.v1alpha1.GetClusterRequest + 9, // 6: nebius.msp.postgresql.v1alpha1.ClusterService.GetByName:input_type -> nebius.common.v1.GetByNameRequest + 1, // 7: nebius.msp.postgresql.v1alpha1.ClusterService.List:input_type -> nebius.msp.postgresql.v1alpha1.ListClustersRequest + 3, // 8: nebius.msp.postgresql.v1alpha1.ClusterService.Create:input_type -> nebius.msp.postgresql.v1alpha1.CreateClusterRequest + 4, // 9: nebius.msp.postgresql.v1alpha1.ClusterService.Delete:input_type -> nebius.msp.postgresql.v1alpha1.DeleteClusterRequest + 5, // 10: nebius.msp.postgresql.v1alpha1.ClusterService.Update:input_type -> nebius.msp.postgresql.v1alpha1.UpdateClusterRequest + 6, // 11: nebius.msp.postgresql.v1alpha1.ClusterService.Get:output_type -> nebius.msp.postgresql.v1alpha1.Cluster + 6, // 12: nebius.msp.postgresql.v1alpha1.ClusterService.GetByName:output_type -> nebius.msp.postgresql.v1alpha1.Cluster + 2, // 13: nebius.msp.postgresql.v1alpha1.ClusterService.List:output_type -> nebius.msp.postgresql.v1alpha1.ListClustersResponse + 10, // 14: nebius.msp.postgresql.v1alpha1.ClusterService.Create:output_type -> nebius.common.v1alpha1.Operation + 10, // 15: nebius.msp.postgresql.v1alpha1.ClusterService.Delete:output_type -> nebius.common.v1alpha1.Operation + 10, // 16: nebius.msp.postgresql.v1alpha1.ClusterService.Update:output_type -> nebius.common.v1alpha1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_init() } +func file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_init() { + if File_nebius_msp_postgresql_v1alpha1_cluster_service_proto != nil { + return + } + file_nebius_msp_postgresql_v1alpha1_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_msgTypes, + }.Build() + File_nebius_msp_postgresql_v1alpha1_cluster_service_proto = out.File + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_rawDesc = nil + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_goTypes = nil + file_nebius_msp_postgresql_v1alpha1_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/cluster_service.sensitive.pb.go b/proto/nebius/msp/postgresql/v1alpha1/cluster_service.sensitive.pb.go new file mode 100644 index 0000000..03ecc9d --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/cluster_service.sensitive.pb.go @@ -0,0 +1,152 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListClustersResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListClustersResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Clusters { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListClustersResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListClustersResponse], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListClustersResponse) +func (x *ListClustersResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListClustersResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListClustersResponse)(c)) +} + +// wrapperListClustersResponse is used to return [ListClustersResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListClustersResponse ListClustersResponse + +func (w *wrapperListClustersResponse) String() string { + return (*ListClustersResponse)(w).String() +} + +func (*wrapperListClustersResponse) ProtoMessage() {} + +func (w *wrapperListClustersResponse) ProtoReflect() protoreflect.Message { + return (*ListClustersResponse)(w).ProtoReflect() +} + +// Sanitize mutates [CreateClusterRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateClusterRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateClusterRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateClusterRequest], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateClusterRequest) +func (x *CreateClusterRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateClusterRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateClusterRequest)(c)) +} + +// wrapperCreateClusterRequest is used to return [CreateClusterRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateClusterRequest CreateClusterRequest + +func (w *wrapperCreateClusterRequest) String() string { + return (*CreateClusterRequest)(w).String() +} + +func (*wrapperCreateClusterRequest) ProtoMessage() {} + +func (w *wrapperCreateClusterRequest) ProtoReflect() protoreflect.Message { + return (*CreateClusterRequest)(w).ProtoReflect() +} + +// func (x *DeleteClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [UpdateClusterRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateClusterRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateClusterRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateClusterRequest], use the following code: +// +// var original *UpdateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateClusterRequest) +func (x *UpdateClusterRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateClusterRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateClusterRequest)(c)) +} + +// wrapperUpdateClusterRequest is used to return [UpdateClusterRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateClusterRequest UpdateClusterRequest + +func (w *wrapperUpdateClusterRequest) String() string { + return (*UpdateClusterRequest)(w).String() +} + +func (*wrapperUpdateClusterRequest) ProtoMessage() {} + +func (w *wrapperUpdateClusterRequest) ProtoReflect() protoreflect.Message { + return (*UpdateClusterRequest)(w).ProtoReflect() +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/cluster_service_grpc.pb.go b/proto/nebius/msp/postgresql/v1alpha1/cluster_service_grpc.pb.go new file mode 100644 index 0000000..4c1fc27 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/cluster_service_grpc.pb.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/postgresql/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterService_Get_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/Get" + ClusterService_GetByName_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/GetByName" + ClusterService_List_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/List" + ClusterService_Create_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/Create" + ClusterService_Delete_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/Delete" + ClusterService_Update_FullMethodName = "/nebius.msp.postgresql.v1alpha1.ClusterService/Update" +) + +// ClusterServiceClient is the client API for ClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterServiceClient interface { + // Returns the specified PostgreSQL Cluster resource. + // To get the list of available PostgreSQL Cluster resources, make a [List] request. + Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) + // Returns the specified PostgreSQL Cluster resource by name. + GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Cluster, error) + // Retrieves the list of PostgreSQL Cluster resources that belong + // to the specified folder. + List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) + // Creates a PostgreSQL cluster in the specified folder. + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + // Deletes the specified PostgreSQL cluster. + Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + // Updates the PostgreSQL cluster. + Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) GetByName(ctx context.Context, in *v1.GetByNameRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { + out := new(ListClustersResponse) + err := c.cc.Invoke(ctx, ClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + // Returns the specified PostgreSQL Cluster resource. + // To get the list of available PostgreSQL Cluster resources, make a [List] request. + Get(context.Context, *GetClusterRequest) (*Cluster, error) + // Returns the specified PostgreSQL Cluster resource by name. + GetByName(context.Context, *v1.GetByNameRequest) (*Cluster, error) + // Retrieves the list of PostgreSQL Cluster resources that belong + // to the specified folder. + List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) + // Creates a PostgreSQL cluster in the specified folder. + Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) + // Deletes the specified PostgreSQL cluster. + Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) + // Updates the PostgreSQL cluster. + Update(context.Context, *UpdateClusterRequest) (*v1alpha1.Operation, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Get(context.Context, *GetClusterRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedClusterServiceServer) GetByName(context.Context, *v1.GetByNameRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *DeleteClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedClusterServiceServer) Update(context.Context, *UpdateClusterRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Get(ctx, req.(*GetClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetByName(ctx, req.(*v1.GetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ListClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*DeleteClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Update(ctx, req.(*UpdateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.postgresql.v1alpha1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + { + MethodName: "Update", + Handler: _ClusterService_Update_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/postgresql/v1alpha1/cluster_service.proto", +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.pb.go b/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.pb.go new file mode 100644 index 0000000..d128549 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/postgresql/v1alpha1/config/postgresql.proto + +package config + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PostgresqlConfig16 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AutovacuumWorkMem *int64 `protobuf:"varint,1,opt,name=autovacuum_work_mem,json=autovacuumWorkMem,proto3,oneof" json:"autovacuum_work_mem,omitempty"` // in kilobytes. + StatementTimeout *int64 `protobuf:"varint,2,opt,name=statement_timeout,json=statementTimeout,proto3,oneof" json:"statement_timeout,omitempty"` // in milliseconds. + IdleInTransactionSessionTimeout *int64 `protobuf:"varint,3,opt,name=idle_in_transaction_session_timeout,json=idleInTransactionSessionTimeout,proto3,oneof" json:"idle_in_transaction_session_timeout,omitempty"` // in milliseconds. + AutovacuumVacuumCostDelay *int64 `protobuf:"varint,4,opt,name=autovacuum_vacuum_cost_delay,json=autovacuumVacuumCostDelay,proto3,oneof" json:"autovacuum_vacuum_cost_delay,omitempty"` // in milliseconds. + AutovacuumVacuumCostLimit *int64 `protobuf:"varint,5,opt,name=autovacuum_vacuum_cost_limit,json=autovacuumVacuumCostLimit,proto3,oneof" json:"autovacuum_vacuum_cost_limit,omitempty"` + AutovacuumNaptime *int64 `protobuf:"varint,6,opt,name=autovacuum_naptime,json=autovacuumNaptime,proto3,oneof" json:"autovacuum_naptime,omitempty"` // in seconds. + AutovacuumVacuumScaleFactor *float64 `protobuf:"fixed64,7,opt,name=autovacuum_vacuum_scale_factor,json=autovacuumVacuumScaleFactor,proto3,oneof" json:"autovacuum_vacuum_scale_factor,omitempty"` + AutovacuumAnalyzeScaleFactor *float64 `protobuf:"fixed64,8,opt,name=autovacuum_analyze_scale_factor,json=autovacuumAnalyzeScaleFactor,proto3,oneof" json:"autovacuum_analyze_scale_factor,omitempty"` + DefaultTransactionReadOnly *bool `protobuf:"varint,9,opt,name=default_transaction_read_only,json=defaultTransactionReadOnly,proto3,oneof" json:"default_transaction_read_only,omitempty"` + SearchPath *string `protobuf:"bytes,10,opt,name=search_path,json=searchPath,proto3,oneof" json:"search_path,omitempty"` + MaxConnections *int64 `protobuf:"varint,11,opt,name=max_connections,json=maxConnections,proto3,oneof" json:"max_connections,omitempty"` + SharedBuffers *int64 `protobuf:"varint,12,opt,name=shared_buffers,json=sharedBuffers,proto3,oneof" json:"shared_buffers,omitempty"` // in kilobytes. +} + +func (x *PostgresqlConfig16) Reset() { + *x = PostgresqlConfig16{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresqlConfig16) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresqlConfig16) ProtoMessage() {} + +func (x *PostgresqlConfig16) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostgresqlConfig16.ProtoReflect.Descriptor instead. +func (*PostgresqlConfig16) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescGZIP(), []int{0} +} + +func (x *PostgresqlConfig16) GetAutovacuumWorkMem() int64 { + if x != nil && x.AutovacuumWorkMem != nil { + return *x.AutovacuumWorkMem + } + return 0 +} + +func (x *PostgresqlConfig16) GetStatementTimeout() int64 { + if x != nil && x.StatementTimeout != nil { + return *x.StatementTimeout + } + return 0 +} + +func (x *PostgresqlConfig16) GetIdleInTransactionSessionTimeout() int64 { + if x != nil && x.IdleInTransactionSessionTimeout != nil { + return *x.IdleInTransactionSessionTimeout + } + return 0 +} + +func (x *PostgresqlConfig16) GetAutovacuumVacuumCostDelay() int64 { + if x != nil && x.AutovacuumVacuumCostDelay != nil { + return *x.AutovacuumVacuumCostDelay + } + return 0 +} + +func (x *PostgresqlConfig16) GetAutovacuumVacuumCostLimit() int64 { + if x != nil && x.AutovacuumVacuumCostLimit != nil { + return *x.AutovacuumVacuumCostLimit + } + return 0 +} + +func (x *PostgresqlConfig16) GetAutovacuumNaptime() int64 { + if x != nil && x.AutovacuumNaptime != nil { + return *x.AutovacuumNaptime + } + return 0 +} + +func (x *PostgresqlConfig16) GetAutovacuumVacuumScaleFactor() float64 { + if x != nil && x.AutovacuumVacuumScaleFactor != nil { + return *x.AutovacuumVacuumScaleFactor + } + return 0 +} + +func (x *PostgresqlConfig16) GetAutovacuumAnalyzeScaleFactor() float64 { + if x != nil && x.AutovacuumAnalyzeScaleFactor != nil { + return *x.AutovacuumAnalyzeScaleFactor + } + return 0 +} + +func (x *PostgresqlConfig16) GetDefaultTransactionReadOnly() bool { + if x != nil && x.DefaultTransactionReadOnly != nil { + return *x.DefaultTransactionReadOnly + } + return false +} + +func (x *PostgresqlConfig16) GetSearchPath() string { + if x != nil && x.SearchPath != nil { + return *x.SearchPath + } + return "" +} + +func (x *PostgresqlConfig16) GetMaxConnections() int64 { + if x != nil && x.MaxConnections != nil { + return *x.MaxConnections + } + return 0 +} + +func (x *PostgresqlConfig16) GetSharedBuffers() int64 { + if x != nil && x.SharedBuffers != nil { + return *x.SharedBuffers + } + return 0 +} + +var File_nebius_msp_postgresql_v1alpha1_config_postgresql_proto protoreflect.FileDescriptor + +var file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x09, 0x0a, + 0x12, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x31, 0x36, 0x12, 0x4b, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, + 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x16, 0xba, 0x48, 0x13, 0x22, 0x11, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x48, 0x00, 0x52, 0x11, 0x61, 0x75, 0x74, 0x6f, + 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x4d, 0x65, 0x6d, 0x88, 0x01, 0x01, + 0x12, 0x3f, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0d, 0xba, 0x48, 0x0a, + 0x22, 0x08, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0x00, 0x48, 0x01, 0x52, 0x10, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x60, 0x0a, 0x23, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0d, + 0xba, 0x48, 0x0a, 0x22, 0x08, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0x00, 0x48, 0x02, 0x52, + 0x1f, 0x69, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x88, 0x01, 0x01, 0x12, 0x58, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, + 0x6d, 0x5f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x12, 0xba, 0x48, 0x0f, 0x22, 0x0d, + 0x18, 0x64, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x48, 0x03, 0x52, + 0x19, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x56, 0x61, 0x63, 0x75, 0x75, + 0x6d, 0x43, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x88, 0x01, 0x01, 0x12, 0x59, 0x0a, + 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x63, 0x75, + 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x13, 0xba, 0x48, 0x10, 0x22, 0x0e, 0x18, 0x90, 0x4e, 0x28, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x48, 0x04, 0x52, 0x19, 0x61, 0x75, 0x74, 0x6f, + 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x56, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x43, 0x6f, 0x73, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, + 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x6e, 0x61, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x0c, 0xba, 0x48, 0x09, 0x22, 0x07, 0x18, 0x9b, 0x89, 0x83, 0x01, + 0x28, 0x01, 0x48, 0x05, 0x52, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, + 0x4e, 0x61, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x61, 0x0a, 0x1e, 0x61, 0x75, + 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, + 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x01, 0x42, 0x17, 0xba, 0x48, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x06, 0x52, 0x1b, 0x61, + 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x56, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x53, + 0x63, 0x61, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, + 0x1f, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x7a, 0x65, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xba, 0x48, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, + 0x07, 0x52, 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x41, 0x6e, 0x61, + 0x6c, 0x79, 0x7a, 0x65, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x46, 0x0a, 0x1d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x08, 0x52, 0x1a, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x09, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x38, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x22, 0x05, + 0x18, 0x80, 0x64, 0x28, 0x64, 0x48, 0x0a, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x0e, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x0e, 0xba, 0x48, 0x0b, 0x22, 0x09, 0x18, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x28, + 0x80, 0x01, 0x48, 0x0b, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x73, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x76, + 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6d, 0x65, 0x6d, 0x42, 0x14, + 0x0a, 0x12, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x42, 0x26, 0x0a, 0x24, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x6e, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x1f, 0x0a, 0x1d, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x63, 0x75, + 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x42, 0x1f, 0x0a, + 0x1d, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x63, + 0x75, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x15, + 0x0a, 0x13, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x6e, 0x61, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x76, 0x61, + 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x73, 0x63, 0x61, 0x6c, + 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x22, 0x0a, 0x20, 0x5f, 0x61, 0x75, 0x74, + 0x6f, 0x76, 0x61, 0x63, 0x75, 0x75, 0x6d, 0x5f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x5f, + 0x73, 0x63, 0x61, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x20, 0x0a, 0x1e, + 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x12, + 0x0a, 0x10, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x62, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x73, 0x42, 0x86, 0x01, 0x0a, 0x2c, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescOnce sync.Once + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescData = file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDesc +) + +func file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescGZIP() []byte { + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescOnce.Do(func() { + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescData) + }) + return file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDescData +} + +var file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_goTypes = []any{ + (*PostgresqlConfig16)(nil), // 0: nebius.msp.postgresql.v1alpha1.config.PostgresqlConfig16 +} +var file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_init() } +func file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_init() { + if File_nebius_msp_postgresql_v1alpha1_config_postgresql_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*PostgresqlConfig16); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_goTypes, + DependencyIndexes: file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_depIdxs, + MessageInfos: file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_msgTypes, + }.Build() + File_nebius_msp_postgresql_v1alpha1_config_postgresql_proto = out.File + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_rawDesc = nil + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_goTypes = nil + file_nebius_msp_postgresql_v1alpha1_config_postgresql_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.sensitive.pb.go b/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.sensitive.pb.go new file mode 100644 index 0000000..68c62ab --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/config/postgresql.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package config + +// func (x *PostgresqlConfig16) Sanitize() // is not generated as no sensitive fields found +// func (x *PostgresqlConfig16) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/postgresql/v1alpha1/preset.pb.go b/proto/nebius/msp/postgresql/v1alpha1/preset.pb.go new file mode 100644 index 0000000..80eb8ab --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/preset.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/postgresql/v1alpha1/preset.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hosts *resource.HostSpec `protobuf:"bytes,2,opt,name=hosts,proto3" json:"hosts,omitempty"` + Disk *resource.DiskSpec `protobuf:"bytes,3,opt,name=disk,proto3" json:"disk,omitempty"` + Resources *resource.ResourcesSpec `protobuf:"bytes,4,opt,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *TemplateSpec) Reset() { + *x = TemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_postgresql_v1alpha1_preset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateSpec) ProtoMessage() {} + +func (x *TemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_postgresql_v1alpha1_preset_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateSpec.ProtoReflect.Descriptor instead. +func (*TemplateSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescGZIP(), []int{0} +} + +func (x *TemplateSpec) GetHosts() *resource.HostSpec { + if x != nil { + return x.Hosts + } + return nil +} + +func (x *TemplateSpec) GetDisk() *resource.DiskSpec { + if x != nil { + return x.Disk + } + return nil +} + +func (x *TemplateSpec) GetResources() *resource.ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +var File_nebius_msp_postgresql_v1alpha1_preset_proto protoreflect.FileDescriptor + +var file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, + 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x44, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x42, + 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x64, 0x69, + 0x73, 0x6b, 0x12, 0x49, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x74, 0x0a, + 0x25, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescOnce sync.Once + file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescData = file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDesc +) + +func file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescGZIP() []byte { + file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescOnce.Do(func() { + file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescData) + }) + return file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDescData +} + +var file_nebius_msp_postgresql_v1alpha1_preset_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_msp_postgresql_v1alpha1_preset_proto_goTypes = []any{ + (*TemplateSpec)(nil), // 0: nebius.msp.postgresql.v1alpha1.TemplateSpec + (*resource.HostSpec)(nil), // 1: nebius.msp.v1alpha1.resource.HostSpec + (*resource.DiskSpec)(nil), // 2: nebius.msp.v1alpha1.resource.DiskSpec + (*resource.ResourcesSpec)(nil), // 3: nebius.msp.v1alpha1.resource.ResourcesSpec +} +var file_nebius_msp_postgresql_v1alpha1_preset_proto_depIdxs = []int32{ + 1, // 0: nebius.msp.postgresql.v1alpha1.TemplateSpec.hosts:type_name -> nebius.msp.v1alpha1.resource.HostSpec + 2, // 1: nebius.msp.postgresql.v1alpha1.TemplateSpec.disk:type_name -> nebius.msp.v1alpha1.resource.DiskSpec + 3, // 2: nebius.msp.postgresql.v1alpha1.TemplateSpec.resources:type_name -> nebius.msp.v1alpha1.resource.ResourcesSpec + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_msp_postgresql_v1alpha1_preset_proto_init() } +func file_nebius_msp_postgresql_v1alpha1_preset_proto_init() { + if File_nebius_msp_postgresql_v1alpha1_preset_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_postgresql_v1alpha1_preset_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*TemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_postgresql_v1alpha1_preset_proto_goTypes, + DependencyIndexes: file_nebius_msp_postgresql_v1alpha1_preset_proto_depIdxs, + MessageInfos: file_nebius_msp_postgresql_v1alpha1_preset_proto_msgTypes, + }.Build() + File_nebius_msp_postgresql_v1alpha1_preset_proto = out.File + file_nebius_msp_postgresql_v1alpha1_preset_proto_rawDesc = nil + file_nebius_msp_postgresql_v1alpha1_preset_proto_goTypes = nil + file_nebius_msp_postgresql_v1alpha1_preset_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/postgresql/v1alpha1/preset.sensitive.pb.go b/proto/nebius/msp/postgresql/v1alpha1/preset.sensitive.pb.go new file mode 100644 index 0000000..4831fc5 --- /dev/null +++ b/proto/nebius/msp/postgresql/v1alpha1/preset.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *TemplateSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *TemplateSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/cluster.pb.go b/proto/nebius/msp/spark/v1alpha1/cluster.pb.go new file mode 100644 index 0000000..201ac60 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/cluster.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/cluster.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Cluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ClusterStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Cluster) Reset() { + *x = Cluster{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cluster) ProtoMessage() {} + +func (x *Cluster) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. +func (*Cluster) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *Cluster) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Cluster) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Cluster) GetStatus() *ClusterStatus { + if x != nil { + return x.Status + } + return nil +} + +// Cluster specification +type ClusterSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of the cluster. + Description *string `protobuf:"bytes,1,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Limits for the cluster + Limits *Limits `protobuf:"bytes,3,opt,name=limits,proto3" json:"limits,omitempty"` + // Password for Spark History server and Sessions. + Authorization *Password `protobuf:"bytes,4,opt,name=authorization,proto3" json:"authorization,omitempty"` + // ID of the user service account for accessing + // S3 buckets in the user project + ServiceAccountId string `protobuf:"bytes,5,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"` + NetworkId string `protobuf:"bytes,6,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` +} + +func (x *ClusterSpec) Reset() { + *x = ClusterSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterSpec) ProtoMessage() {} + +func (x *ClusterSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterSpec.ProtoReflect.Descriptor instead. +func (*ClusterSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterSpec) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *ClusterSpec) GetLimits() *Limits { + if x != nil { + return x.Limits + } + return nil +} + +func (x *ClusterSpec) GetAuthorization() *Password { + if x != nil { + return x.Authorization + } + return nil +} + +func (x *ClusterSpec) GetServiceAccountId() string { + if x != nil { + return x.ServiceAccountId + } + return "" +} + +func (x *ClusterSpec) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase (or stage) of the cluster. + Phase v1alpha1.ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the stage to define whether it's healthy or not. + State v1alpha1.ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + // History Server WebUI endpoint + HistoryServerEndpoint *string `protobuf:"bytes,3,opt,name=history_server_endpoint,json=historyServerEndpoint,proto3,oneof" json:"history_server_endpoint,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *ClusterStatus) GetPhase() v1alpha1.ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return v1alpha1.ClusterStatus_Phase(0) +} + +func (x *ClusterStatus) GetState() v1alpha1.ClusterStatus_State { + if x != nil { + return x.State + } + return v1alpha1.ClusterStatus_State(0) +} + +func (x *ClusterStatus) GetHistoryServerEndpoint() string { + if x != nil && x.HistoryServerEndpoint != nil { + return *x.HistoryServerEndpoint + } + return "" +} + +type Limits struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cpu int64 `protobuf:"varint,1,opt,name=cpu,proto3" json:"cpu,omitempty"` + MemoryGibibytes int64 `protobuf:"varint,2,opt,name=memory_gibibytes,json=memoryGibibytes,proto3" json:"memory_gibibytes,omitempty"` +} + +func (x *Limits) Reset() { + *x = Limits{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Limits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Limits) ProtoMessage() {} + +func (x *Limits) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Limits.ProtoReflect.Descriptor instead. +func (*Limits) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *Limits) GetCpu() int64 { + if x != nil { + return x.Cpu + } + return 0 +} + +func (x *Limits) GetMemoryGibibytes() int64 { + if x != nil { + return x.MemoryGibibytes + } + return 0 +} + +type Password struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *Password) Reset() { + *x = Password{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Password) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Password) ProtoMessage() {} + +func (x *Password) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Password.ProtoReflect.Descriptor instead. +func (*Password) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP(), []int{4} +} + +func (x *Password) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +var File_nebius_msp_spark_v1alpha1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xdd, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, + 0xbf, 0x02, 0x0a, 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x41, 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x04, 0x52, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x12, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x29, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, + 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x22, 0xe8, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x17, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x06, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x22, 0x05, 0x18, 0x80, 0x0a, + 0x20, 0x00, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x38, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x22, 0x05, 0x18, 0x80, 0x50, 0x20, 0x00, + 0x52, 0x0f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x22, 0xaa, 0x06, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x9d, + 0x06, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x80, 0x06, 0xba, 0x48, 0xf9, 0x05, 0xba, 0x01, 0x58, 0x0a, 0x13, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x30, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, + 0x38, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6c, 0x6f, 0x6e, + 0x67, 0x2e, 0x1a, 0x0f, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x20, 0x3e, + 0x3d, 0x20, 0x38, 0xba, 0x01, 0x54, 0x0a, 0x13, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2b, 0x54, 0x68, 0x65, + 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x20, 0x36, 0x34, 0x20, 0x63, 0x68, 0x61, + 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x1a, 0x10, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x29, 0x20, 0x3c, 0x3d, 0x20, 0x36, 0x34, 0xba, 0x01, 0x6a, 0x0a, 0x13, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x61, 0x73, 0x63, 0x69, 0x69, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x12, 0x38, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6f, 0x6e, + 0x6c, 0x79, 0x20, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x41, 0x53, 0x43, 0x49, 0x49, + 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x1a, 0x19, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x27, 0x5e, 0x5b, 0x21, + 0x2d, 0x7e, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0xba, 0x01, 0x6a, 0x0a, 0x17, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x63, + 0x61, 0x73, 0x65, 0x12, 0x38, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, + 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6c, 0x6f, 0x77, 0x65, + 0x72, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x1a, 0x15, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5b, 0x61, 0x2d, + 0x7a, 0x5d, 0x27, 0x29, 0xba, 0x01, 0x6a, 0x0a, 0x17, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65, + 0x12, 0x38, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, + 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x75, 0x70, 0x70, 0x65, 0x72, 0x63, 0x61, + 0x73, 0x65, 0x20, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x1a, 0x15, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5b, 0x41, 0x2d, 0x5a, 0x5d, 0x27, + 0x29, 0xba, 0x01, 0x5b, 0x0a, 0x13, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x6d, + 0x69, 0x6e, 0x5f, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73, 0x12, 0x2d, 0x54, 0x68, 0x65, 0x20, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, + 0x65, 0x20, 0x64, 0x69, 0x67, 0x69, 0x74, 0x2e, 0x1a, 0x15, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x27, 0x29, 0xba, + 0x01, 0x9b, 0x01, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x6d, 0x69, + 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x12, 0x5a, 0x54, 0x68, 0x65, 0x20, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, + 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, + 0x74, 0x65, 0x72, 0x3a, 0x20, 0x21, 0x40, 0x23, 0x24, 0x25, 0x5e, 0x26, 0x2a, 0x28, 0x29, 0x5f, + 0x2b, 0x2d, 0x3d, 0x5b, 0x5d, 0x7b, 0x7d, 0x3c, 0x3e, 0x3b, 0x3a, 0x27, 0x22, 0x5c, 0x7c, 0x2c, + 0x2e, 0x2f, 0x3f, 0x60, 0x7e, 0x1a, 0x27, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x28, 0x27, 0x5b, 0x21, 0x2d, 0x2f, 0x5d, 0x7c, 0x5b, 0x3a, 0x2d, 0x40, 0x5d, + 0x7c, 0x5b, 0x5b, 0x2d, 0x60, 0x5d, 0x7c, 0x5b, 0x7b, 0x2d, 0x7e, 0x5d, 0x27, 0x29, 0xc8, 0x01, + 0x01, 0xc0, 0x4a, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x6b, + 0x0a, 0x20, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescData = file_nebius_msp_spark_v1alpha1_cluster_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_cluster_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_msp_spark_v1alpha1_cluster_proto_goTypes = []any{ + (*Cluster)(nil), // 0: nebius.msp.spark.v1alpha1.Cluster + (*ClusterSpec)(nil), // 1: nebius.msp.spark.v1alpha1.ClusterSpec + (*ClusterStatus)(nil), // 2: nebius.msp.spark.v1alpha1.ClusterStatus + (*Limits)(nil), // 3: nebius.msp.spark.v1alpha1.Limits + (*Password)(nil), // 4: nebius.msp.spark.v1alpha1.Password + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata + (v1alpha1.ClusterStatus_Phase)(0), // 6: nebius.msp.v1alpha1.ClusterStatus.Phase + (v1alpha1.ClusterStatus_State)(0), // 7: nebius.msp.v1alpha1.ClusterStatus.State +} +var file_nebius_msp_spark_v1alpha1_cluster_proto_depIdxs = []int32{ + 5, // 0: nebius.msp.spark.v1alpha1.Cluster.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.msp.spark.v1alpha1.Cluster.spec:type_name -> nebius.msp.spark.v1alpha1.ClusterSpec + 2, // 2: nebius.msp.spark.v1alpha1.Cluster.status:type_name -> nebius.msp.spark.v1alpha1.ClusterStatus + 3, // 3: nebius.msp.spark.v1alpha1.ClusterSpec.limits:type_name -> nebius.msp.spark.v1alpha1.Limits + 4, // 4: nebius.msp.spark.v1alpha1.ClusterSpec.authorization:type_name -> nebius.msp.spark.v1alpha1.Password + 6, // 5: nebius.msp.spark.v1alpha1.ClusterStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 7, // 6: nebius.msp.spark.v1alpha1.ClusterStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_cluster_proto_init() } +func file_nebius_msp_spark_v1alpha1_cluster_proto_init() { + if File_nebius_msp_spark_v1alpha1_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Cluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ClusterSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Limits); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*Password); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[1].OneofWrappers = []any{} + file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_cluster_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_cluster_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_cluster_proto = out.File + file_nebius_msp_spark_v1alpha1_cluster_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_cluster_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/cluster.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/cluster.sensitive.pb.go new file mode 100644 index 0000000..21fa320 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/cluster.sensitive.pb.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// Sanitize mutates [Cluster] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Cluster) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Cluster]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Cluster], use the following code: +// +// var original *Cluster +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Cluster) +func (x *Cluster) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Cluster) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCluster)(c)) +} + +// wrapperCluster is used to return [Cluster] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCluster Cluster + +func (w *wrapperCluster) String() string { + return (*Cluster)(w).String() +} + +func (*wrapperCluster) ProtoMessage() {} + +func (w *wrapperCluster) ProtoReflect() protoreflect.Message { + return (*Cluster)(w).ProtoReflect() +} + +// Sanitize mutates [ClusterSpec] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ClusterSpec) Sanitize() { + if x == nil { + return + } + x.Authorization.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ClusterSpec]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ClusterSpec], use the following code: +// +// var original *ClusterSpec +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ClusterSpec) +func (x *ClusterSpec) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ClusterSpec) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperClusterSpec)(c)) +} + +// wrapperClusterSpec is used to return [ClusterSpec] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperClusterSpec ClusterSpec + +func (w *wrapperClusterSpec) String() string { + return (*ClusterSpec)(w).String() +} + +func (*wrapperClusterSpec) ProtoMessage() {} + +func (w *wrapperClusterSpec) ProtoReflect() protoreflect.Message { + return (*ClusterSpec)(w).ProtoReflect() +} + +// func (x *ClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Limits) Sanitize() // is not generated as no sensitive fields found +// func (x *Limits) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [Password] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *Password) Sanitize() { + if x == nil { + return + } + x.Password = "***" +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [Password]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *Password +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [Password], use the following code: +// +// var original *Password +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*Password) +func (x *Password) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*Password) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperPassword)(c)) +} + +// wrapperPassword is used to return [Password] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperPassword Password + +func (w *wrapperPassword) String() string { + return (*Password)(w).String() +} + +func (*wrapperPassword) ProtoMessage() {} + +func (w *wrapperPassword) ProtoReflect() protoreflect.Message { + return (*Password)(w).ProtoReflect() +} diff --git a/proto/nebius/msp/spark/v1alpha1/cluster_service.pb.go b/proto/nebius/msp/spark/v1alpha1/cluster_service.pb.go new file mode 100644 index 0000000..202d706 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/cluster_service.pb.go @@ -0,0 +1,712 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the cluster to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetClusterRequest) Reset() { + *x = GetClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterRequest) ProtoMessage() {} + +func (x *GetClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead. +func (*GetClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetClusterByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Parent ID of the cluster to retrieve. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Name of the cluster to retrieve. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetClusterByNameRequest) Reset() { + *x = GetClusterByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClusterByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClusterByNameRequest) ProtoMessage() {} + +func (x *GetClusterByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClusterByNameRequest.ProtoReflect.Descriptor instead. +func (*GetClusterByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetClusterByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetClusterByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to list clusters from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. Default value is 100. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListClustersRequest) Reset() { + *x = ListClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersRequest) ProtoMessage() {} + +func (x *ListClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead. +func (*ListClustersRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListClustersRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListClustersRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListClustersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of clusters. + Items []*Cluster `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListClustersResponse) Reset() { + *x = ListClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListClustersResponse) ProtoMessage() {} + +func (x *ListClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead. +func (*ListClustersResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListClustersResponse) GetItems() []*Cluster { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListClustersResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +type CreateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the new cluster. Must include parent_id in which we create the cluster. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification for the new cluster. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateClusterRequest) Reset() { + *x = CreateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClusterRequest) ProtoMessage() {} + +func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the cluster. Must include id of the cluster we are going to update. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Updated specification for the cluster. + Spec *ClusterSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateClusterRequest) Reset() { + *x = UpdateClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateClusterRequest) ProtoMessage() {} + +func (x *UpdateClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateClusterRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateClusterRequest) GetSpec() *ClusterSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the cluster to delete. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteClusterRequest) Reset() { + *x = DeleteClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterRequest) ProtoMessage() {} + +func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. +func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteClusterRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_msp_spark_v1alpha1_cluster_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, + 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x81, 0x03, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x3a, 0xdc, 0x01, 0xba, 0x48, 0xd8, + 0x01, 0x1a, 0x7f, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x27, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x27, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x27, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x27, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x27, 0x6e, 0x61, 0x6d, 0x65, 0x27, 0x1a, 0x37, 0x68, 0x61, 0x73, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x29, 0x20, 0x26, 0x26, 0x20, 0x68, 0x61, 0x73, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x29, 0x1a, 0x55, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x12, 0x20, 0x27, 0x73, 0x70, 0x65, 0x63, + 0x27, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x27, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x1a, 0x1c, 0x68, 0x61, 0x73, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x22, 0xec, 0x01, 0x0a, 0x14, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x3a, 0x50, 0xba, 0x48, 0x4d, 0x1a, 0x4b, 0x0a, 0x17, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x27, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x27, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x27, 0x69, 0x64, + 0x27, 0x1a, 0x15, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x29, 0x22, 0x2e, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xca, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x03, 0x47, + 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x04, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x09, 0xba, 0x4a, 0x06, 0x73, + 0x70, 0x2e, 0x6d, 0x73, 0x70, 0x42, 0x72, 0x0a, 0x20, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescData = file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_msp_spark_v1alpha1_cluster_service_proto_goTypes = []any{ + (*GetClusterRequest)(nil), // 0: nebius.msp.spark.v1alpha1.GetClusterRequest + (*GetClusterByNameRequest)(nil), // 1: nebius.msp.spark.v1alpha1.GetClusterByNameRequest + (*ListClustersRequest)(nil), // 2: nebius.msp.spark.v1alpha1.ListClustersRequest + (*ListClustersResponse)(nil), // 3: nebius.msp.spark.v1alpha1.ListClustersResponse + (*CreateClusterRequest)(nil), // 4: nebius.msp.spark.v1alpha1.CreateClusterRequest + (*UpdateClusterRequest)(nil), // 5: nebius.msp.spark.v1alpha1.UpdateClusterRequest + (*DeleteClusterRequest)(nil), // 6: nebius.msp.spark.v1alpha1.DeleteClusterRequest + (*Cluster)(nil), // 7: nebius.msp.spark.v1alpha1.Cluster + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*ClusterSpec)(nil), // 9: nebius.msp.spark.v1alpha1.ClusterSpec + (*v1.Operation)(nil), // 10: nebius.common.v1.Operation +} +var file_nebius_msp_spark_v1alpha1_cluster_service_proto_depIdxs = []int32{ + 7, // 0: nebius.msp.spark.v1alpha1.ListClustersResponse.items:type_name -> nebius.msp.spark.v1alpha1.Cluster + 8, // 1: nebius.msp.spark.v1alpha1.CreateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 2: nebius.msp.spark.v1alpha1.CreateClusterRequest.spec:type_name -> nebius.msp.spark.v1alpha1.ClusterSpec + 8, // 3: nebius.msp.spark.v1alpha1.UpdateClusterRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 4: nebius.msp.spark.v1alpha1.UpdateClusterRequest.spec:type_name -> nebius.msp.spark.v1alpha1.ClusterSpec + 0, // 5: nebius.msp.spark.v1alpha1.ClusterService.Get:input_type -> nebius.msp.spark.v1alpha1.GetClusterRequest + 1, // 6: nebius.msp.spark.v1alpha1.ClusterService.GetByName:input_type -> nebius.msp.spark.v1alpha1.GetClusterByNameRequest + 2, // 7: nebius.msp.spark.v1alpha1.ClusterService.List:input_type -> nebius.msp.spark.v1alpha1.ListClustersRequest + 4, // 8: nebius.msp.spark.v1alpha1.ClusterService.Create:input_type -> nebius.msp.spark.v1alpha1.CreateClusterRequest + 5, // 9: nebius.msp.spark.v1alpha1.ClusterService.Update:input_type -> nebius.msp.spark.v1alpha1.UpdateClusterRequest + 6, // 10: nebius.msp.spark.v1alpha1.ClusterService.Delete:input_type -> nebius.msp.spark.v1alpha1.DeleteClusterRequest + 7, // 11: nebius.msp.spark.v1alpha1.ClusterService.Get:output_type -> nebius.msp.spark.v1alpha1.Cluster + 7, // 12: nebius.msp.spark.v1alpha1.ClusterService.GetByName:output_type -> nebius.msp.spark.v1alpha1.Cluster + 3, // 13: nebius.msp.spark.v1alpha1.ClusterService.List:output_type -> nebius.msp.spark.v1alpha1.ListClustersResponse + 10, // 14: nebius.msp.spark.v1alpha1.ClusterService.Create:output_type -> nebius.common.v1.Operation + 10, // 15: nebius.msp.spark.v1alpha1.ClusterService.Update:output_type -> nebius.common.v1.Operation + 10, // 16: nebius.msp.spark.v1alpha1.ClusterService.Delete:output_type -> nebius.common.v1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_cluster_service_proto_init() } +func file_nebius_msp_spark_v1alpha1_cluster_service_proto_init() { + if File_nebius_msp_spark_v1alpha1_cluster_service_proto != nil { + return + } + file_nebius_msp_spark_v1alpha1_cluster_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetClusterByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListClustersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes[3].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_cluster_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_cluster_service_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_cluster_service_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_cluster_service_proto = out.File + file_nebius_msp_spark_v1alpha1_cluster_service_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_cluster_service_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_cluster_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/cluster_service.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/cluster_service.sensitive.pb.go new file mode 100644 index 0000000..ec1eb80 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/cluster_service.sensitive.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + slog "log/slog" +) + +// func (x *GetClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetClusterByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetClusterByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListClustersRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListClustersRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// Sanitize mutates [ListClustersResponse] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *ListClustersResponse) Sanitize() { + if x == nil { + return + } + for _, y := range x.Items { + y.Sanitize() + } +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [ListClustersResponse]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [ListClustersResponse], use the following code: +// +// var original *ListClustersResponse +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*ListClustersResponse) +func (x *ListClustersResponse) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*ListClustersResponse) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperListClustersResponse)(c)) +} + +// wrapperListClustersResponse is used to return [ListClustersResponse] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperListClustersResponse ListClustersResponse + +func (w *wrapperListClustersResponse) String() string { + return (*ListClustersResponse)(w).String() +} + +func (*wrapperListClustersResponse) ProtoMessage() {} + +func (w *wrapperListClustersResponse) ProtoReflect() protoreflect.Message { + return (*ListClustersResponse)(w).ProtoReflect() +} + +// Sanitize mutates [CreateClusterRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *CreateClusterRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [CreateClusterRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [CreateClusterRequest], use the following code: +// +// var original *CreateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*CreateClusterRequest) +func (x *CreateClusterRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*CreateClusterRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperCreateClusterRequest)(c)) +} + +// wrapperCreateClusterRequest is used to return [CreateClusterRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperCreateClusterRequest CreateClusterRequest + +func (w *wrapperCreateClusterRequest) String() string { + return (*CreateClusterRequest)(w).String() +} + +func (*wrapperCreateClusterRequest) ProtoMessage() {} + +func (w *wrapperCreateClusterRequest) ProtoReflect() protoreflect.Message { + return (*CreateClusterRequest)(w).ProtoReflect() +} + +// Sanitize mutates [UpdateClusterRequest] to remove/mask all sensitive values. +// Sensitive fields are marked with [(nebius.sensitive) = true]. +func (x *UpdateClusterRequest) Sanitize() { + if x == nil { + return + } + x.Spec.Sanitize() +} + +// LogValue implements [slog.LogValuer] interface. It returns sanitized copy of [UpdateClusterRequest]. +// Properly implemented [slog.Handler] must call LogValue, so sensitive values are not logged. +// Sensitive strings and bytes are masked with `***`, other sensitive fields are omitted. +// +// Returning value has kind [slog.KindAny]. To extract [proto.Message], use the following code: +// +// var original *UpdateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message) +// +// If you need to extract [UpdateClusterRequest], use the following code: +// +// var original *UpdateClusterRequest +// sanitized := original.LogValue().Any().(proto.Message).ProtoReflect().Interface().(*UpdateClusterRequest) +func (x *UpdateClusterRequest) LogValue() slog.Value { + if x == nil { + return slog.AnyValue(x) + } + c := proto.Clone(x).(*UpdateClusterRequest) // TODO: generate static cloner without protoreflect + c.Sanitize() + return slog.AnyValue((*wrapperUpdateClusterRequest)(c)) +} + +// wrapperUpdateClusterRequest is used to return [UpdateClusterRequest] not implementing [slog.LogValuer] to avoid recursion while resolving. +type wrapperUpdateClusterRequest UpdateClusterRequest + +func (w *wrapperUpdateClusterRequest) String() string { + return (*UpdateClusterRequest)(w).String() +} + +func (*wrapperUpdateClusterRequest) ProtoMessage() {} + +func (w *wrapperUpdateClusterRequest) ProtoReflect() protoreflect.Message { + return (*UpdateClusterRequest)(w).ProtoReflect() +} + +// func (x *DeleteClusterRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteClusterRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/cluster_service_grpc.pb.go b/proto/nebius/msp/spark/v1alpha1/cluster_service_grpc.pb.go new file mode 100644 index 0000000..5f78172 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/cluster_service_grpc.pb.go @@ -0,0 +1,305 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/cluster_service.proto + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ClusterService_Get_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/Get" + ClusterService_GetByName_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/GetByName" + ClusterService_List_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/List" + ClusterService_Create_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/Create" + ClusterService_Update_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/Update" + ClusterService_Delete_FullMethodName = "/nebius.msp.spark.v1alpha1.ClusterService/Delete" +) + +// ClusterServiceClient is the client API for ClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterServiceClient interface { + // Returns the specified cluster. + Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) + // Returns the specified cluster by name. + GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) + // Retrieves a list of clusters. + List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) + // Creates a cluster. + Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Updates a cluster. + Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Delete a cluster. + Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type clusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterServiceClient(cc grpc.ClientConnInterface) ClusterServiceClient { + return &clusterServiceClient{cc} +} + +func (c *clusterServiceClient) Get(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) GetByName(ctx context.Context, in *GetClusterByNameRequest, opts ...grpc.CallOption) (*Cluster, error) { + out := new(Cluster) + err := c.cc.Invoke(ctx, ClusterService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) List(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) { + out := new(ListClustersResponse) + err := c.cc.Invoke(ctx, ClusterService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Create(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Update(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterServiceClient) Delete(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ClusterService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterServiceServer is the server API for ClusterService service. +// All implementations should embed UnimplementedClusterServiceServer +// for forward compatibility +type ClusterServiceServer interface { + // Returns the specified cluster. + Get(context.Context, *GetClusterRequest) (*Cluster, error) + // Returns the specified cluster by name. + GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) + // Retrieves a list of clusters. + List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) + // Creates a cluster. + Create(context.Context, *CreateClusterRequest) (*v1.Operation, error) + // Updates a cluster. + Update(context.Context, *UpdateClusterRequest) (*v1.Operation, error) + // Delete a cluster. + Delete(context.Context, *DeleteClusterRequest) (*v1.Operation, error) +} + +// UnimplementedClusterServiceServer should be embedded to have forward compatible implementations. +type UnimplementedClusterServiceServer struct { +} + +func (UnimplementedClusterServiceServer) Get(context.Context, *GetClusterRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedClusterServiceServer) GetByName(context.Context, *GetClusterByNameRequest) (*Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedClusterServiceServer) List(context.Context, *ListClustersRequest) (*ListClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedClusterServiceServer) Create(context.Context, *CreateClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedClusterServiceServer) Update(context.Context, *UpdateClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedClusterServiceServer) Delete(context.Context, *DeleteClusterRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeClusterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterServiceServer will +// result in compilation errors. +type UnsafeClusterServiceServer interface { + mustEmbedUnimplementedClusterServiceServer() +} + +func RegisterClusterServiceServer(s grpc.ServiceRegistrar, srv ClusterServiceServer) { + s.RegisterService(&ClusterService_ServiceDesc, srv) +} + +func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Get(ctx, req.(*GetClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClusterByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetByName(ctx, req.(*GetClusterByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).List(ctx, req.(*ListClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Create(ctx, req.(*CreateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Update(ctx, req.(*UpdateClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ClusterService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).Delete(ctx, req.(*DeleteClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterService_ServiceDesc is the grpc.ServiceDesc for ClusterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.spark.v1alpha1.ClusterService", + HandlerType: (*ClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ClusterService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ClusterService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ClusterService_List_Handler, + }, + { + MethodName: "Create", + Handler: _ClusterService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _ClusterService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _ClusterService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/spark/v1alpha1/cluster_service.proto", +} diff --git a/proto/nebius/msp/spark/v1alpha1/common.pb.go b/proto/nebius/msp/spark/v1alpha1/common.pb.go new file mode 100644 index 0000000..e7d9896 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/common.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/common.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PythonConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Python requirements + Requirements []string `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` + // S3 URIs of files to be placed in PYTHONPATH of driver and executors for python applications (.py, .zip, .egg) + FileUris []string `protobuf:"bytes,2,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"` +} + +func (x *PythonConfig) Reset() { + *x = PythonConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PythonConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PythonConfig) ProtoMessage() {} + +func (x *PythonConfig) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PythonConfig.ProtoReflect.Descriptor instead. +func (*PythonConfig) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_common_proto_rawDescGZIP(), []int{0} +} + +func (x *PythonConfig) GetRequirements() []string { + if x != nil { + return x.Requirements + } + return nil +} + +func (x *PythonConfig) GetFileUris() []string { + if x != nil { + return x.FileUris + } + return nil +} + +type JavaConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Entrypoint class for Java application + EntrypointClass string `protobuf:"bytes,1,opt,name=entrypoint_class,json=entrypointClass,proto3" json:"entrypoint_class,omitempty"` +} + +func (x *JavaConfig) Reset() { + *x = JavaConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JavaConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JavaConfig) ProtoMessage() {} + +func (x *JavaConfig) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JavaConfig.ProtoReflect.Descriptor instead. +func (*JavaConfig) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *JavaConfig) GetEntrypointClass() string { + if x != nil { + return x.EntrypointClass + } + return "" +} + +var File_nebius_msp_spark_v1alpha1_common_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_common_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x69, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x69, + 0x73, 0x22, 0x3f, 0x0a, 0x0a, 0x4a, 0x61, 0x76, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x31, 0x0a, 0x10, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x0f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x42, 0x6a, 0x0a, 0x20, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, + 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_common_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_common_proto_rawDescData = file_nebius_msp_spark_v1alpha1_common_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_common_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_common_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_common_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_common_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_msp_spark_v1alpha1_common_proto_goTypes = []any{ + (*PythonConfig)(nil), // 0: nebius.msp.spark.v1alpha1.PythonConfig + (*JavaConfig)(nil), // 1: nebius.msp.spark.v1alpha1.JavaConfig +} +var file_nebius_msp_spark_v1alpha1_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_common_proto_init() } +func file_nebius_msp_spark_v1alpha1_common_proto_init() { + if File_nebius_msp_spark_v1alpha1_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*PythonConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*JavaConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_common_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_common_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_common_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_common_proto = out.File + file_nebius_msp_spark_v1alpha1_common_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_common_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_common_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/common.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/common.sensitive.pb.go new file mode 100644 index 0000000..9cbeb9c --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/common.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *PythonConfig) Sanitize() // is not generated as no sensitive fields found +// func (x *PythonConfig) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *JavaConfig) Sanitize() // is not generated as no sensitive fields found +// func (x *JavaConfig) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/job.pb.go b/proto/nebius/msp/spark/v1alpha1/job.pb.go new file mode 100644 index 0000000..db680fd --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/job.pb.go @@ -0,0 +1,719 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/job.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type JobResultCode int32 + +const ( + JobResultCode_JOB_RESULT_CODE_UNSPECIFIED JobResultCode = 0 + JobResultCode_SUCCEEDED JobResultCode = 1 + JobResultCode_ERROR JobResultCode = 2 +) + +// Enum value maps for JobResultCode. +var ( + JobResultCode_name = map[int32]string{ + 0: "JOB_RESULT_CODE_UNSPECIFIED", + 1: "SUCCEEDED", + 2: "ERROR", + } + JobResultCode_value = map[string]int32{ + "JOB_RESULT_CODE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "ERROR": 2, + } +) + +func (x JobResultCode) Enum() *JobResultCode { + p := new(JobResultCode) + *p = x + return p +} + +func (x JobResultCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobResultCode) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_msp_spark_v1alpha1_job_proto_enumTypes[0].Descriptor() +} + +func (JobResultCode) Type() protoreflect.EnumType { + return &file_nebius_msp_spark_v1alpha1_job_proto_enumTypes[0] +} + +func (x JobResultCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobResultCode.Descriptor instead. +func (JobResultCode) EnumDescriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP(), []int{0} +} + +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *JobSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *JobStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Job) GetSpec() *JobSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Job) GetStatus() *JobStatus { + if x != nil { + return x.Status + } + return nil +} + +// Spark Job specification +type JobSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of the job. + Description *string `protobuf:"bytes,1,opt,name=description,proto3,oneof" json:"description,omitempty"` + // S3 URI of main application file + // Example: s3a://mybucket/myapp.py + ApplicationFileUri string `protobuf:"bytes,2,opt,name=application_file_uri,json=applicationFileUri,proto3" json:"application_file_uri,omitempty"` + Driver *DriverTemplateSpec `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` + Executor *ExecutorTemplateSpec `protobuf:"bytes,5,opt,name=executor,proto3" json:"executor,omitempty"` + SparkVersion string `protobuf:"bytes,6,opt,name=spark_version,json=sparkVersion,proto3" json:"spark_version,omitempty"` + // Application args + ApplicationArgs []string `protobuf:"bytes,101,rep,name=application_args,json=applicationArgs,proto3" json:"application_args,omitempty"` + // S3 URIs of files to be placed in executor working directory + FileUris []string `protobuf:"bytes,102,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"` + // S3 URIs of Jars to be placed in classpaths of driver and executors for java applications + JarUris []string `protobuf:"bytes,103,rep,name=jar_uris,json=jarUris,proto3" json:"jar_uris,omitempty"` + // List of maven coordinates of jars to include on the driver and executor classpaths + Packages []string `protobuf:"bytes,104,rep,name=packages,proto3" json:"packages,omitempty"` + // Map of spark configuration parameters + SparkConf map[string]string `protobuf:"bytes,105,rep,name=spark_conf,json=sparkConf,proto3" json:"spark_conf,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Runtime-specific job config + // + // Types that are assignable to RuntimeConfig: + // + // *JobSpec_Python + // *JobSpec_Java + RuntimeConfig isJobSpec_RuntimeConfig `protobuf_oneof:"runtime_config"` +} + +func (x *JobSpec) Reset() { + *x = JobSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobSpec) ProtoMessage() {} + +func (x *JobSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobSpec.ProtoReflect.Descriptor instead. +func (*JobSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP(), []int{1} +} + +func (x *JobSpec) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *JobSpec) GetApplicationFileUri() string { + if x != nil { + return x.ApplicationFileUri + } + return "" +} + +func (x *JobSpec) GetDriver() *DriverTemplateSpec { + if x != nil { + return x.Driver + } + return nil +} + +func (x *JobSpec) GetExecutor() *ExecutorTemplateSpec { + if x != nil { + return x.Executor + } + return nil +} + +func (x *JobSpec) GetSparkVersion() string { + if x != nil { + return x.SparkVersion + } + return "" +} + +func (x *JobSpec) GetApplicationArgs() []string { + if x != nil { + return x.ApplicationArgs + } + return nil +} + +func (x *JobSpec) GetFileUris() []string { + if x != nil { + return x.FileUris + } + return nil +} + +func (x *JobSpec) GetJarUris() []string { + if x != nil { + return x.JarUris + } + return nil +} + +func (x *JobSpec) GetPackages() []string { + if x != nil { + return x.Packages + } + return nil +} + +func (x *JobSpec) GetSparkConf() map[string]string { + if x != nil { + return x.SparkConf + } + return nil +} + +func (m *JobSpec) GetRuntimeConfig() isJobSpec_RuntimeConfig { + if m != nil { + return m.RuntimeConfig + } + return nil +} + +func (x *JobSpec) GetPython() *PythonConfig { + if x, ok := x.GetRuntimeConfig().(*JobSpec_Python); ok { + return x.Python + } + return nil +} + +func (x *JobSpec) GetJava() *JavaConfig { + if x, ok := x.GetRuntimeConfig().(*JobSpec_Java); ok { + return x.Java + } + return nil +} + +type isJobSpec_RuntimeConfig interface { + isJobSpec_RuntimeConfig() +} + +type JobSpec_Python struct { + Python *PythonConfig `protobuf:"bytes,201,opt,name=python,proto3,oneof"` +} + +type JobSpec_Java struct { + Java *JavaConfig `protobuf:"bytes,202,opt,name=java,proto3,oneof"` +} + +func (*JobSpec_Python) isJobSpec_RuntimeConfig() {} + +func (*JobSpec_Java) isJobSpec_RuntimeConfig() {} + +type JobResultDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Result code + Code JobResultCode `protobuf:"varint,1,opt,name=code,proto3,enum=nebius.msp.spark.v1alpha1.JobResultCode" json:"code,omitempty"` +} + +func (x *JobResultDetails) Reset() { + *x = JobResultDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobResultDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobResultDetails) ProtoMessage() {} + +func (x *JobResultDetails) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobResultDetails.ProtoReflect.Descriptor instead. +func (*JobResultDetails) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP(), []int{2} +} + +func (x *JobResultDetails) GetCode() JobResultCode { + if x != nil { + return x.Code + } + return JobResultCode_JOB_RESULT_CODE_UNSPECIFIED +} + +type JobStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase (or stage) of the cluster. + Phase v1alpha1.ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the stage to define whether it's healthy or not. + State v1alpha1.ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + // JobDriver Web UI FQDN + DriverEndpoint *string `protobuf:"bytes,3,opt,name=driver_endpoint,json=driverEndpoint,proto3,oneof" json:"driver_endpoint,omitempty"` + // Job driver resource preset details + DriverPresetDetails *resource.PresetDetails `protobuf:"bytes,4,opt,name=driver_preset_details,json=driverPresetDetails,proto3" json:"driver_preset_details,omitempty"` + // Job executor resource preset details + ExecutorPresetDetails *resource.PresetDetails `protobuf:"bytes,5,opt,name=executor_preset_details,json=executorPresetDetails,proto3" json:"executor_preset_details,omitempty"` + // Job execution result details + ResultDetails *JobResultDetails `protobuf:"bytes,6,opt,name=result_details,json=resultDetails,proto3" json:"result_details,omitempty"` +} + +func (x *JobStatus) Reset() { + *x = JobStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobStatus) ProtoMessage() {} + +func (x *JobStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobStatus.ProtoReflect.Descriptor instead. +func (*JobStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP(), []int{3} +} + +func (x *JobStatus) GetPhase() v1alpha1.ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return v1alpha1.ClusterStatus_Phase(0) +} + +func (x *JobStatus) GetState() v1alpha1.ClusterStatus_State { + if x != nil { + return x.State + } + return v1alpha1.ClusterStatus_State(0) +} + +func (x *JobStatus) GetDriverEndpoint() string { + if x != nil && x.DriverEndpoint != nil { + return *x.DriverEndpoint + } + return "" +} + +func (x *JobStatus) GetDriverPresetDetails() *resource.PresetDetails { + if x != nil { + return x.DriverPresetDetails + } + return nil +} + +func (x *JobStatus) GetExecutorPresetDetails() *resource.PresetDetails { + if x != nil { + return x.ExecutorPresetDetails + } + return nil +} + +func (x *JobStatus) GetResultDetails() *JobResultDetails { + if x != nil { + return x.ResultDetails + } + return nil +} + +var File_nebius_msp_spark_v1alpha1_job_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_job_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x03, 0x4a, 0x6f, 0x62, + 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xee, 0x05, 0x0a, + 0x07, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x38, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x69, 0x12, 0x4d, 0x0a, 0x06, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x2b, 0x0a, + 0x0d, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x65, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, + 0x69, 0x73, 0x18, 0x66, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, + 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x67, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x61, 0x72, 0x55, 0x72, 0x69, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x68, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x69, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x09, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x42, 0x0a, 0x06, 0x70, + 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x12, + 0x3c, 0x0a, 0x04, 0x6a, 0x61, 0x76, 0x61, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x61, 0x76, 0x61, 0x1a, 0x3c, 0x0a, + 0x0e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0e, 0x0a, + 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, + 0x10, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, + 0xe7, 0x03, 0x0a, 0x09, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, + 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x3e, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, + 0x0f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x5f, 0x0a, 0x15, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x13, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x63, 0x0a, 0x17, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x15, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2a, 0x4a, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x4a, 0x4f, + 0x42, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x67, 0x0a, 0x20, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x08, 0x4a, 0x6f, 0x62, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, + 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_job_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_job_proto_rawDescData = file_nebius_msp_spark_v1alpha1_job_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_job_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_job_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_job_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_job_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_msp_spark_v1alpha1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_msp_spark_v1alpha1_job_proto_goTypes = []any{ + (JobResultCode)(0), // 0: nebius.msp.spark.v1alpha1.JobResultCode + (*Job)(nil), // 1: nebius.msp.spark.v1alpha1.Job + (*JobSpec)(nil), // 2: nebius.msp.spark.v1alpha1.JobSpec + (*JobResultDetails)(nil), // 3: nebius.msp.spark.v1alpha1.JobResultDetails + (*JobStatus)(nil), // 4: nebius.msp.spark.v1alpha1.JobStatus + nil, // 5: nebius.msp.spark.v1alpha1.JobSpec.SparkConfEntry + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*DriverTemplateSpec)(nil), // 7: nebius.msp.spark.v1alpha1.DriverTemplateSpec + (*ExecutorTemplateSpec)(nil), // 8: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec + (*PythonConfig)(nil), // 9: nebius.msp.spark.v1alpha1.PythonConfig + (*JavaConfig)(nil), // 10: nebius.msp.spark.v1alpha1.JavaConfig + (v1alpha1.ClusterStatus_Phase)(0), // 11: nebius.msp.v1alpha1.ClusterStatus.Phase + (v1alpha1.ClusterStatus_State)(0), // 12: nebius.msp.v1alpha1.ClusterStatus.State + (*resource.PresetDetails)(nil), // 13: nebius.msp.v1alpha1.resource.PresetDetails +} +var file_nebius_msp_spark_v1alpha1_job_proto_depIdxs = []int32{ + 6, // 0: nebius.msp.spark.v1alpha1.Job.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.msp.spark.v1alpha1.Job.spec:type_name -> nebius.msp.spark.v1alpha1.JobSpec + 4, // 2: nebius.msp.spark.v1alpha1.Job.status:type_name -> nebius.msp.spark.v1alpha1.JobStatus + 7, // 3: nebius.msp.spark.v1alpha1.JobSpec.driver:type_name -> nebius.msp.spark.v1alpha1.DriverTemplateSpec + 8, // 4: nebius.msp.spark.v1alpha1.JobSpec.executor:type_name -> nebius.msp.spark.v1alpha1.ExecutorTemplateSpec + 5, // 5: nebius.msp.spark.v1alpha1.JobSpec.spark_conf:type_name -> nebius.msp.spark.v1alpha1.JobSpec.SparkConfEntry + 9, // 6: nebius.msp.spark.v1alpha1.JobSpec.python:type_name -> nebius.msp.spark.v1alpha1.PythonConfig + 10, // 7: nebius.msp.spark.v1alpha1.JobSpec.java:type_name -> nebius.msp.spark.v1alpha1.JavaConfig + 0, // 8: nebius.msp.spark.v1alpha1.JobResultDetails.code:type_name -> nebius.msp.spark.v1alpha1.JobResultCode + 11, // 9: nebius.msp.spark.v1alpha1.JobStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 12, // 10: nebius.msp.spark.v1alpha1.JobStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 13, // 11: nebius.msp.spark.v1alpha1.JobStatus.driver_preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 13, // 12: nebius.msp.spark.v1alpha1.JobStatus.executor_preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 3, // 13: nebius.msp.spark.v1alpha1.JobStatus.result_details:type_name -> nebius.msp.spark.v1alpha1.JobResultDetails + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_job_proto_init() } +func file_nebius_msp_spark_v1alpha1_job_proto_init() { + if File_nebius_msp_spark_v1alpha1_job_proto != nil { + return + } + file_nebius_msp_spark_v1alpha1_common_proto_init() + file_nebius_msp_spark_v1alpha1_preset_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*JobSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*JobResultDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*JobStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[1].OneofWrappers = []any{ + (*JobSpec_Python)(nil), + (*JobSpec_Java)(nil), + } + file_nebius_msp_spark_v1alpha1_job_proto_msgTypes[3].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_job_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_job_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_job_proto_depIdxs, + EnumInfos: file_nebius_msp_spark_v1alpha1_job_proto_enumTypes, + MessageInfos: file_nebius_msp_spark_v1alpha1_job_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_job_proto = out.File + file_nebius_msp_spark_v1alpha1_job_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_job_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_job_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/job.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/job.sensitive.pb.go new file mode 100644 index 0000000..c39abbd --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/job.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Job) Sanitize() // is not generated as no sensitive fields found +// func (x *Job) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *JobSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *JobSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *JobResultDetails) Sanitize() // is not generated as no sensitive fields found +// func (x *JobResultDetails) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *JobStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *JobStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/job_service.pb.go b/proto/nebius/msp/spark/v1alpha1/job_service.pb.go new file mode 100644 index 0000000..3892a68 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/job_service.pb.go @@ -0,0 +1,523 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/job_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the job to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetJobRequest) Reset() { + *x = GetJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRequest) ProtoMessage() {} + +func (x *GetJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead. +func (*GetJobRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetJobRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to list jobs from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. Default value is 100. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListJobsRequest) Reset() { + *x = ListJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsRequest) ProtoMessage() {} + +func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead. +func (*ListJobsRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListJobsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListJobsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListJobsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of jobs. + Items []*Job `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListJobsResponse) Reset() { + *x = ListJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsResponse) ProtoMessage() {} + +func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead. +func (*ListJobsResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListJobsResponse) GetItems() []*Job { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListJobsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +type CreateJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the new job. Must include parent_id - ID of the cluster to create job in. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification for the new job. + Spec *JobSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateJobRequest) Reset() { + *x = CreateJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateJobRequest) ProtoMessage() {} + +func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead. +func (*CreateJobRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateJobRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateJobRequest) GetSpec() *JobSpec { + if x != nil { + return x.Spec + } + return nil +} + +type CancelJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the job to cancel. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CancelJobRequest) Reset() { + *x = CancelJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelJobRequest) ProtoMessage() {} + +func (x *CancelJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelJobRequest.ProtoReflect.Descriptor instead. +func (*CancelJobRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CancelJobRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_msp_spark_v1alpha1_job_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_job_service_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6a, 0x6f, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x7b, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, + 0x22, 0x02, 0x28, 0x00, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x89, 0x01, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x6f, + 0x62, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9d, 0x02, 0x0a, 0x10, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x3a, 0x80, 0x01, 0xba, 0x48, 0x7d, 0x1a, 0x7b, 0x0a, 0x13, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x2b, 0x27, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x27, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x27, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x27, 0x6e, 0x61, 0x6d, 0x65, 0x27, + 0x1a, 0x37, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x22, 0x2a, 0x0a, 0x10, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xf1, 0x02, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x12, 0x5f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x06, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x09, + 0xba, 0x4a, 0x06, 0x73, 0x70, 0x2e, 0x6d, 0x73, 0x70, 0x42, 0x6e, 0x0a, 0x20, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x4a, + 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescData = file_nebius_msp_spark_v1alpha1_job_service_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_job_service_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_msp_spark_v1alpha1_job_service_proto_goTypes = []any{ + (*GetJobRequest)(nil), // 0: nebius.msp.spark.v1alpha1.GetJobRequest + (*ListJobsRequest)(nil), // 1: nebius.msp.spark.v1alpha1.ListJobsRequest + (*ListJobsResponse)(nil), // 2: nebius.msp.spark.v1alpha1.ListJobsResponse + (*CreateJobRequest)(nil), // 3: nebius.msp.spark.v1alpha1.CreateJobRequest + (*CancelJobRequest)(nil), // 4: nebius.msp.spark.v1alpha1.CancelJobRequest + (*Job)(nil), // 5: nebius.msp.spark.v1alpha1.Job + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*JobSpec)(nil), // 7: nebius.msp.spark.v1alpha1.JobSpec + (*v1.Operation)(nil), // 8: nebius.common.v1.Operation +} +var file_nebius_msp_spark_v1alpha1_job_service_proto_depIdxs = []int32{ + 5, // 0: nebius.msp.spark.v1alpha1.ListJobsResponse.items:type_name -> nebius.msp.spark.v1alpha1.Job + 6, // 1: nebius.msp.spark.v1alpha1.CreateJobRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 2: nebius.msp.spark.v1alpha1.CreateJobRequest.spec:type_name -> nebius.msp.spark.v1alpha1.JobSpec + 0, // 3: nebius.msp.spark.v1alpha1.JobService.Get:input_type -> nebius.msp.spark.v1alpha1.GetJobRequest + 1, // 4: nebius.msp.spark.v1alpha1.JobService.List:input_type -> nebius.msp.spark.v1alpha1.ListJobsRequest + 3, // 5: nebius.msp.spark.v1alpha1.JobService.Create:input_type -> nebius.msp.spark.v1alpha1.CreateJobRequest + 4, // 6: nebius.msp.spark.v1alpha1.JobService.Cancel:input_type -> nebius.msp.spark.v1alpha1.CancelJobRequest + 5, // 7: nebius.msp.spark.v1alpha1.JobService.Get:output_type -> nebius.msp.spark.v1alpha1.Job + 2, // 8: nebius.msp.spark.v1alpha1.JobService.List:output_type -> nebius.msp.spark.v1alpha1.ListJobsResponse + 8, // 9: nebius.msp.spark.v1alpha1.JobService.Create:output_type -> nebius.common.v1.Operation + 8, // 10: nebius.msp.spark.v1alpha1.JobService.Cancel:output_type -> nebius.common.v1.Operation + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_job_service_proto_init() } +func file_nebius_msp_spark_v1alpha1_job_service_proto_init() { + if File_nebius_msp_spark_v1alpha1_job_service_proto != nil { + return + } + file_nebius_msp_spark_v1alpha1_job_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CreateJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CancelJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_job_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_job_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_job_service_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_job_service_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_job_service_proto = out.File + file_nebius_msp_spark_v1alpha1_job_service_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_job_service_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_job_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/job_service.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/job_service.sensitive.pb.go new file mode 100644 index 0000000..9412e68 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/job_service.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetJobRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetJobRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListJobsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListJobsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListJobsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListJobsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateJobRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateJobRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CancelJobRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CancelJobRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/job_service_grpc.pb.go b/proto/nebius/msp/spark/v1alpha1/job_service_grpc.pb.go new file mode 100644 index 0000000..2353a19 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/job_service_grpc.pb.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/job_service.proto + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + JobService_Get_FullMethodName = "/nebius.msp.spark.v1alpha1.JobService/Get" + JobService_List_FullMethodName = "/nebius.msp.spark.v1alpha1.JobService/List" + JobService_Create_FullMethodName = "/nebius.msp.spark.v1alpha1.JobService/Create" + JobService_Cancel_FullMethodName = "/nebius.msp.spark.v1alpha1.JobService/Cancel" +) + +// JobServiceClient is the client API for JobService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type JobServiceClient interface { + // Returns the specified job. + Get(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) + // Retrieves a list of jobs. + List(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) + // Creates a job. + Create(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Cancel the job. + Cancel(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type jobServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient { + return &jobServiceClient{cc} +} + +func (c *jobServiceClient) Get(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, JobService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) List(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, JobService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) Create(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, JobService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) Cancel(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, JobService_Cancel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// JobServiceServer is the server API for JobService service. +// All implementations should embed UnimplementedJobServiceServer +// for forward compatibility +type JobServiceServer interface { + // Returns the specified job. + Get(context.Context, *GetJobRequest) (*Job, error) + // Retrieves a list of jobs. + List(context.Context, *ListJobsRequest) (*ListJobsResponse, error) + // Creates a job. + Create(context.Context, *CreateJobRequest) (*v1.Operation, error) + // Cancel the job. + Cancel(context.Context, *CancelJobRequest) (*v1.Operation, error) +} + +// UnimplementedJobServiceServer should be embedded to have forward compatible implementations. +type UnimplementedJobServiceServer struct { +} + +func (UnimplementedJobServiceServer) Get(context.Context, *GetJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedJobServiceServer) List(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedJobServiceServer) Create(context.Context, *CreateJobRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedJobServiceServer) Cancel(context.Context, *CancelJobRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented") +} + +// UnsafeJobServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to JobServiceServer will +// result in compilation errors. +type UnsafeJobServiceServer interface { + mustEmbedUnimplementedJobServiceServer() +} + +func RegisterJobServiceServer(s grpc.ServiceRegistrar, srv JobServiceServer) { + s.RegisterService(&JobService_ServiceDesc, srv) +} + +func _JobService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Get(ctx, req.(*GetJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).List(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Create(ctx, req.(*CreateJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).Cancel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_Cancel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).Cancel(ctx, req.(*CancelJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// JobService_ServiceDesc is the grpc.ServiceDesc for JobService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var JobService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.spark.v1alpha1.JobService", + HandlerType: (*JobServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _JobService_Get_Handler, + }, + { + MethodName: "List", + Handler: _JobService_List_Handler, + }, + { + MethodName: "Create", + Handler: _JobService_Create_Handler, + }, + { + MethodName: "Cancel", + Handler: _JobService_Cancel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/spark/v1alpha1/job_service.proto", +} diff --git a/proto/nebius/msp/spark/v1alpha1/preset.pb.go b/proto/nebius/msp/spark/v1alpha1/preset.pb.go new file mode 100644 index 0000000..88b57fb --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/preset.pb.go @@ -0,0 +1,391 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/preset.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DriverTemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Disk *resource.DiskSpec `protobuf:"bytes,3,opt,name=disk,proto3" json:"disk,omitempty"` + Resources *resource.ResourcesSpec `protobuf:"bytes,4,opt,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *DriverTemplateSpec) Reset() { + *x = DriverTemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverTemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverTemplateSpec) ProtoMessage() {} + +func (x *DriverTemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DriverTemplateSpec.ProtoReflect.Descriptor instead. +func (*DriverTemplateSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_preset_proto_rawDescGZIP(), []int{0} +} + +func (x *DriverTemplateSpec) GetDisk() *resource.DiskSpec { + if x != nil { + return x.Disk + } + return nil +} + +func (x *DriverTemplateSpec) GetResources() *resource.ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +type DynamicAllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Min int64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"` + Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` +} + +func (x *DynamicAllocationSpec) Reset() { + *x = DynamicAllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DynamicAllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DynamicAllocationSpec) ProtoMessage() {} + +func (x *DynamicAllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DynamicAllocationSpec.ProtoReflect.Descriptor instead. +func (*DynamicAllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_preset_proto_rawDescGZIP(), []int{1} +} + +func (x *DynamicAllocationSpec) GetMin() int64 { + if x != nil { + return x.Min + } + return 0 +} + +func (x *DynamicAllocationSpec) GetMax() int64 { + if x != nil { + return x.Max + } + return 0 +} + +type ExecutorTemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Disk *resource.DiskSpec `protobuf:"bytes,2,opt,name=disk,proto3" json:"disk,omitempty"` + Resources *resource.ResourcesSpec `protobuf:"bytes,4,opt,name=resources,proto3" json:"resources,omitempty"` + // Types that are assignable to HostsSpec: + // + // *ExecutorTemplateSpec_Hosts + // *ExecutorTemplateSpec_HostsDynamicAllocation + HostsSpec isExecutorTemplateSpec_HostsSpec `protobuf_oneof:"hosts_spec"` +} + +func (x *ExecutorTemplateSpec) Reset() { + *x = ExecutorTemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutorTemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutorTemplateSpec) ProtoMessage() {} + +func (x *ExecutorTemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutorTemplateSpec.ProtoReflect.Descriptor instead. +func (*ExecutorTemplateSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_preset_proto_rawDescGZIP(), []int{2} +} + +func (x *ExecutorTemplateSpec) GetDisk() *resource.DiskSpec { + if x != nil { + return x.Disk + } + return nil +} + +func (x *ExecutorTemplateSpec) GetResources() *resource.ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (m *ExecutorTemplateSpec) GetHostsSpec() isExecutorTemplateSpec_HostsSpec { + if m != nil { + return m.HostsSpec + } + return nil +} + +func (x *ExecutorTemplateSpec) GetHosts() *resource.HostSpec { + if x, ok := x.GetHostsSpec().(*ExecutorTemplateSpec_Hosts); ok { + return x.Hosts + } + return nil +} + +func (x *ExecutorTemplateSpec) GetHostsDynamicAllocation() *DynamicAllocationSpec { + if x, ok := x.GetHostsSpec().(*ExecutorTemplateSpec_HostsDynamicAllocation); ok { + return x.HostsDynamicAllocation + } + return nil +} + +type isExecutorTemplateSpec_HostsSpec interface { + isExecutorTemplateSpec_HostsSpec() +} + +type ExecutorTemplateSpec_Hosts struct { + Hosts *resource.HostSpec `protobuf:"bytes,101,opt,name=hosts,proto3,oneof"` +} + +type ExecutorTemplateSpec_HostsDynamicAllocation struct { + HostsDynamicAllocation *DynamicAllocationSpec `protobuf:"bytes,102,opt,name=hosts_dynamic_allocation,json=hostsDynamicAllocation,proto3,oneof"` +} + +func (*ExecutorTemplateSpec_Hosts) isExecutorTemplateSpec_HostsSpec() {} + +func (*ExecutorTemplateSpec_HostsDynamicAllocation) isExecutorTemplateSpec_HostsSpec() {} + +var File_nebius_msp_spark_v1alpha1_preset_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_preset_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, + 0x0a, 0x12, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x49, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x18, 0x0a, 0x03, + 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, + 0x22, 0xe8, 0x02, 0x0a, 0x14, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x04, 0x64, 0x69, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x49, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, + 0x00, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x6c, 0x0a, 0x18, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x16, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x13, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x42, 0x6a, 0x0a, 0x20, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x0b, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_preset_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_preset_proto_rawDescData = file_nebius_msp_spark_v1alpha1_preset_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_preset_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_preset_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_preset_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_preset_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_preset_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_msp_spark_v1alpha1_preset_proto_goTypes = []any{ + (*DriverTemplateSpec)(nil), // 0: nebius.msp.spark.v1alpha1.DriverTemplateSpec + (*DynamicAllocationSpec)(nil), // 1: nebius.msp.spark.v1alpha1.DynamicAllocationSpec + (*ExecutorTemplateSpec)(nil), // 2: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec + (*resource.DiskSpec)(nil), // 3: nebius.msp.v1alpha1.resource.DiskSpec + (*resource.ResourcesSpec)(nil), // 4: nebius.msp.v1alpha1.resource.ResourcesSpec + (*resource.HostSpec)(nil), // 5: nebius.msp.v1alpha1.resource.HostSpec +} +var file_nebius_msp_spark_v1alpha1_preset_proto_depIdxs = []int32{ + 3, // 0: nebius.msp.spark.v1alpha1.DriverTemplateSpec.disk:type_name -> nebius.msp.v1alpha1.resource.DiskSpec + 4, // 1: nebius.msp.spark.v1alpha1.DriverTemplateSpec.resources:type_name -> nebius.msp.v1alpha1.resource.ResourcesSpec + 3, // 2: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec.disk:type_name -> nebius.msp.v1alpha1.resource.DiskSpec + 4, // 3: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec.resources:type_name -> nebius.msp.v1alpha1.resource.ResourcesSpec + 5, // 4: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec.hosts:type_name -> nebius.msp.v1alpha1.resource.HostSpec + 1, // 5: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec.hosts_dynamic_allocation:type_name -> nebius.msp.spark.v1alpha1.DynamicAllocationSpec + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_preset_proto_init() } +func file_nebius_msp_spark_v1alpha1_preset_proto_init() { + if File_nebius_msp_spark_v1alpha1_preset_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*DriverTemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DynamicAllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ExecutorTemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes[2].OneofWrappers = []any{ + (*ExecutorTemplateSpec_Hosts)(nil), + (*ExecutorTemplateSpec_HostsDynamicAllocation)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_preset_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_preset_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_preset_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_preset_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_preset_proto = out.File + file_nebius_msp_spark_v1alpha1_preset_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_preset_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_preset_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/preset.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/preset.sensitive.pb.go new file mode 100644 index 0000000..4e97376 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/preset.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *DriverTemplateSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DriverTemplateSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DynamicAllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DynamicAllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ExecutorTemplateSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ExecutorTemplateSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/session.pb.go b/proto/nebius/msp/spark/v1alpha1/session.pb.go new file mode 100644 index 0000000..058ebec --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/session.pb.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/session.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Session struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *SessionSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *SessionStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Session) Reset() { + *x = Session{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Session) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Session) ProtoMessage() {} + +func (x *Session) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Session.ProtoReflect.Descriptor instead. +func (*Session) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_proto_rawDescGZIP(), []int{0} +} + +func (x *Session) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Session) GetSpec() *SessionSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Session) GetStatus() *SessionStatus { + if x != nil { + return x.Status + } + return nil +} + +// Spark Session specification +type SessionSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of the session. + Description *string `protobuf:"bytes,1,opt,name=description,proto3,oneof" json:"description,omitempty"` + Driver *DriverTemplateSpec `protobuf:"bytes,2,opt,name=driver,proto3" json:"driver,omitempty"` + Executor *ExecutorTemplateSpec `protobuf:"bytes,3,opt,name=executor,proto3" json:"executor,omitempty"` + SparkVersion string `protobuf:"bytes,4,opt,name=spark_version,json=sparkVersion,proto3" json:"spark_version,omitempty"` + // S3 URIs of files to be placed in executor working directory + FileUris []string `protobuf:"bytes,101,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"` + // S3 URIs of Jars to be placed in classpaths of driver and executors for java applications + JarUris []string `protobuf:"bytes,102,rep,name=jar_uris,json=jarUris,proto3" json:"jar_uris,omitempty"` + // List of maven coordinates of jars to include on the driver and executor classpaths + Packages []string `protobuf:"bytes,103,rep,name=packages,proto3" json:"packages,omitempty"` + // Map of spark configuration parameters + SparkConf map[string]string `protobuf:"bytes,104,rep,name=spark_conf,json=sparkConf,proto3" json:"spark_conf,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Python runtime-specific session config + Python *PythonConfig `protobuf:"bytes,201,opt,name=python,proto3" json:"python,omitempty"` +} + +func (x *SessionSpec) Reset() { + *x = SessionSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionSpec) ProtoMessage() {} + +func (x *SessionSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionSpec.ProtoReflect.Descriptor instead. +func (*SessionSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_proto_rawDescGZIP(), []int{1} +} + +func (x *SessionSpec) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *SessionSpec) GetDriver() *DriverTemplateSpec { + if x != nil { + return x.Driver + } + return nil +} + +func (x *SessionSpec) GetExecutor() *ExecutorTemplateSpec { + if x != nil { + return x.Executor + } + return nil +} + +func (x *SessionSpec) GetSparkVersion() string { + if x != nil { + return x.SparkVersion + } + return "" +} + +func (x *SessionSpec) GetFileUris() []string { + if x != nil { + return x.FileUris + } + return nil +} + +func (x *SessionSpec) GetJarUris() []string { + if x != nil { + return x.JarUris + } + return nil +} + +func (x *SessionSpec) GetPackages() []string { + if x != nil { + return x.Packages + } + return nil +} + +func (x *SessionSpec) GetSparkConf() map[string]string { + if x != nil { + return x.SparkConf + } + return nil +} + +func (x *SessionSpec) GetPython() *PythonConfig { + if x != nil { + return x.Python + } + return nil +} + +type SessionStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase (or stage) of the cluster. + Phase v1alpha1.ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the stage to define whether it's healthy or not. + State v1alpha1.ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + // Spark Connect FQDN + SparkConnectEndpoint *string `protobuf:"bytes,3,opt,name=spark_connect_endpoint,json=sparkConnectEndpoint,proto3,oneof" json:"spark_connect_endpoint,omitempty"` + // Session driver resource preset details + DriverPresetDetails *resource.PresetDetails `protobuf:"bytes,4,opt,name=driver_preset_details,json=driverPresetDetails,proto3" json:"driver_preset_details,omitempty"` + // Session executor resource preset details + ExecutorPresetDetails *resource.PresetDetails `protobuf:"bytes,5,opt,name=executor_preset_details,json=executorPresetDetails,proto3" json:"executor_preset_details,omitempty"` +} + +func (x *SessionStatus) Reset() { + *x = SessionStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStatus) ProtoMessage() {} + +func (x *SessionStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStatus.ProtoReflect.Descriptor instead. +func (*SessionStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_proto_rawDescGZIP(), []int{2} +} + +func (x *SessionStatus) GetPhase() v1alpha1.ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return v1alpha1.ClusterStatus_Phase(0) +} + +func (x *SessionStatus) GetState() v1alpha1.ClusterStatus_State { + if x != nil { + return x.State + } + return v1alpha1.ClusterStatus_State(0) +} + +func (x *SessionStatus) GetSparkConnectEndpoint() string { + if x != nil && x.SparkConnectEndpoint != nil { + return *x.SparkConnectEndpoint + } + return "" +} + +func (x *SessionStatus) GetDriverPresetDetails() *resource.PresetDetails { + if x != nil { + return x.DriverPresetDetails + } + return nil +} + +func (x *SessionStatus) GetExecutorPresetDetails() *resource.PresetDetails { + if x != nil { + return x.ExecutorPresetDetails + } + return nil +} + +var File_nebius_msp_spark_v1alpha1_session_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_session_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, + 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x01, 0x0a, + 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, + 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbf, 0x04, 0x0a, + 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x12, 0x53, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x69, + 0x73, 0x18, 0x65, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x69, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x66, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x61, 0x72, 0x55, 0x72, 0x69, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x67, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0a, 0x73, 0x70, 0x61, 0x72, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x68, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x40, + 0x0a, 0x06, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x79, 0x74, 0x68, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, + 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xab, + 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, + 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x39, 0x0a, 0x16, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x14, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x5f, 0x0a, 0x15, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x13, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x63, 0x0a, 0x17, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x15, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x6b, 0x0a, 0x20, + 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x42, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_session_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_session_proto_rawDescData = file_nebius_msp_spark_v1alpha1_session_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_session_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_session_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_session_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_session_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_session_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_msp_spark_v1alpha1_session_proto_goTypes = []any{ + (*Session)(nil), // 0: nebius.msp.spark.v1alpha1.Session + (*SessionSpec)(nil), // 1: nebius.msp.spark.v1alpha1.SessionSpec + (*SessionStatus)(nil), // 2: nebius.msp.spark.v1alpha1.SessionStatus + nil, // 3: nebius.msp.spark.v1alpha1.SessionSpec.SparkConfEntry + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata + (*DriverTemplateSpec)(nil), // 5: nebius.msp.spark.v1alpha1.DriverTemplateSpec + (*ExecutorTemplateSpec)(nil), // 6: nebius.msp.spark.v1alpha1.ExecutorTemplateSpec + (*PythonConfig)(nil), // 7: nebius.msp.spark.v1alpha1.PythonConfig + (v1alpha1.ClusterStatus_Phase)(0), // 8: nebius.msp.v1alpha1.ClusterStatus.Phase + (v1alpha1.ClusterStatus_State)(0), // 9: nebius.msp.v1alpha1.ClusterStatus.State + (*resource.PresetDetails)(nil), // 10: nebius.msp.v1alpha1.resource.PresetDetails +} +var file_nebius_msp_spark_v1alpha1_session_proto_depIdxs = []int32{ + 4, // 0: nebius.msp.spark.v1alpha1.Session.metadata:type_name -> nebius.common.v1.ResourceMetadata + 1, // 1: nebius.msp.spark.v1alpha1.Session.spec:type_name -> nebius.msp.spark.v1alpha1.SessionSpec + 2, // 2: nebius.msp.spark.v1alpha1.Session.status:type_name -> nebius.msp.spark.v1alpha1.SessionStatus + 5, // 3: nebius.msp.spark.v1alpha1.SessionSpec.driver:type_name -> nebius.msp.spark.v1alpha1.DriverTemplateSpec + 6, // 4: nebius.msp.spark.v1alpha1.SessionSpec.executor:type_name -> nebius.msp.spark.v1alpha1.ExecutorTemplateSpec + 3, // 5: nebius.msp.spark.v1alpha1.SessionSpec.spark_conf:type_name -> nebius.msp.spark.v1alpha1.SessionSpec.SparkConfEntry + 7, // 6: nebius.msp.spark.v1alpha1.SessionSpec.python:type_name -> nebius.msp.spark.v1alpha1.PythonConfig + 8, // 7: nebius.msp.spark.v1alpha1.SessionStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 9, // 8: nebius.msp.spark.v1alpha1.SessionStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 10, // 9: nebius.msp.spark.v1alpha1.SessionStatus.driver_preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 10, // 10: nebius.msp.spark.v1alpha1.SessionStatus.executor_preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_session_proto_init() } +func file_nebius_msp_spark_v1alpha1_session_proto_init() { + if File_nebius_msp_spark_v1alpha1_session_proto != nil { + return + } + file_nebius_msp_spark_v1alpha1_common_proto_init() + file_nebius_msp_spark_v1alpha1_preset_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Session); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*SessionSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*SessionStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[1].OneofWrappers = []any{} + file_nebius_msp_spark_v1alpha1_session_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_session_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_session_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_session_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_session_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_session_proto = out.File + file_nebius_msp_spark_v1alpha1_session_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_session_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_session_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/session.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/session.sensitive.pb.go new file mode 100644 index 0000000..8c6ff99 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/session.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Session) Sanitize() // is not generated as no sensitive fields found +// func (x *Session) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SessionSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *SessionSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SessionStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *SessionStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/session_service.pb.go b/proto/nebius/msp/spark/v1alpha1/session_service.pb.go new file mode 100644 index 0000000..de8b017 --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/session_service.pb.go @@ -0,0 +1,611 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/session_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the session to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSessionRequest) Reset() { + *x = GetSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionRequest) ProtoMessage() {} + +func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead. +func (*GetSessionRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSessionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSessionByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Parent ID of the session to retrieve. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Name of the session to retrieve. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSessionByNameRequest) Reset() { + *x = GetSessionByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSessionByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionByNameRequest) ProtoMessage() {} + +func (x *GetSessionByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionByNameRequest.ProtoReflect.Descriptor instead. +func (*GetSessionByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSessionByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetSessionByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListSessionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of IAM container to list sessions from. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. Default value is 100. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListSessionsRequest) Reset() { + *x = ListSessionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSessionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSessionsRequest) ProtoMessage() {} + +func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead. +func (*ListSessionsRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSessionsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListSessionsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSessionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListSessionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of sessions. + Items []*Session `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken *string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3,oneof" json:"next_page_token,omitempty"` +} + +func (x *ListSessionsResponse) Reset() { + *x = ListSessionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSessionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSessionsResponse) ProtoMessage() {} + +func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead. +func (*ListSessionsResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListSessionsResponse) GetItems() []*Session { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListSessionsResponse) GetNextPageToken() string { + if x != nil && x.NextPageToken != nil { + return *x.NextPageToken + } + return "" +} + +type CreateSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the new session. Must include parent_id - ID of the cluster to create session in. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification for the new session. + Spec *SessionSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateSessionRequest) Reset() { + *x = CreateSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSessionRequest) ProtoMessage() {} + +func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead. +func (*CreateSessionRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateSessionRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateSessionRequest) GetSpec() *SessionSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteSessionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the session to delete. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteSessionRequest) Reset() { + *x = DeleteSessionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSessionRequest) ProtoMessage() {} + +func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. +func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteSessionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_msp_spark_v1alpha1_session_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_spark_v1alpha1_session_service_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x19, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, + 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x02, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x3a, 0x85, 0x01, 0xba, 0x48, 0x81, 0x01, 0x1a, 0x7f, 0x0a, 0x17, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x27, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x27, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x27, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x27, 0x6e, 0x61, 0x6d, 0x65, + 0x27, 0x1a, 0x37, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x68, 0x61, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x22, 0x2e, 0x0a, 0x14, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xf2, 0x03, 0x0a, 0x0e, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, + 0x03, 0x47, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2f, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x06, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x09, 0xba, 0x4a, 0x06, 0x73, 0x70, 0x2e, 0x6d, 0x73, 0x70, 0x42, + 0x72, 0x0a, 0x20, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x13, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x73, 0x70, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescOnce sync.Once + file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescData = file_nebius_msp_spark_v1alpha1_session_service_proto_rawDesc +) + +func file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescGZIP() []byte { + file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescData) + }) + return file_nebius_msp_spark_v1alpha1_session_service_proto_rawDescData +} + +var file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_msp_spark_v1alpha1_session_service_proto_goTypes = []any{ + (*GetSessionRequest)(nil), // 0: nebius.msp.spark.v1alpha1.GetSessionRequest + (*GetSessionByNameRequest)(nil), // 1: nebius.msp.spark.v1alpha1.GetSessionByNameRequest + (*ListSessionsRequest)(nil), // 2: nebius.msp.spark.v1alpha1.ListSessionsRequest + (*ListSessionsResponse)(nil), // 3: nebius.msp.spark.v1alpha1.ListSessionsResponse + (*CreateSessionRequest)(nil), // 4: nebius.msp.spark.v1alpha1.CreateSessionRequest + (*DeleteSessionRequest)(nil), // 5: nebius.msp.spark.v1alpha1.DeleteSessionRequest + (*Session)(nil), // 6: nebius.msp.spark.v1alpha1.Session + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*SessionSpec)(nil), // 8: nebius.msp.spark.v1alpha1.SessionSpec + (*v1.Operation)(nil), // 9: nebius.common.v1.Operation +} +var file_nebius_msp_spark_v1alpha1_session_service_proto_depIdxs = []int32{ + 6, // 0: nebius.msp.spark.v1alpha1.ListSessionsResponse.items:type_name -> nebius.msp.spark.v1alpha1.Session + 7, // 1: nebius.msp.spark.v1alpha1.CreateSessionRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 2: nebius.msp.spark.v1alpha1.CreateSessionRequest.spec:type_name -> nebius.msp.spark.v1alpha1.SessionSpec + 0, // 3: nebius.msp.spark.v1alpha1.SessionService.Get:input_type -> nebius.msp.spark.v1alpha1.GetSessionRequest + 1, // 4: nebius.msp.spark.v1alpha1.SessionService.GetByName:input_type -> nebius.msp.spark.v1alpha1.GetSessionByNameRequest + 2, // 5: nebius.msp.spark.v1alpha1.SessionService.List:input_type -> nebius.msp.spark.v1alpha1.ListSessionsRequest + 4, // 6: nebius.msp.spark.v1alpha1.SessionService.Create:input_type -> nebius.msp.spark.v1alpha1.CreateSessionRequest + 5, // 7: nebius.msp.spark.v1alpha1.SessionService.Delete:input_type -> nebius.msp.spark.v1alpha1.DeleteSessionRequest + 6, // 8: nebius.msp.spark.v1alpha1.SessionService.Get:output_type -> nebius.msp.spark.v1alpha1.Session + 6, // 9: nebius.msp.spark.v1alpha1.SessionService.GetByName:output_type -> nebius.msp.spark.v1alpha1.Session + 3, // 10: nebius.msp.spark.v1alpha1.SessionService.List:output_type -> nebius.msp.spark.v1alpha1.ListSessionsResponse + 9, // 11: nebius.msp.spark.v1alpha1.SessionService.Create:output_type -> nebius.common.v1.Operation + 9, // 12: nebius.msp.spark.v1alpha1.SessionService.Delete:output_type -> nebius.common.v1.Operation + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_msp_spark_v1alpha1_session_service_proto_init() } +func file_nebius_msp_spark_v1alpha1_session_service_proto_init() { + if File_nebius_msp_spark_v1alpha1_session_service_proto != nil { + return + } + file_nebius_msp_spark_v1alpha1_session_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetSessionByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListSessionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListSessionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes[3].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_spark_v1alpha1_session_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_spark_v1alpha1_session_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_spark_v1alpha1_session_service_proto_depIdxs, + MessageInfos: file_nebius_msp_spark_v1alpha1_session_service_proto_msgTypes, + }.Build() + File_nebius_msp_spark_v1alpha1_session_service_proto = out.File + file_nebius_msp_spark_v1alpha1_session_service_proto_rawDesc = nil + file_nebius_msp_spark_v1alpha1_session_service_proto_goTypes = nil + file_nebius_msp_spark_v1alpha1_session_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/spark/v1alpha1/session_service.sensitive.pb.go b/proto/nebius/msp/spark/v1alpha1/session_service.sensitive.pb.go new file mode 100644 index 0000000..8fe98cd --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/session_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetSessionRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSessionRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetSessionByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSessionByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSessionsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSessionsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSessionsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSessionsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateSessionRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateSessionRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteSessionRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteSessionRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/spark/v1alpha1/session_service_grpc.pb.go b/proto/nebius/msp/spark/v1alpha1/session_service_grpc.pb.go new file mode 100644 index 0000000..73d509a --- /dev/null +++ b/proto/nebius/msp/spark/v1alpha1/session_service_grpc.pb.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/spark/v1alpha1/session_service.proto + +package v1alpha1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SessionService_Get_FullMethodName = "/nebius.msp.spark.v1alpha1.SessionService/Get" + SessionService_GetByName_FullMethodName = "/nebius.msp.spark.v1alpha1.SessionService/GetByName" + SessionService_List_FullMethodName = "/nebius.msp.spark.v1alpha1.SessionService/List" + SessionService_Create_FullMethodName = "/nebius.msp.spark.v1alpha1.SessionService/Create" + SessionService_Delete_FullMethodName = "/nebius.msp.spark.v1alpha1.SessionService/Delete" +) + +// SessionServiceClient is the client API for SessionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SessionServiceClient interface { + // Returns the specified session. + Get(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) + // Returns the specified session by name. + GetByName(ctx context.Context, in *GetSessionByNameRequest, opts ...grpc.CallOption) (*Session, error) + // Retrieves a list of sessions. + List(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) + // Creates a session. + Create(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Deletes a session. + Delete(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type sessionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient { + return &sessionServiceClient{cc} +} + +func (c *sessionServiceClient) Get(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) { + out := new(Session) + err := c.cc.Invoke(ctx, SessionService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sessionServiceClient) GetByName(ctx context.Context, in *GetSessionByNameRequest, opts ...grpc.CallOption) (*Session, error) { + out := new(Session) + err := c.cc.Invoke(ctx, SessionService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sessionServiceClient) List(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) { + out := new(ListSessionsResponse) + err := c.cc.Invoke(ctx, SessionService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sessionServiceClient) Create(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, SessionService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sessionServiceClient) Delete(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, SessionService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SessionServiceServer is the server API for SessionService service. +// All implementations should embed UnimplementedSessionServiceServer +// for forward compatibility +type SessionServiceServer interface { + // Returns the specified session. + Get(context.Context, *GetSessionRequest) (*Session, error) + // Returns the specified session by name. + GetByName(context.Context, *GetSessionByNameRequest) (*Session, error) + // Retrieves a list of sessions. + List(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) + // Creates a session. + Create(context.Context, *CreateSessionRequest) (*v1.Operation, error) + // Deletes a session. + Delete(context.Context, *DeleteSessionRequest) (*v1.Operation, error) +} + +// UnimplementedSessionServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSessionServiceServer struct { +} + +func (UnimplementedSessionServiceServer) Get(context.Context, *GetSessionRequest) (*Session, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedSessionServiceServer) GetByName(context.Context, *GetSessionByNameRequest) (*Session, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedSessionServiceServer) List(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedSessionServiceServer) Create(context.Context, *CreateSessionRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedSessionServiceServer) Delete(context.Context, *DeleteSessionRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SessionServiceServer will +// result in compilation errors. +type UnsafeSessionServiceServer interface { + mustEmbedUnimplementedSessionServiceServer() +} + +func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer) { + s.RegisterService(&SessionService_ServiceDesc, srv) +} + +func _SessionService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).Get(ctx, req.(*GetSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SessionService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSessionByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).GetByName(ctx, req.(*GetSessionByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SessionService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSessionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).List(ctx, req.(*ListSessionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SessionService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).Create(ctx, req.(*CreateSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SessionService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SessionService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).Delete(ctx, req.(*DeleteSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SessionService_ServiceDesc is the grpc.ServiceDesc for SessionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SessionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.spark.v1alpha1.SessionService", + HandlerType: (*SessionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _SessionService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _SessionService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _SessionService_List_Handler, + }, + { + MethodName: "Create", + Handler: _SessionService_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _SessionService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/spark/v1alpha1/session_service.proto", +} diff --git a/proto/nebius/msp/v1alpha1/cluster.pb.go b/proto/nebius/msp/v1alpha1/cluster.pb.go new file mode 100644 index 0000000..fe19684 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/cluster.pb.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/v1alpha1/cluster.proto + +package v1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterStatus_Phase int32 + +const ( + ClusterStatus_PHASE_UNSPECIFIED ClusterStatus_Phase = 0 + ClusterStatus_PHASE_PROVISIONING ClusterStatus_Phase = 1 + ClusterStatus_PHASE_RUNNING ClusterStatus_Phase = 2 + ClusterStatus_PHASE_UPDATING ClusterStatus_Phase = 3 + ClusterStatus_PHASE_DELETING ClusterStatus_Phase = 4 + // Deprecated: Marked as deprecated in nebius/msp/v1alpha1/cluster.proto. + ClusterStatus_PHASE_DELETED ClusterStatus_Phase = 5 + ClusterStatus_PHASE_PURGING ClusterStatus_Phase = 6 + ClusterStatus_PHASE_STOPPING ClusterStatus_Phase = 7 + ClusterStatus_PHASE_RESUMING ClusterStatus_Phase = 8 +) + +// Enum value maps for ClusterStatus_Phase. +var ( + ClusterStatus_Phase_name = map[int32]string{ + 0: "PHASE_UNSPECIFIED", + 1: "PHASE_PROVISIONING", + 2: "PHASE_RUNNING", + 3: "PHASE_UPDATING", + 4: "PHASE_DELETING", + 5: "PHASE_DELETED", + 6: "PHASE_PURGING", + 7: "PHASE_STOPPING", + 8: "PHASE_RESUMING", + } + ClusterStatus_Phase_value = map[string]int32{ + "PHASE_UNSPECIFIED": 0, + "PHASE_PROVISIONING": 1, + "PHASE_RUNNING": 2, + "PHASE_UPDATING": 3, + "PHASE_DELETING": 4, + "PHASE_DELETED": 5, + "PHASE_PURGING": 6, + "PHASE_STOPPING": 7, + "PHASE_RESUMING": 8, + } +) + +func (x ClusterStatus_Phase) Enum() *ClusterStatus_Phase { + p := new(ClusterStatus_Phase) + *p = x + return p +} + +func (x ClusterStatus_Phase) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterStatus_Phase) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_msp_v1alpha1_cluster_proto_enumTypes[0].Descriptor() +} + +func (ClusterStatus_Phase) Type() protoreflect.EnumType { + return &file_nebius_msp_v1alpha1_cluster_proto_enumTypes[0] +} + +func (x ClusterStatus_Phase) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterStatus_Phase.Descriptor instead. +func (ClusterStatus_Phase) EnumDescriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_cluster_proto_rawDescGZIP(), []int{0, 0} +} + +type ClusterStatus_State int32 + +const ( + ClusterStatus_STATE_UNSPECIFIED ClusterStatus_State = 0 + ClusterStatus_STATE_IN_PROGRESS ClusterStatus_State = 1 + ClusterStatus_STATE_FINISHED ClusterStatus_State = 2 + ClusterStatus_STATE_ERROR ClusterStatus_State = 3 + ClusterStatus_STATE_DEGRADED ClusterStatus_State = 4 + ClusterStatus_STATE_SCHEDULED ClusterStatus_State = 5 +) + +// Enum value maps for ClusterStatus_State. +var ( + ClusterStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STATE_IN_PROGRESS", + 2: "STATE_FINISHED", + 3: "STATE_ERROR", + 4: "STATE_DEGRADED", + 5: "STATE_SCHEDULED", + } + ClusterStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STATE_IN_PROGRESS": 1, + "STATE_FINISHED": 2, + "STATE_ERROR": 3, + "STATE_DEGRADED": 4, + "STATE_SCHEDULED": 5, + } +) + +func (x ClusterStatus_State) Enum() *ClusterStatus_State { + p := new(ClusterStatus_State) + *p = x + return p +} + +func (x ClusterStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_msp_v1alpha1_cluster_proto_enumTypes[1].Descriptor() +} + +func (ClusterStatus_State) Type() protoreflect.EnumType { + return &file_nebius_msp_v1alpha1_cluster_proto_enumTypes[1] +} + +func (x ClusterStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterStatus_State.Descriptor instead. +func (ClusterStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_cluster_proto_rawDescGZIP(), []int{0, 1} +} + +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current phase of the cluster. + Phase ClusterStatus_Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_Phase" json:"phase,omitempty"` + // State reflects substatus of the phase to define whether it's healthy or not. + State ClusterStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.msp.v1alpha1.ClusterStatus_State" json:"state,omitempty"` + Reconciling bool `protobuf:"varint,100,opt,name=reconciling,proto3" json:"reconciling,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *ClusterStatus) GetPhase() ClusterStatus_Phase { + if x != nil { + return x.Phase + } + return ClusterStatus_PHASE_UNSPECIFIED +} + +func (x *ClusterStatus) GetState() ClusterStatus_State { + if x != nil { + return x.State + } + return ClusterStatus_STATE_UNSPECIFIED +} + +func (x *ClusterStatus) GetReconciling() bool { + if x != nil { + return x.Reconciling + } + return false +} + +var File_nebius_msp_v1alpha1_cluster_proto protoreflect.FileDescriptor + +var file_nebius_msp_v1alpha1_cluster_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0xfd, 0x03, 0x0a, 0x0d, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x68, + 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, + 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0xc3, 0x01, 0x0a, + 0x05, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, + 0x12, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x48, 0x41, 0x53, + 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, + 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x12, 0x15, 0x0a, 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, + 0x44, 0x10, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, + 0x5f, 0x50, 0x55, 0x52, 0x47, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x48, + 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x12, + 0x0a, 0x0e, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x49, 0x4e, 0x47, + 0x10, 0x08, 0x22, 0x83, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x5f, + 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x43, 0x48, + 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x5f, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_msp_v1alpha1_cluster_proto_rawDescOnce sync.Once + file_nebius_msp_v1alpha1_cluster_proto_rawDescData = file_nebius_msp_v1alpha1_cluster_proto_rawDesc +) + +func file_nebius_msp_v1alpha1_cluster_proto_rawDescGZIP() []byte { + file_nebius_msp_v1alpha1_cluster_proto_rawDescOnce.Do(func() { + file_nebius_msp_v1alpha1_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_v1alpha1_cluster_proto_rawDescData) + }) + return file_nebius_msp_v1alpha1_cluster_proto_rawDescData +} + +var file_nebius_msp_v1alpha1_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_msp_v1alpha1_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_msp_v1alpha1_cluster_proto_goTypes = []any{ + (ClusterStatus_Phase)(0), // 0: nebius.msp.v1alpha1.ClusterStatus.Phase + (ClusterStatus_State)(0), // 1: nebius.msp.v1alpha1.ClusterStatus.State + (*ClusterStatus)(nil), // 2: nebius.msp.v1alpha1.ClusterStatus +} +var file_nebius_msp_v1alpha1_cluster_proto_depIdxs = []int32{ + 0, // 0: nebius.msp.v1alpha1.ClusterStatus.phase:type_name -> nebius.msp.v1alpha1.ClusterStatus.Phase + 1, // 1: nebius.msp.v1alpha1.ClusterStatus.state:type_name -> nebius.msp.v1alpha1.ClusterStatus.State + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_nebius_msp_v1alpha1_cluster_proto_init() } +func file_nebius_msp_v1alpha1_cluster_proto_init() { + if File_nebius_msp_v1alpha1_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_v1alpha1_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_v1alpha1_cluster_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_v1alpha1_cluster_proto_goTypes, + DependencyIndexes: file_nebius_msp_v1alpha1_cluster_proto_depIdxs, + EnumInfos: file_nebius_msp_v1alpha1_cluster_proto_enumTypes, + MessageInfos: file_nebius_msp_v1alpha1_cluster_proto_msgTypes, + }.Build() + File_nebius_msp_v1alpha1_cluster_proto = out.File + file_nebius_msp_v1alpha1_cluster_proto_rawDesc = nil + file_nebius_msp_v1alpha1_cluster_proto_goTypes = nil + file_nebius_msp_v1alpha1_cluster_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/v1alpha1/cluster.sensitive.pb.go b/proto/nebius/msp/v1alpha1/cluster.sensitive.pb.go new file mode 100644 index 0000000..69a2b7c --- /dev/null +++ b/proto/nebius/msp/v1alpha1/cluster.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *ClusterStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ClusterStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/v1alpha1/resource/preset.pb.go b/proto/nebius/msp/v1alpha1/resource/preset.pb.go new file mode 100644 index 0000000..9fbd826 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/preset.pb.go @@ -0,0 +1,481 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/preset.proto + +package resource + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Preset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Spec *PresetSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *Preset) Reset() { + *x = Preset{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Preset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Preset) ProtoMessage() {} + +func (x *Preset) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Preset.ProtoReflect.Descriptor instead. +func (*Preset) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP(), []int{0} +} + +func (x *Preset) GetSpec() *PresetSpec { + if x != nil { + return x.Spec + } + return nil +} + +type PresetSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Flavor *FlavorSpec `protobuf:"bytes,1,opt,name=flavor,proto3" json:"flavor,omitempty"` + Hosts *Host `protobuf:"bytes,2,opt,name=hosts,proto3" json:"hosts,omitempty"` + Disk *Disk `protobuf:"bytes,3,opt,name=disk,proto3" json:"disk,omitempty"` + Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` +} + +func (x *PresetSpec) Reset() { + *x = PresetSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PresetSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PresetSpec) ProtoMessage() {} + +func (x *PresetSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PresetSpec.ProtoReflect.Descriptor instead. +func (*PresetSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP(), []int{1} +} + +func (x *PresetSpec) GetFlavor() *FlavorSpec { + if x != nil { + return x.Flavor + } + return nil +} + +func (x *PresetSpec) GetHosts() *Host { + if x != nil { + return x.Hosts + } + return nil +} + +func (x *PresetSpec) GetDisk() *Disk { + if x != nil { + return x.Disk + } + return nil +} + +func (x *PresetSpec) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +type FlavorSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cpu *CpuSpec `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory *MemorySpec `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` +} + +func (x *FlavorSpec) Reset() { + *x = FlavorSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlavorSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlavorSpec) ProtoMessage() {} + +func (x *FlavorSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlavorSpec.ProtoReflect.Descriptor instead. +func (*FlavorSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP(), []int{2} +} + +func (x *FlavorSpec) GetCpu() *CpuSpec { + if x != nil { + return x.Cpu + } + return nil +} + +func (x *FlavorSpec) GetMemory() *MemorySpec { + if x != nil { + return x.Memory + } + return nil +} + +type CpuSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Generation int32 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"` +} + +func (x *CpuSpec) Reset() { + *x = CpuSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CpuSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CpuSpec) ProtoMessage() {} + +func (x *CpuSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CpuSpec.ProtoReflect.Descriptor instead. +func (*CpuSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP(), []int{3} +} + +func (x *CpuSpec) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *CpuSpec) GetGeneration() int32 { + if x != nil { + return x.Generation + } + return 0 +} + +type MemorySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LimitGibibytes int64 `protobuf:"varint,1,opt,name=limit_gibibytes,json=limitGibibytes,proto3" json:"limit_gibibytes,omitempty"` +} + +func (x *MemorySpec) Reset() { + *x = MemorySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemorySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemorySpec) ProtoMessage() {} + +func (x *MemorySpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemorySpec.ProtoReflect.Descriptor instead. +func (*MemorySpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP(), []int{4} +} + +func (x *MemorySpec) GetLimitGibibytes() int64 { + if x != nil { + return x.LimitGibibytes + } + return 0 +} + +var File_nebius_msp_v1alpha1_resource_preset_proto protoreflect.FileDescriptor + +var file_nebius_msp_v1alpha1_resource_preset_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, + 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x44, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x05, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, + 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, 0x1a, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x46, + 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3f, 0x0a, 0x03, 0x63, 0x70, 0x75, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x70, 0x75, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x48, 0x0a, 0x06, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x4f, 0x0a, 0x07, 0x43, 0x70, 0x75, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x1c, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, + 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3d, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x67, 0x69, 0x62, + 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x47, 0x69, 0x62, 0x69, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x42, 0x70, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0b, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_v1alpha1_resource_preset_proto_rawDescOnce sync.Once + file_nebius_msp_v1alpha1_resource_preset_proto_rawDescData = file_nebius_msp_v1alpha1_resource_preset_proto_rawDesc +) + +func file_nebius_msp_v1alpha1_resource_preset_proto_rawDescGZIP() []byte { + file_nebius_msp_v1alpha1_resource_preset_proto_rawDescOnce.Do(func() { + file_nebius_msp_v1alpha1_resource_preset_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_v1alpha1_resource_preset_proto_rawDescData) + }) + return file_nebius_msp_v1alpha1_resource_preset_proto_rawDescData +} + +var file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_msp_v1alpha1_resource_preset_proto_goTypes = []any{ + (*Preset)(nil), // 0: nebius.msp.v1alpha1.resource.Preset + (*PresetSpec)(nil), // 1: nebius.msp.v1alpha1.resource.PresetSpec + (*FlavorSpec)(nil), // 2: nebius.msp.v1alpha1.resource.FlavorSpec + (*CpuSpec)(nil), // 3: nebius.msp.v1alpha1.resource.CpuSpec + (*MemorySpec)(nil), // 4: nebius.msp.v1alpha1.resource.MemorySpec + (*Host)(nil), // 5: nebius.msp.v1alpha1.resource.Host + (*Disk)(nil), // 6: nebius.msp.v1alpha1.resource.Disk +} +var file_nebius_msp_v1alpha1_resource_preset_proto_depIdxs = []int32{ + 1, // 0: nebius.msp.v1alpha1.resource.Preset.spec:type_name -> nebius.msp.v1alpha1.resource.PresetSpec + 2, // 1: nebius.msp.v1alpha1.resource.PresetSpec.flavor:type_name -> nebius.msp.v1alpha1.resource.FlavorSpec + 5, // 2: nebius.msp.v1alpha1.resource.PresetSpec.hosts:type_name -> nebius.msp.v1alpha1.resource.Host + 6, // 3: nebius.msp.v1alpha1.resource.PresetSpec.disk:type_name -> nebius.msp.v1alpha1.resource.Disk + 3, // 4: nebius.msp.v1alpha1.resource.FlavorSpec.cpu:type_name -> nebius.msp.v1alpha1.resource.CpuSpec + 4, // 5: nebius.msp.v1alpha1.resource.FlavorSpec.memory:type_name -> nebius.msp.v1alpha1.resource.MemorySpec + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_nebius_msp_v1alpha1_resource_preset_proto_init() } +func file_nebius_msp_v1alpha1_resource_preset_proto_init() { + if File_nebius_msp_v1alpha1_resource_preset_proto != nil { + return + } + file_nebius_msp_v1alpha1_resource_template_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Preset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PresetSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FlavorSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CpuSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*MemorySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_v1alpha1_resource_preset_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_v1alpha1_resource_preset_proto_goTypes, + DependencyIndexes: file_nebius_msp_v1alpha1_resource_preset_proto_depIdxs, + MessageInfos: file_nebius_msp_v1alpha1_resource_preset_proto_msgTypes, + }.Build() + File_nebius_msp_v1alpha1_resource_preset_proto = out.File + file_nebius_msp_v1alpha1_resource_preset_proto_rawDesc = nil + file_nebius_msp_v1alpha1_resource_preset_proto_goTypes = nil + file_nebius_msp_v1alpha1_resource_preset_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/v1alpha1/resource/preset.sensitive.pb.go b/proto/nebius/msp/v1alpha1/resource/preset.sensitive.pb.go new file mode 100644 index 0000000..9b91d36 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/preset.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package resource + +// func (x *Preset) Sanitize() // is not generated as no sensitive fields found +// func (x *Preset) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PresetSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *PresetSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *FlavorSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *FlavorSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CpuSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *CpuSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *MemorySpec) Sanitize() // is not generated as no sensitive fields found +// func (x *MemorySpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/v1alpha1/resource/preset_service.pb.go b/proto/nebius/msp/v1alpha1/resource/preset_service.pb.go new file mode 100644 index 0000000..5912a43 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/preset_service.pb.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/preset_service.proto + +package resource + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListPresetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListPresetsRequest) Reset() { + *x = ListPresetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPresetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPresetsRequest) ProtoMessage() {} + +func (x *ListPresetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPresetsRequest.ProtoReflect.Descriptor instead. +func (*ListPresetsRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ListPresetsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPresetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListPresetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Preset `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPresetsResponse) Reset() { + *x = ListPresetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPresetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPresetsResponse) ProtoMessage() {} + +func (x *ListPresetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPresetsResponse.ProtoReflect.Descriptor instead. +func (*ListPresetsResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListPresetsResponse) GetItems() []*Preset { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListPresetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_msp_v1alpha1_resource_preset_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x70, + 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x1a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x79, + 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x7c, 0x0a, 0x0d, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x04, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x30, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x77, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x12, + 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescOnce sync.Once + file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescData = file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDesc +) + +func file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescGZIP() []byte { + file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescData) + }) + return file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDescData +} + +var file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_msp_v1alpha1_resource_preset_service_proto_goTypes = []any{ + (*ListPresetsRequest)(nil), // 0: nebius.msp.v1alpha1.resource.ListPresetsRequest + (*ListPresetsResponse)(nil), // 1: nebius.msp.v1alpha1.resource.ListPresetsResponse + (*Preset)(nil), // 2: nebius.msp.v1alpha1.resource.Preset +} +var file_nebius_msp_v1alpha1_resource_preset_service_proto_depIdxs = []int32{ + 2, // 0: nebius.msp.v1alpha1.resource.ListPresetsResponse.items:type_name -> nebius.msp.v1alpha1.resource.Preset + 0, // 1: nebius.msp.v1alpha1.resource.PresetService.List:input_type -> nebius.msp.v1alpha1.resource.ListPresetsRequest + 1, // 2: nebius.msp.v1alpha1.resource.PresetService.List:output_type -> nebius.msp.v1alpha1.resource.ListPresetsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_msp_v1alpha1_resource_preset_service_proto_init() } +func file_nebius_msp_v1alpha1_resource_preset_service_proto_init() { + if File_nebius_msp_v1alpha1_resource_preset_service_proto != nil { + return + } + file_nebius_msp_v1alpha1_resource_preset_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ListPresetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListPresetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_v1alpha1_resource_preset_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_v1alpha1_resource_preset_service_proto_depIdxs, + MessageInfos: file_nebius_msp_v1alpha1_resource_preset_service_proto_msgTypes, + }.Build() + File_nebius_msp_v1alpha1_resource_preset_service_proto = out.File + file_nebius_msp_v1alpha1_resource_preset_service_proto_rawDesc = nil + file_nebius_msp_v1alpha1_resource_preset_service_proto_goTypes = nil + file_nebius_msp_v1alpha1_resource_preset_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/v1alpha1/resource/preset_service.sensitive.pb.go b/proto/nebius/msp/v1alpha1/resource/preset_service.sensitive.pb.go new file mode 100644 index 0000000..34b9943 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/preset_service.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package resource + +// func (x *ListPresetsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPresetsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListPresetsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPresetsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/v1alpha1/resource/preset_service_grpc.pb.go b/proto/nebius/msp/v1alpha1/resource/preset_service_grpc.pb.go new file mode 100644 index 0000000..19735f6 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/preset_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/preset_service.proto + +package resource + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PresetService_List_FullMethodName = "/nebius.msp.v1alpha1.resource.PresetService/List" +) + +// PresetServiceClient is the client API for PresetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PresetServiceClient interface { + List(ctx context.Context, in *ListPresetsRequest, opts ...grpc.CallOption) (*ListPresetsResponse, error) +} + +type presetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPresetServiceClient(cc grpc.ClientConnInterface) PresetServiceClient { + return &presetServiceClient{cc} +} + +func (c *presetServiceClient) List(ctx context.Context, in *ListPresetsRequest, opts ...grpc.CallOption) (*ListPresetsResponse, error) { + out := new(ListPresetsResponse) + err := c.cc.Invoke(ctx, PresetService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PresetServiceServer is the server API for PresetService service. +// All implementations should embed UnimplementedPresetServiceServer +// for forward compatibility +type PresetServiceServer interface { + List(context.Context, *ListPresetsRequest) (*ListPresetsResponse, error) +} + +// UnimplementedPresetServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPresetServiceServer struct { +} + +func (UnimplementedPresetServiceServer) List(context.Context, *ListPresetsRequest) (*ListPresetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafePresetServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PresetServiceServer will +// result in compilation errors. +type UnsafePresetServiceServer interface { + mustEmbedUnimplementedPresetServiceServer() +} + +func RegisterPresetServiceServer(s grpc.ServiceRegistrar, srv PresetServiceServer) { + s.RegisterService(&PresetService_ServiceDesc, srv) +} + +func _PresetService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPresetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PresetServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PresetService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PresetServiceServer).List(ctx, req.(*ListPresetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PresetService_ServiceDesc is the grpc.ServiceDesc for PresetService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PresetService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.v1alpha1.resource.PresetService", + HandlerType: (*PresetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _PresetService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/v1alpha1/resource/preset_service.proto", +} diff --git a/proto/nebius/msp/v1alpha1/resource/template.pb.go b/proto/nebius/msp/v1alpha1/resource/template.pb.go new file mode 100644 index 0000000..079770a --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/template.pb.go @@ -0,0 +1,861 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/template.proto + +package resource + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Template struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *TemplateStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Spec *TemplateSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *Template) Reset() { + *x = Template{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Template) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Template) ProtoMessage() {} + +func (x *Template) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Template.ProtoReflect.Descriptor instead. +func (*Template) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{0} +} + +func (x *Template) GetStatus() *TemplateStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Template) GetSpec() *TemplateSpec { + if x != nil { + return x.Spec + } + return nil +} + +type TemplateStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PresetDetails *PresetDetails `protobuf:"bytes,1,opt,name=preset_details,json=presetDetails,proto3" json:"preset_details,omitempty"` +} + +func (x *TemplateStatus) Reset() { + *x = TemplateStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateStatus) ProtoMessage() {} + +func (x *TemplateStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateStatus.ProtoReflect.Descriptor instead. +func (*TemplateStatus) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{1} +} + +func (x *TemplateStatus) GetPresetDetails() *PresetDetails { + if x != nil { + return x.PresetDetails + } + return nil +} + +type TemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resources *ResourcesSpec `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"` + Hosts *Host `protobuf:"bytes,2,opt,name=hosts,proto3" json:"hosts,omitempty"` + Disk *Disk `protobuf:"bytes,3,opt,name=disk,proto3" json:"disk,omitempty"` + Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` +} + +func (x *TemplateSpec) Reset() { + *x = TemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateSpec) ProtoMessage() {} + +func (x *TemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateSpec.ProtoReflect.Descriptor instead. +func (*TemplateSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{2} +} + +func (x *TemplateSpec) GetResources() *ResourcesSpec { + if x != nil { + return x.Resources + } + return nil +} + +func (x *TemplateSpec) GetHosts() *Host { + if x != nil { + return x.Hosts + } + return nil +} + +func (x *TemplateSpec) GetDisk() *Disk { + if x != nil { + return x.Disk + } + return nil +} + +func (x *TemplateSpec) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +type ResourcesSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + Preset string `protobuf:"bytes,2,opt,name=preset,proto3" json:"preset,omitempty"` +} + +func (x *ResourcesSpec) Reset() { + *x = ResourcesSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesSpec) ProtoMessage() {} + +func (x *ResourcesSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesSpec.ProtoReflect.Descriptor instead. +func (*ResourcesSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{3} +} + +func (x *ResourcesSpec) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *ResourcesSpec) GetPreset() string { + if x != nil { + return x.Preset + } + return "" +} + +type PresetDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CpuCount int32 `protobuf:"varint,1,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"` + MemoryGibibytes int64 `protobuf:"varint,2,opt,name=memory_gibibytes,json=memoryGibibytes,proto3" json:"memory_gibibytes,omitempty"` +} + +func (x *PresetDetails) Reset() { + *x = PresetDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PresetDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PresetDetails) ProtoMessage() {} + +func (x *PresetDetails) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PresetDetails.ProtoReflect.Descriptor instead. +func (*PresetDetails) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{4} +} + +func (x *PresetDetails) GetCpuCount() int32 { + if x != nil { + return x.CpuCount + } + return 0 +} + +func (x *PresetDetails) GetMemoryGibibytes() int64 { + if x != nil { + return x.MemoryGibibytes + } + return 0 +} + +type Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Min int64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"` + Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` + // step 0 is no step validation + Step int64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` + Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Range) Reset() { + *x = Range{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Range) ProtoMessage() {} + +func (x *Range) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Range.ProtoReflect.Descriptor instead. +func (*Range) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{5} +} + +func (x *Range) GetMin() int64 { + if x != nil { + return x.Min + } + return 0 +} + +func (x *Range) GetMax() int64 { + if x != nil { + return x.Max + } + return 0 +} + +func (x *Range) GetStep() int64 { + if x != nil { + return x.Step + } + return 0 +} + +func (x *Range) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +type Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + SizeGibibytes *Range `protobuf:"bytes,2,opt,name=size_gibibytes,json=sizeGibibytes,proto3" json:"size_gibibytes,omitempty"` +} + +func (x *Disk) Reset() { + *x = Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disk) ProtoMessage() {} + +func (x *Disk) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Disk.ProtoReflect.Descriptor instead. +func (*Disk) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{6} +} + +func (x *Disk) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Disk) GetSizeGibibytes() *Range { + if x != nil { + return x.SizeGibibytes + } + return nil +} + +type DiskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + SizeGibibytes int64 `protobuf:"varint,2,opt,name=size_gibibytes,json=sizeGibibytes,proto3" json:"size_gibibytes,omitempty"` +} + +func (x *DiskSpec) Reset() { + *x = DiskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskSpec) ProtoMessage() {} + +func (x *DiskSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskSpec.ProtoReflect.Descriptor instead. +func (*DiskSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{7} +} + +func (x *DiskSpec) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *DiskSpec) GetSizeGibibytes() int64 { + if x != nil { + return x.SizeGibibytes + } + return 0 +} + +type Host struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count *Range `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *Host) Reset() { + *x = Host{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Host) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Host) ProtoMessage() {} + +func (x *Host) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Host.ProtoReflect.Descriptor instead. +func (*Host) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{8} +} + +func (x *Host) GetCount() *Range { + if x != nil { + return x.Count + } + return nil +} + +type HostSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *HostSpec) Reset() { + *x = HostSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostSpec) ProtoMessage() {} + +func (x *HostSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HostSpec.ProtoReflect.Descriptor instead. +func (*HostSpec) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP(), []int{9} +} + +func (x *HostSpec) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +var File_nebius_msp_v1alpha1_resource_template_proto protoreflect.FileDescriptor + +var file_nebius_msp_v1alpha1_resource_template_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x08, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x22, 0x64, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x0c, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38, 0x0a, + 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x48, 0x6f, 0x73, 0x74, + 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, + 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x04, 0x64, 0x69, 0x73, 0x6b, 0x12, + 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x08, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x22, 0x67, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x23, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x63, 0x70, + 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x05, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x76, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, + 0x12, 0x1a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x52, 0x0a, 0x0e, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x22, 0x55, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x0e, 0x73, 0x69, 0x7a, 0x65, + 0x5f, 0x67, 0x69, 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, + 0x62, 0x69, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x49, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, + 0x41, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1c, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x72, 0x0a, 0x23, + 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_v1alpha1_resource_template_proto_rawDescOnce sync.Once + file_nebius_msp_v1alpha1_resource_template_proto_rawDescData = file_nebius_msp_v1alpha1_resource_template_proto_rawDesc +) + +func file_nebius_msp_v1alpha1_resource_template_proto_rawDescGZIP() []byte { + file_nebius_msp_v1alpha1_resource_template_proto_rawDescOnce.Do(func() { + file_nebius_msp_v1alpha1_resource_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_v1alpha1_resource_template_proto_rawDescData) + }) + return file_nebius_msp_v1alpha1_resource_template_proto_rawDescData +} + +var file_nebius_msp_v1alpha1_resource_template_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_nebius_msp_v1alpha1_resource_template_proto_goTypes = []any{ + (*Template)(nil), // 0: nebius.msp.v1alpha1.resource.Template + (*TemplateStatus)(nil), // 1: nebius.msp.v1alpha1.resource.TemplateStatus + (*TemplateSpec)(nil), // 2: nebius.msp.v1alpha1.resource.TemplateSpec + (*ResourcesSpec)(nil), // 3: nebius.msp.v1alpha1.resource.ResourcesSpec + (*PresetDetails)(nil), // 4: nebius.msp.v1alpha1.resource.PresetDetails + (*Range)(nil), // 5: nebius.msp.v1alpha1.resource.Range + (*Disk)(nil), // 6: nebius.msp.v1alpha1.resource.Disk + (*DiskSpec)(nil), // 7: nebius.msp.v1alpha1.resource.DiskSpec + (*Host)(nil), // 8: nebius.msp.v1alpha1.resource.Host + (*HostSpec)(nil), // 9: nebius.msp.v1alpha1.resource.HostSpec +} +var file_nebius_msp_v1alpha1_resource_template_proto_depIdxs = []int32{ + 1, // 0: nebius.msp.v1alpha1.resource.Template.status:type_name -> nebius.msp.v1alpha1.resource.TemplateStatus + 2, // 1: nebius.msp.v1alpha1.resource.Template.spec:type_name -> nebius.msp.v1alpha1.resource.TemplateSpec + 4, // 2: nebius.msp.v1alpha1.resource.TemplateStatus.preset_details:type_name -> nebius.msp.v1alpha1.resource.PresetDetails + 3, // 3: nebius.msp.v1alpha1.resource.TemplateSpec.resources:type_name -> nebius.msp.v1alpha1.resource.ResourcesSpec + 8, // 4: nebius.msp.v1alpha1.resource.TemplateSpec.hosts:type_name -> nebius.msp.v1alpha1.resource.Host + 6, // 5: nebius.msp.v1alpha1.resource.TemplateSpec.disk:type_name -> nebius.msp.v1alpha1.resource.Disk + 5, // 6: nebius.msp.v1alpha1.resource.Disk.size_gibibytes:type_name -> nebius.msp.v1alpha1.resource.Range + 5, // 7: nebius.msp.v1alpha1.resource.Host.count:type_name -> nebius.msp.v1alpha1.resource.Range + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_msp_v1alpha1_resource_template_proto_init() } +func file_nebius_msp_v1alpha1_resource_template_proto_init() { + if File_nebius_msp_v1alpha1_resource_template_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Template); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*TemplateStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*TemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ResourcesSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*PresetDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*DiskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*Host); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*HostSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_v1alpha1_resource_template_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_msp_v1alpha1_resource_template_proto_goTypes, + DependencyIndexes: file_nebius_msp_v1alpha1_resource_template_proto_depIdxs, + MessageInfos: file_nebius_msp_v1alpha1_resource_template_proto_msgTypes, + }.Build() + File_nebius_msp_v1alpha1_resource_template_proto = out.File + file_nebius_msp_v1alpha1_resource_template_proto_rawDesc = nil + file_nebius_msp_v1alpha1_resource_template_proto_goTypes = nil + file_nebius_msp_v1alpha1_resource_template_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/v1alpha1/resource/template.sensitive.pb.go b/proto/nebius/msp/v1alpha1/resource/template.sensitive.pb.go new file mode 100644 index 0000000..5a1ffa9 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/template.sensitive.pb.go @@ -0,0 +1,33 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package resource + +// func (x *Template) Sanitize() // is not generated as no sensitive fields found +// func (x *Template) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *TemplateStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *TemplateStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *TemplateSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *TemplateSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ResourcesSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ResourcesSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PresetDetails) Sanitize() // is not generated as no sensitive fields found +// func (x *PresetDetails) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Range) Sanitize() // is not generated as no sensitive fields found +// func (x *Range) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Disk) Sanitize() // is not generated as no sensitive fields found +// func (x *Disk) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DiskSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *DiskSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Host) Sanitize() // is not generated as no sensitive fields found +// func (x *Host) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *HostSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *HostSpec) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/v1alpha1/resource/template_service.pb.go b/proto/nebius/msp/v1alpha1/resource/template_service.pb.go new file mode 100644 index 0000000..2758188 --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/template_service.pb.go @@ -0,0 +1,255 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/template_service.proto + +package resource + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListTemplatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize int64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTemplatesRequest) Reset() { + *x = ListTemplatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTemplatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTemplatesRequest) ProtoMessage() {} + +func (x *ListTemplatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTemplatesRequest.ProtoReflect.Descriptor instead. +func (*ListTemplatesRequest) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ListTemplatesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTemplatesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListTemplatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Template `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTemplatesResponse) Reset() { + *x = ListTemplatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTemplatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTemplatesResponse) ProtoMessage() {} + +func (x *ListTemplatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTemplatesResponse.ProtoReflect.Descriptor instead. +func (*ListTemplatesResponse) Descriptor() ([]byte, []int) { + return file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTemplatesResponse) GetItems() []*Template { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListTemplatesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_msp_v1alpha1_resource_template_service_proto protoreflect.FileDescriptor + +var file_nebius_msp_v1alpha1_resource_template_service_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, + 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x1a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, 0x70, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x52, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x32, 0x82, 0x01, 0x0a, 0x0f, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x32, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x6d, 0x73, 0x70, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x79, 0x0a, 0x23, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x6d, 0x73, 0x70, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x14, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x6d, 0x73, + 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescOnce sync.Once + file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescData = file_nebius_msp_v1alpha1_resource_template_service_proto_rawDesc +) + +func file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescGZIP() []byte { + file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescOnce.Do(func() { + file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescData) + }) + return file_nebius_msp_v1alpha1_resource_template_service_proto_rawDescData +} + +var file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_nebius_msp_v1alpha1_resource_template_service_proto_goTypes = []any{ + (*ListTemplatesRequest)(nil), // 0: nebius.msp.v1alpha1.resource.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 1: nebius.msp.v1alpha1.resource.ListTemplatesResponse + (*Template)(nil), // 2: nebius.msp.v1alpha1.resource.Template +} +var file_nebius_msp_v1alpha1_resource_template_service_proto_depIdxs = []int32{ + 2, // 0: nebius.msp.v1alpha1.resource.ListTemplatesResponse.items:type_name -> nebius.msp.v1alpha1.resource.Template + 0, // 1: nebius.msp.v1alpha1.resource.TemplateService.List:input_type -> nebius.msp.v1alpha1.resource.ListTemplatesRequest + 1, // 2: nebius.msp.v1alpha1.resource.TemplateService.List:output_type -> nebius.msp.v1alpha1.resource.ListTemplatesResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_msp_v1alpha1_resource_template_service_proto_init() } +func file_nebius_msp_v1alpha1_resource_template_service_proto_init() { + if File_nebius_msp_v1alpha1_resource_template_service_proto != nil { + return + } + file_nebius_msp_v1alpha1_resource_template_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ListTemplatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListTemplatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_msp_v1alpha1_resource_template_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_msp_v1alpha1_resource_template_service_proto_goTypes, + DependencyIndexes: file_nebius_msp_v1alpha1_resource_template_service_proto_depIdxs, + MessageInfos: file_nebius_msp_v1alpha1_resource_template_service_proto_msgTypes, + }.Build() + File_nebius_msp_v1alpha1_resource_template_service_proto = out.File + file_nebius_msp_v1alpha1_resource_template_service_proto_rawDesc = nil + file_nebius_msp_v1alpha1_resource_template_service_proto_goTypes = nil + file_nebius_msp_v1alpha1_resource_template_service_proto_depIdxs = nil +} diff --git a/proto/nebius/msp/v1alpha1/resource/template_service.sensitive.pb.go b/proto/nebius/msp/v1alpha1/resource/template_service.sensitive.pb.go new file mode 100644 index 0000000..9c5afef --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/template_service.sensitive.pb.go @@ -0,0 +1,9 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package resource + +// func (x *ListTemplatesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListTemplatesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListTemplatesResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListTemplatesResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/msp/v1alpha1/resource/template_service_grpc.pb.go b/proto/nebius/msp/v1alpha1/resource/template_service_grpc.pb.go new file mode 100644 index 0000000..f5f97de --- /dev/null +++ b/proto/nebius/msp/v1alpha1/resource/template_service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/msp/v1alpha1/resource/template_service.proto + +package resource + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TemplateService_List_FullMethodName = "/nebius.msp.v1alpha1.resource.TemplateService/List" +) + +// TemplateServiceClient is the client API for TemplateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TemplateServiceClient interface { + List(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) +} + +type templateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTemplateServiceClient(cc grpc.ClientConnInterface) TemplateServiceClient { + return &templateServiceClient{cc} +} + +func (c *templateServiceClient) List(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) { + out := new(ListTemplatesResponse) + err := c.cc.Invoke(ctx, TemplateService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TemplateServiceServer is the server API for TemplateService service. +// All implementations should embed UnimplementedTemplateServiceServer +// for forward compatibility +type TemplateServiceServer interface { + List(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) +} + +// UnimplementedTemplateServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTemplateServiceServer struct { +} + +func (UnimplementedTemplateServiceServer) List(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeTemplateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TemplateServiceServer will +// result in compilation errors. +type UnsafeTemplateServiceServer interface { + mustEmbedUnimplementedTemplateServiceServer() +} + +func RegisterTemplateServiceServer(s grpc.ServiceRegistrar, srv TemplateServiceServer) { + s.RegisterService(&TemplateService_ServiceDesc, srv) +} + +func _TemplateService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTemplatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TemplateServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TemplateService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TemplateServiceServer).List(ctx, req.(*ListTemplatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TemplateService_ServiceDesc is the grpc.ServiceDesc for TemplateService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TemplateService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.msp.v1alpha1.resource.TemplateService", + HandlerType: (*TemplateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _TemplateService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/msp/v1alpha1/resource/template_service.proto", +} diff --git a/proto/nebius/registry/v1/artifact.pb.go b/proto/nebius/registry/v1/artifact.pb.go new file mode 100644 index 0000000..bfff695 --- /dev/null +++ b/proto/nebius/registry/v1/artifact.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/registry/v1/artifact.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Artifact_Status int32 + +const ( + Artifact_STATUS_UNSPECIFIED Artifact_Status = 0 + Artifact_ACTIVE Artifact_Status = 1 + Artifact_DELETING Artifact_Status = 2 +) + +// Enum value maps for Artifact_Status. +var ( + Artifact_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "ACTIVE", + 2: "DELETING", + } + Artifact_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "DELETING": 2, + } +) + +func (x Artifact_Status) Enum() *Artifact_Status { + p := new(Artifact_Status) + *p = x + return p +} + +func (x Artifact_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Artifact_Status) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_registry_v1_artifact_proto_enumTypes[0].Descriptor() +} + +func (Artifact_Status) Type() protoreflect.EnumType { + return &file_nebius_registry_v1_artifact_proto_enumTypes[0] +} + +func (x Artifact_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Artifact_Status.Descriptor instead. +func (Artifact_Status) EnumDescriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_proto_rawDescGZIP(), []int{0, 0} +} + +type Artifact_Type int32 + +const ( + Artifact_BLOB Artifact_Type = 0 + Artifact_MANIFEST Artifact_Type = 1 + Artifact_DEB_PACKAGE Artifact_Type = 2 + Artifact_MANIFEST_LIST Artifact_Type = 3 + Artifact_RELEASE_INDEX Artifact_Type = 4 + Artifact_PACKAGE_INDEX Artifact_Type = 5 + Artifact_GZIPPED_PACKAGE_INDEX Artifact_Type = 6 +) + +// Enum value maps for Artifact_Type. +var ( + Artifact_Type_name = map[int32]string{ + 0: "BLOB", + 1: "MANIFEST", + 2: "DEB_PACKAGE", + 3: "MANIFEST_LIST", + 4: "RELEASE_INDEX", + 5: "PACKAGE_INDEX", + 6: "GZIPPED_PACKAGE_INDEX", + } + Artifact_Type_value = map[string]int32{ + "BLOB": 0, + "MANIFEST": 1, + "DEB_PACKAGE": 2, + "MANIFEST_LIST": 3, + "RELEASE_INDEX": 4, + "PACKAGE_INDEX": 5, + "GZIPPED_PACKAGE_INDEX": 6, + } +) + +func (x Artifact_Type) Enum() *Artifact_Type { + p := new(Artifact_Type) + *p = x + return p +} + +func (x Artifact_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Artifact_Type) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_registry_v1_artifact_proto_enumTypes[1].Descriptor() +} + +func (Artifact_Type) Type() protoreflect.EnumType { + return &file_nebius_registry_v1_artifact_proto_enumTypes[1] +} + +func (x Artifact_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Artifact_Type.Descriptor instead. +func (Artifact_Type) EnumDescriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_proto_rawDescGZIP(), []int{0, 1} +} + +type Artifact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` + Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` + Status Artifact_Status `protobuf:"varint,6,opt,name=status,proto3,enum=nebius.registry.v1.Artifact_Status" json:"status,omitempty"` + Type Artifact_Type `protobuf:"varint,7,opt,name=type,proto3,enum=nebius.registry.v1.Artifact_Type" json:"type,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Artifact) Reset() { + *x = Artifact{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Artifact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Artifact) ProtoMessage() {} + +func (x *Artifact) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_artifact_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Artifact.ProtoReflect.Descriptor instead. +func (*Artifact) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_proto_rawDescGZIP(), []int{0} +} + +func (x *Artifact) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Artifact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Artifact) GetMediaType() string { + if x != nil { + return x.MediaType + } + return "" +} + +func (x *Artifact) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +func (x *Artifact) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *Artifact) GetStatus() Artifact_Status { + if x != nil { + return x.Status + } + return Artifact_STATUS_UNSPECIFIED +} + +func (x *Artifact) GetType() Artifact_Type { + if x != nil { + return x.Type + } + return Artifact_BLOB +} + +func (x *Artifact) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Artifact) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +var File_nebius_registry_v1_artifact_proto protoreflect.FileDescriptor + +var file_nebius_registry_v1_artifact_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x04, 0x0a, 0x08, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x3a, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x83, 0x01, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x4d, 0x41, 0x4e, 0x49, 0x46, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, + 0x45, 0x42, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, + 0x4d, 0x41, 0x4e, 0x49, 0x46, 0x45, 0x53, 0x54, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x03, 0x12, + 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, + 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x4e, + 0x44, 0x45, 0x58, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x5a, 0x49, 0x50, 0x50, 0x45, 0x44, + 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x10, 0x06, + 0x42, 0x5e, 0x0a, 0x19, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_registry_v1_artifact_proto_rawDescOnce sync.Once + file_nebius_registry_v1_artifact_proto_rawDescData = file_nebius_registry_v1_artifact_proto_rawDesc +) + +func file_nebius_registry_v1_artifact_proto_rawDescGZIP() []byte { + file_nebius_registry_v1_artifact_proto_rawDescOnce.Do(func() { + file_nebius_registry_v1_artifact_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_registry_v1_artifact_proto_rawDescData) + }) + return file_nebius_registry_v1_artifact_proto_rawDescData +} + +var file_nebius_registry_v1_artifact_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_registry_v1_artifact_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_nebius_registry_v1_artifact_proto_goTypes = []any{ + (Artifact_Status)(0), // 0: nebius.registry.v1.Artifact.Status + (Artifact_Type)(0), // 1: nebius.registry.v1.Artifact.Type + (*Artifact)(nil), // 2: nebius.registry.v1.Artifact + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_nebius_registry_v1_artifact_proto_depIdxs = []int32{ + 0, // 0: nebius.registry.v1.Artifact.status:type_name -> nebius.registry.v1.Artifact.Status + 1, // 1: nebius.registry.v1.Artifact.type:type_name -> nebius.registry.v1.Artifact.Type + 3, // 2: nebius.registry.v1.Artifact.created_at:type_name -> google.protobuf.Timestamp + 3, // 3: nebius.registry.v1.Artifact.updated_at:type_name -> google.protobuf.Timestamp + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_registry_v1_artifact_proto_init() } +func file_nebius_registry_v1_artifact_proto_init() { + if File_nebius_registry_v1_artifact_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_registry_v1_artifact_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Artifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_registry_v1_artifact_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_registry_v1_artifact_proto_goTypes, + DependencyIndexes: file_nebius_registry_v1_artifact_proto_depIdxs, + EnumInfos: file_nebius_registry_v1_artifact_proto_enumTypes, + MessageInfos: file_nebius_registry_v1_artifact_proto_msgTypes, + }.Build() + File_nebius_registry_v1_artifact_proto = out.File + file_nebius_registry_v1_artifact_proto_rawDesc = nil + file_nebius_registry_v1_artifact_proto_goTypes = nil + file_nebius_registry_v1_artifact_proto_depIdxs = nil +} diff --git a/proto/nebius/registry/v1/artifact.sensitive.pb.go b/proto/nebius/registry/v1/artifact.sensitive.pb.go new file mode 100644 index 0000000..097d880 --- /dev/null +++ b/proto/nebius/registry/v1/artifact.sensitive.pb.go @@ -0,0 +1,6 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Artifact) Sanitize() // is not generated as no sensitive fields found +// func (x *Artifact) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/registry/v1/artifact_service.pb.go b/proto/nebius/registry/v1/artifact_service.pb.go new file mode 100644 index 0000000..e1cd57b --- /dev/null +++ b/proto/nebius/registry/v1/artifact_service.pb.go @@ -0,0 +1,416 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/registry/v1/artifact_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetArtifactRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetArtifactRequest) Reset() { + *x = GetArtifactRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetArtifactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetArtifactRequest) ProtoMessage() {} + +func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetArtifactRequest.ProtoReflect.Descriptor instead. +func (*GetArtifactRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetArtifactRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListArtifactsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListArtifactsRequest) Reset() { + *x = ListArtifactsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListArtifactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListArtifactsRequest) ProtoMessage() {} + +func (x *ListArtifactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListArtifactsRequest.ProtoReflect.Descriptor instead. +func (*ListArtifactsRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListArtifactsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListArtifactsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListArtifactsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListArtifactsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListArtifactsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Artifact `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListArtifactsResponse) Reset() { + *x = ListArtifactsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListArtifactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListArtifactsResponse) ProtoMessage() {} + +func (x *ListArtifactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListArtifactsResponse.ProtoReflect.Descriptor instead. +func (*ListArtifactsResponse) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListArtifactsResponse) GetItems() []*Artifact { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListArtifactsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteArtifactRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteArtifactRequest) Reset() { + *x = DeleteArtifactRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteArtifactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteArtifactRequest) ProtoMessage() {} + +func (x *DeleteArtifactRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_artifact_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteArtifactRequest.ProtoReflect.Descriptor instead. +func (*DeleteArtifactRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_artifact_service_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteArtifactRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_registry_v1_artifact_service_proto protoreflect.FileDescriptor + +var file_nebius_registry_v1_artifact_service_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x87, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x73, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2f, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, + 0x8d, 0x02, 0x0a, 0x0f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x12, 0x5b, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x65, 0x0a, 0x19, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_registry_v1_artifact_service_proto_rawDescOnce sync.Once + file_nebius_registry_v1_artifact_service_proto_rawDescData = file_nebius_registry_v1_artifact_service_proto_rawDesc +) + +func file_nebius_registry_v1_artifact_service_proto_rawDescGZIP() []byte { + file_nebius_registry_v1_artifact_service_proto_rawDescOnce.Do(func() { + file_nebius_registry_v1_artifact_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_registry_v1_artifact_service_proto_rawDescData) + }) + return file_nebius_registry_v1_artifact_service_proto_rawDescData +} + +var file_nebius_registry_v1_artifact_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_registry_v1_artifact_service_proto_goTypes = []any{ + (*GetArtifactRequest)(nil), // 0: nebius.registry.v1.GetArtifactRequest + (*ListArtifactsRequest)(nil), // 1: nebius.registry.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 2: nebius.registry.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 3: nebius.registry.v1.DeleteArtifactRequest + (*Artifact)(nil), // 4: nebius.registry.v1.Artifact + (*v1.Operation)(nil), // 5: nebius.common.v1.Operation +} +var file_nebius_registry_v1_artifact_service_proto_depIdxs = []int32{ + 4, // 0: nebius.registry.v1.ListArtifactsResponse.items:type_name -> nebius.registry.v1.Artifact + 0, // 1: nebius.registry.v1.ArtifactService.Get:input_type -> nebius.registry.v1.GetArtifactRequest + 1, // 2: nebius.registry.v1.ArtifactService.List:input_type -> nebius.registry.v1.ListArtifactsRequest + 3, // 3: nebius.registry.v1.ArtifactService.Delete:input_type -> nebius.registry.v1.DeleteArtifactRequest + 4, // 4: nebius.registry.v1.ArtifactService.Get:output_type -> nebius.registry.v1.Artifact + 2, // 5: nebius.registry.v1.ArtifactService.List:output_type -> nebius.registry.v1.ListArtifactsResponse + 5, // 6: nebius.registry.v1.ArtifactService.Delete:output_type -> nebius.common.v1.Operation + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_registry_v1_artifact_service_proto_init() } +func file_nebius_registry_v1_artifact_service_proto_init() { + if File_nebius_registry_v1_artifact_service_proto != nil { + return + } + file_nebius_registry_v1_artifact_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_registry_v1_artifact_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetArtifactRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_artifact_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListArtifactsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_artifact_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListArtifactsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_artifact_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DeleteArtifactRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_registry_v1_artifact_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_registry_v1_artifact_service_proto_goTypes, + DependencyIndexes: file_nebius_registry_v1_artifact_service_proto_depIdxs, + MessageInfos: file_nebius_registry_v1_artifact_service_proto_msgTypes, + }.Build() + File_nebius_registry_v1_artifact_service_proto = out.File + file_nebius_registry_v1_artifact_service_proto_rawDesc = nil + file_nebius_registry_v1_artifact_service_proto_goTypes = nil + file_nebius_registry_v1_artifact_service_proto_depIdxs = nil +} diff --git a/proto/nebius/registry/v1/artifact_service.sensitive.pb.go b/proto/nebius/registry/v1/artifact_service.sensitive.pb.go new file mode 100644 index 0000000..5d8ddfa --- /dev/null +++ b/proto/nebius/registry/v1/artifact_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetArtifactRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetArtifactRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListArtifactsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListArtifactsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListArtifactsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListArtifactsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteArtifactRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteArtifactRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/registry/v1/artifact_service_grpc.pb.go b/proto/nebius/registry/v1/artifact_service_grpc.pb.go new file mode 100644 index 0000000..d75ffb5 --- /dev/null +++ b/proto/nebius/registry/v1/artifact_service_grpc.pb.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/registry/v1/artifact_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ArtifactService_Get_FullMethodName = "/nebius.registry.v1.ArtifactService/Get" + ArtifactService_List_FullMethodName = "/nebius.registry.v1.ArtifactService/List" + ArtifactService_Delete_FullMethodName = "/nebius.registry.v1.ArtifactService/Delete" +) + +// ArtifactServiceClient is the client API for ArtifactService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ArtifactServiceClient interface { + Get(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*Artifact, error) + List(ctx context.Context, in *ListArtifactsRequest, opts ...grpc.CallOption) (*ListArtifactsResponse, error) + Delete(ctx context.Context, in *DeleteArtifactRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type artifactServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewArtifactServiceClient(cc grpc.ClientConnInterface) ArtifactServiceClient { + return &artifactServiceClient{cc} +} + +func (c *artifactServiceClient) Get(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*Artifact, error) { + out := new(Artifact) + err := c.cc.Invoke(ctx, ArtifactService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactServiceClient) List(ctx context.Context, in *ListArtifactsRequest, opts ...grpc.CallOption) (*ListArtifactsResponse, error) { + out := new(ListArtifactsResponse) + err := c.cc.Invoke(ctx, ArtifactService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactServiceClient) Delete(ctx context.Context, in *DeleteArtifactRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, ArtifactService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ArtifactServiceServer is the server API for ArtifactService service. +// All implementations should embed UnimplementedArtifactServiceServer +// for forward compatibility +type ArtifactServiceServer interface { + Get(context.Context, *GetArtifactRequest) (*Artifact, error) + List(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) + Delete(context.Context, *DeleteArtifactRequest) (*v1.Operation, error) +} + +// UnimplementedArtifactServiceServer should be embedded to have forward compatible implementations. +type UnimplementedArtifactServiceServer struct { +} + +func (UnimplementedArtifactServiceServer) Get(context.Context, *GetArtifactRequest) (*Artifact, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedArtifactServiceServer) List(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedArtifactServiceServer) Delete(context.Context, *DeleteArtifactRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeArtifactServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ArtifactServiceServer will +// result in compilation errors. +type UnsafeArtifactServiceServer interface { + mustEmbedUnimplementedArtifactServiceServer() +} + +func RegisterArtifactServiceServer(s grpc.ServiceRegistrar, srv ArtifactServiceServer) { + s.RegisterService(&ArtifactService_ServiceDesc, srv) +} + +func _ArtifactService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ArtifactService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactServiceServer).Get(ctx, req.(*GetArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListArtifactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ArtifactService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactServiceServer).List(ctx, req.(*ListArtifactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ArtifactService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactServiceServer).Delete(ctx, req.(*DeleteArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ArtifactService_ServiceDesc is the grpc.ServiceDesc for ArtifactService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ArtifactService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.registry.v1.ArtifactService", + HandlerType: (*ArtifactServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ArtifactService_Get_Handler, + }, + { + MethodName: "List", + Handler: _ArtifactService_List_Handler, + }, + { + MethodName: "Delete", + Handler: _ArtifactService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/registry/v1/artifact_service.proto", +} diff --git a/proto/nebius/registry/v1/registry.pb.go b/proto/nebius/registry/v1/registry.pb.go new file mode 100644 index 0000000..ac68cae --- /dev/null +++ b/proto/nebius/registry/v1/registry.pb.go @@ -0,0 +1,392 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/registry/v1/registry.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegistryStatus_State int32 + +const ( + RegistryStatus_CREATING RegistryStatus_State = 0 + RegistryStatus_ACTIVE RegistryStatus_State = 1 + RegistryStatus_DELETING RegistryStatus_State = 2 + RegistryStatus_SUSPENDED RegistryStatus_State = 3 +) + +// Enum value maps for RegistryStatus_State. +var ( + RegistryStatus_State_name = map[int32]string{ + 0: "CREATING", + 1: "ACTIVE", + 2: "DELETING", + 3: "SUSPENDED", + } + RegistryStatus_State_value = map[string]int32{ + "CREATING": 0, + "ACTIVE": 1, + "DELETING": 2, + "SUSPENDED": 3, + } +) + +func (x RegistryStatus_State) Enum() *RegistryStatus_State { + p := new(RegistryStatus_State) + *p = x + return p +} + +func (x RegistryStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RegistryStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_registry_v1_registry_proto_enumTypes[0].Descriptor() +} + +func (RegistryStatus_State) Type() protoreflect.EnumType { + return &file_nebius_registry_v1_registry_proto_enumTypes[0] +} + +func (x RegistryStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RegistryStatus_State.Descriptor instead. +func (RegistryStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_proto_rawDescGZIP(), []int{2, 0} +} + +type Registry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is metadata about the resource, such as its id, name, labels, etc. + // This contains fields that may be updated both by the end user and the system. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // This is defined by the user and describes the desired state of system. + // Fill this in when creating or updating an object. + Spec *RegistrySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // This is filled in by the server and reports the current state of the system. + Status *RegistryStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Registry) Reset() { + *x = Registry{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Registry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Registry) ProtoMessage() {} + +func (x *Registry) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Registry.ProtoReflect.Descriptor instead. +func (*Registry) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_proto_rawDescGZIP(), []int{0} +} + +func (x *Registry) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Registry) GetSpec() *RegistrySpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Registry) GetStatus() *RegistryStatus { + if x != nil { + return x.Status + } + return nil +} + +type RegistrySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + ImagesCount int32 `protobuf:"varint,2,opt,name=images_count,json=imagesCount,proto3" json:"images_count,omitempty"` // Registry.Type type = 2; +} + +func (x *RegistrySpec) Reset() { + *x = RegistrySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistrySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrySpec) ProtoMessage() {} + +func (x *RegistrySpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrySpec.ProtoReflect.Descriptor instead. +func (*RegistrySpec) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_proto_rawDescGZIP(), []int{1} +} + +func (x *RegistrySpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *RegistrySpec) GetImagesCount() int32 { + if x != nil { + return x.ImagesCount + } + return 0 +} + +type RegistryStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + State RegistryStatus_State `protobuf:"varint,10,opt,name=state,proto3,enum=nebius.registry.v1.RegistryStatus_State" json:"state,omitempty"` +} + +func (x *RegistryStatus) Reset() { + *x = RegistryStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistryStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistryStatus) ProtoMessage() {} + +func (x *RegistryStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistryStatus.ProtoReflect.Descriptor instead. +func (*RegistryStatus) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_proto_rawDescGZIP(), []int{2} +} + +func (x *RegistryStatus) GetState() RegistryStatus_State { + if x != nil { + return x.State + } + return RegistryStatus_CREATING +} + +var File_nebius_registry_v1_registry_proto protoreflect.FileDescriptor + +var file_nebius_registry_v1_registry_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xd2, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x05, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x90, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, + 0x10, 0x03, 0x42, 0x5e, 0x0a, 0x19, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x70, 0x75, 0x62, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, + 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_registry_v1_registry_proto_rawDescOnce sync.Once + file_nebius_registry_v1_registry_proto_rawDescData = file_nebius_registry_v1_registry_proto_rawDesc +) + +func file_nebius_registry_v1_registry_proto_rawDescGZIP() []byte { + file_nebius_registry_v1_registry_proto_rawDescOnce.Do(func() { + file_nebius_registry_v1_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_registry_v1_registry_proto_rawDescData) + }) + return file_nebius_registry_v1_registry_proto_rawDescData +} + +var file_nebius_registry_v1_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_registry_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_registry_v1_registry_proto_goTypes = []any{ + (RegistryStatus_State)(0), // 0: nebius.registry.v1.RegistryStatus.State + (*Registry)(nil), // 1: nebius.registry.v1.Registry + (*RegistrySpec)(nil), // 2: nebius.registry.v1.RegistrySpec + (*RegistryStatus)(nil), // 3: nebius.registry.v1.RegistryStatus + (*v1.ResourceMetadata)(nil), // 4: nebius.common.v1.ResourceMetadata +} +var file_nebius_registry_v1_registry_proto_depIdxs = []int32{ + 4, // 0: nebius.registry.v1.Registry.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.registry.v1.Registry.spec:type_name -> nebius.registry.v1.RegistrySpec + 3, // 2: nebius.registry.v1.Registry.status:type_name -> nebius.registry.v1.RegistryStatus + 0, // 3: nebius.registry.v1.RegistryStatus.state:type_name -> nebius.registry.v1.RegistryStatus.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_registry_v1_registry_proto_init() } +func file_nebius_registry_v1_registry_proto_init() { + if File_nebius_registry_v1_registry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_registry_v1_registry_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Registry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RegistrySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*RegistryStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_registry_v1_registry_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_registry_v1_registry_proto_goTypes, + DependencyIndexes: file_nebius_registry_v1_registry_proto_depIdxs, + EnumInfos: file_nebius_registry_v1_registry_proto_enumTypes, + MessageInfos: file_nebius_registry_v1_registry_proto_msgTypes, + }.Build() + File_nebius_registry_v1_registry_proto = out.File + file_nebius_registry_v1_registry_proto_rawDesc = nil + file_nebius_registry_v1_registry_proto_goTypes = nil + file_nebius_registry_v1_registry_proto_depIdxs = nil +} diff --git a/proto/nebius/registry/v1/registry.sensitive.pb.go b/proto/nebius/registry/v1/registry.sensitive.pb.go new file mode 100644 index 0000000..fcae586 --- /dev/null +++ b/proto/nebius/registry/v1/registry.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Registry) Sanitize() // is not generated as no sensitive fields found +// func (x *Registry) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *RegistrySpec) Sanitize() // is not generated as no sensitive fields found +// func (x *RegistrySpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *RegistryStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *RegistryStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/registry/v1/registry_service.pb.go b/proto/nebius/registry/v1/registry_service.pb.go new file mode 100644 index 0000000..44abf6d --- /dev/null +++ b/proto/nebius/registry/v1/registry_service.pb.go @@ -0,0 +1,593 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/registry/v1/registry_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetRegistryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetRegistryRequest) Reset() { + *x = GetRegistryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRegistryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRegistryRequest) ProtoMessage() {} + +func (x *GetRegistryRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRegistryRequest.ProtoReflect.Descriptor instead. +func (*GetRegistryRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetRegistryRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListRegistriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListRegistriesRequest) Reset() { + *x = ListRegistriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRegistriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRegistriesRequest) ProtoMessage() {} + +func (x *ListRegistriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRegistriesRequest.ProtoReflect.Descriptor instead. +func (*ListRegistriesRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListRegistriesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListRegistriesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRegistriesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRegistriesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListRegistriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Registry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListRegistriesResponse) Reset() { + *x = ListRegistriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRegistriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRegistriesResponse) ProtoMessage() {} + +func (x *ListRegistriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRegistriesResponse.ProtoReflect.Descriptor instead. +func (*ListRegistriesResponse) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListRegistriesResponse) GetItems() []*Registry { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListRegistriesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateRegistryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *RegistrySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateRegistryRequest) Reset() { + *x = CreateRegistryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRegistryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRegistryRequest) ProtoMessage() {} + +func (x *CreateRegistryRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRegistryRequest.ProtoReflect.Descriptor instead. +func (*CreateRegistryRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateRegistryRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateRegistryRequest) GetSpec() *RegistrySpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateRegistryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *RegistrySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateRegistryRequest) Reset() { + *x = UpdateRegistryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateRegistryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRegistryRequest) ProtoMessage() {} + +func (x *UpdateRegistryRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRegistryRequest.ProtoReflect.Descriptor instead. +func (*UpdateRegistryRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateRegistryRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateRegistryRequest) GetSpec() *RegistrySpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteRegistryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteRegistryRequest) Reset() { + *x = DeleteRegistryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRegistryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRegistryRequest) ProtoMessage() {} + +func (x *DeleteRegistryRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_registry_v1_registry_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRegistryRequest.ProtoReflect.Descriptor instead. +func (*DeleteRegistryRequest) Descriptor() ([]byte, []int) { + return file_nebius_registry_v1_registry_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteRegistryRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_registry_v1_registry_service_proto protoreflect.FileDescriptor + +var file_nebius_registry_v1_registry_service_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x88, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x74, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x32, 0xb3, 0x03, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x26, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x12, 0x5d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x29, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x0a, 0x19, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_registry_v1_registry_service_proto_rawDescOnce sync.Once + file_nebius_registry_v1_registry_service_proto_rawDescData = file_nebius_registry_v1_registry_service_proto_rawDesc +) + +func file_nebius_registry_v1_registry_service_proto_rawDescGZIP() []byte { + file_nebius_registry_v1_registry_service_proto_rawDescOnce.Do(func() { + file_nebius_registry_v1_registry_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_registry_v1_registry_service_proto_rawDescData) + }) + return file_nebius_registry_v1_registry_service_proto_rawDescData +} + +var file_nebius_registry_v1_registry_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_registry_v1_registry_service_proto_goTypes = []any{ + (*GetRegistryRequest)(nil), // 0: nebius.registry.v1.GetRegistryRequest + (*ListRegistriesRequest)(nil), // 1: nebius.registry.v1.ListRegistriesRequest + (*ListRegistriesResponse)(nil), // 2: nebius.registry.v1.ListRegistriesResponse + (*CreateRegistryRequest)(nil), // 3: nebius.registry.v1.CreateRegistryRequest + (*UpdateRegistryRequest)(nil), // 4: nebius.registry.v1.UpdateRegistryRequest + (*DeleteRegistryRequest)(nil), // 5: nebius.registry.v1.DeleteRegistryRequest + (*Registry)(nil), // 6: nebius.registry.v1.Registry + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (*RegistrySpec)(nil), // 8: nebius.registry.v1.RegistrySpec + (*v1.Operation)(nil), // 9: nebius.common.v1.Operation +} +var file_nebius_registry_v1_registry_service_proto_depIdxs = []int32{ + 6, // 0: nebius.registry.v1.ListRegistriesResponse.items:type_name -> nebius.registry.v1.Registry + 7, // 1: nebius.registry.v1.CreateRegistryRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 2: nebius.registry.v1.CreateRegistryRequest.spec:type_name -> nebius.registry.v1.RegistrySpec + 7, // 3: nebius.registry.v1.UpdateRegistryRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 8, // 4: nebius.registry.v1.UpdateRegistryRequest.spec:type_name -> nebius.registry.v1.RegistrySpec + 0, // 5: nebius.registry.v1.RegistryService.Get:input_type -> nebius.registry.v1.GetRegistryRequest + 1, // 6: nebius.registry.v1.RegistryService.List:input_type -> nebius.registry.v1.ListRegistriesRequest + 3, // 7: nebius.registry.v1.RegistryService.Create:input_type -> nebius.registry.v1.CreateRegistryRequest + 4, // 8: nebius.registry.v1.RegistryService.Update:input_type -> nebius.registry.v1.UpdateRegistryRequest + 5, // 9: nebius.registry.v1.RegistryService.Delete:input_type -> nebius.registry.v1.DeleteRegistryRequest + 6, // 10: nebius.registry.v1.RegistryService.Get:output_type -> nebius.registry.v1.Registry + 2, // 11: nebius.registry.v1.RegistryService.List:output_type -> nebius.registry.v1.ListRegistriesResponse + 9, // 12: nebius.registry.v1.RegistryService.Create:output_type -> nebius.common.v1.Operation + 9, // 13: nebius.registry.v1.RegistryService.Update:output_type -> nebius.common.v1.Operation + 9, // 14: nebius.registry.v1.RegistryService.Delete:output_type -> nebius.common.v1.Operation + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_registry_v1_registry_service_proto_init() } +func file_nebius_registry_v1_registry_service_proto_init() { + if File_nebius_registry_v1_registry_service_proto != nil { + return + } + file_nebius_registry_v1_registry_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_registry_v1_registry_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetRegistryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CreateRegistryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRegistryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_registry_v1_registry_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRegistryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_registry_v1_registry_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_registry_v1_registry_service_proto_goTypes, + DependencyIndexes: file_nebius_registry_v1_registry_service_proto_depIdxs, + MessageInfos: file_nebius_registry_v1_registry_service_proto_msgTypes, + }.Build() + File_nebius_registry_v1_registry_service_proto = out.File + file_nebius_registry_v1_registry_service_proto_rawDesc = nil + file_nebius_registry_v1_registry_service_proto_goTypes = nil + file_nebius_registry_v1_registry_service_proto_depIdxs = nil +} diff --git a/proto/nebius/registry/v1/registry_service.sensitive.pb.go b/proto/nebius/registry/v1/registry_service.sensitive.pb.go new file mode 100644 index 0000000..9ee1c77 --- /dev/null +++ b/proto/nebius/registry/v1/registry_service.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetRegistryRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetRegistryRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListRegistriesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListRegistriesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListRegistriesResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListRegistriesResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateRegistryRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateRegistryRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateRegistryRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateRegistryRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteRegistryRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteRegistryRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/registry/v1/registry_service_grpc.pb.go b/proto/nebius/registry/v1/registry_service_grpc.pb.go new file mode 100644 index 0000000..6b21ff4 --- /dev/null +++ b/proto/nebius/registry/v1/registry_service_grpc.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/registry/v1/registry_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + RegistryService_Get_FullMethodName = "/nebius.registry.v1.RegistryService/Get" + RegistryService_List_FullMethodName = "/nebius.registry.v1.RegistryService/List" + RegistryService_Create_FullMethodName = "/nebius.registry.v1.RegistryService/Create" + RegistryService_Update_FullMethodName = "/nebius.registry.v1.RegistryService/Update" + RegistryService_Delete_FullMethodName = "/nebius.registry.v1.RegistryService/Delete" +) + +// RegistryServiceClient is the client API for RegistryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RegistryServiceClient interface { + Get(ctx context.Context, in *GetRegistryRequest, opts ...grpc.CallOption) (*Registry, error) + List(ctx context.Context, in *ListRegistriesRequest, opts ...grpc.CallOption) (*ListRegistriesResponse, error) + Create(ctx context.Context, in *CreateRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type registryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRegistryServiceClient(cc grpc.ClientConnInterface) RegistryServiceClient { + return ®istryServiceClient{cc} +} + +func (c *registryServiceClient) Get(ctx context.Context, in *GetRegistryRequest, opts ...grpc.CallOption) (*Registry, error) { + out := new(Registry) + err := c.cc.Invoke(ctx, RegistryService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registryServiceClient) List(ctx context.Context, in *ListRegistriesRequest, opts ...grpc.CallOption) (*ListRegistriesResponse, error) { + out := new(ListRegistriesResponse) + err := c.cc.Invoke(ctx, RegistryService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registryServiceClient) Create(ctx context.Context, in *CreateRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, RegistryService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registryServiceClient) Update(ctx context.Context, in *UpdateRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, RegistryService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *registryServiceClient) Delete(ctx context.Context, in *DeleteRegistryRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, RegistryService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RegistryServiceServer is the server API for RegistryService service. +// All implementations should embed UnimplementedRegistryServiceServer +// for forward compatibility +type RegistryServiceServer interface { + Get(context.Context, *GetRegistryRequest) (*Registry, error) + List(context.Context, *ListRegistriesRequest) (*ListRegistriesResponse, error) + Create(context.Context, *CreateRegistryRequest) (*v1.Operation, error) + Update(context.Context, *UpdateRegistryRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteRegistryRequest) (*v1.Operation, error) +} + +// UnimplementedRegistryServiceServer should be embedded to have forward compatible implementations. +type UnimplementedRegistryServiceServer struct { +} + +func (UnimplementedRegistryServiceServer) Get(context.Context, *GetRegistryRequest) (*Registry, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedRegistryServiceServer) List(context.Context, *ListRegistriesRequest) (*ListRegistriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedRegistryServiceServer) Create(context.Context, *CreateRegistryRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedRegistryServiceServer) Update(context.Context, *UpdateRegistryRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedRegistryServiceServer) Delete(context.Context, *DeleteRegistryRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeRegistryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RegistryServiceServer will +// result in compilation errors. +type UnsafeRegistryServiceServer interface { + mustEmbedUnimplementedRegistryServiceServer() +} + +func RegisterRegistryServiceServer(s grpc.ServiceRegistrar, srv RegistryServiceServer) { + s.RegisterService(&RegistryService_ServiceDesc, srv) +} + +func _RegistryService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRegistryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistryServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistryService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistryServiceServer).Get(ctx, req.(*GetRegistryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RegistryService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRegistriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistryServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistryService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistryServiceServer).List(ctx, req.(*ListRegistriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RegistryService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRegistryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistryServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistryService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistryServiceServer).Create(ctx, req.(*CreateRegistryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RegistryService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRegistryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistryServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistryService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistryServiceServer).Update(ctx, req.(*UpdateRegistryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RegistryService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRegistryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RegistryServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RegistryService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistryServiceServer).Delete(ctx, req.(*DeleteRegistryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RegistryService_ServiceDesc is the grpc.ServiceDesc for RegistryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RegistryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.registry.v1.RegistryService", + HandlerType: (*RegistryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _RegistryService_Get_Handler, + }, + { + MethodName: "List", + Handler: _RegistryService_List_Handler, + }, + { + MethodName: "Create", + Handler: _RegistryService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _RegistryService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _RegistryService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/registry/v1/registry_service.proto", +} diff --git a/proto/nebius/storage/v1/base.pb.go b/proto/nebius/storage/v1/base.pb.go new file mode 100644 index 0000000..fcbb4eb --- /dev/null +++ b/proto/nebius/storage/v1/base.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/storage/v1/base.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StorageClass int32 + +const ( + StorageClass_STORAGE_CLASS_UNSPECIFIED StorageClass = 0 + StorageClass_STANDARD StorageClass = 1 +) + +// Enum value maps for StorageClass. +var ( + StorageClass_name = map[int32]string{ + 0: "STORAGE_CLASS_UNSPECIFIED", + 1: "STANDARD", + } + StorageClass_value = map[string]int32{ + "STORAGE_CLASS_UNSPECIFIED": 0, + "STANDARD": 1, + } +) + +func (x StorageClass) Enum() *StorageClass { + p := new(StorageClass) + *p = x + return p +} + +func (x StorageClass) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageClass) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_storage_v1_base_proto_enumTypes[0].Descriptor() +} + +func (StorageClass) Type() protoreflect.EnumType { + return &file_nebius_storage_v1_base_proto_enumTypes[0] +} + +func (x StorageClass) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StorageClass.Descriptor instead. +func (StorageClass) EnumDescriptor() ([]byte, []int) { + return file_nebius_storage_v1_base_proto_rawDescGZIP(), []int{0} +} + +type VersioningPolicy int32 + +const ( + VersioningPolicy_VERSIONING_POLICY_UNSPECIFIED VersioningPolicy = 0 + VersioningPolicy_DISABLED VersioningPolicy = 1 + VersioningPolicy_ENABLED VersioningPolicy = 2 + VersioningPolicy_SUSPENDED VersioningPolicy = 3 +) + +// Enum value maps for VersioningPolicy. +var ( + VersioningPolicy_name = map[int32]string{ + 0: "VERSIONING_POLICY_UNSPECIFIED", + 1: "DISABLED", + 2: "ENABLED", + 3: "SUSPENDED", + } + VersioningPolicy_value = map[string]int32{ + "VERSIONING_POLICY_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2, + "SUSPENDED": 3, + } +) + +func (x VersioningPolicy) Enum() *VersioningPolicy { + p := new(VersioningPolicy) + *p = x + return p +} + +func (x VersioningPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VersioningPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_storage_v1_base_proto_enumTypes[1].Descriptor() +} + +func (VersioningPolicy) Type() protoreflect.EnumType { + return &file_nebius_storage_v1_base_proto_enumTypes[1] +} + +func (x VersioningPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VersioningPolicy.Descriptor instead. +func (VersioningPolicy) EnumDescriptor() ([]byte, []int) { + return file_nebius_storage_v1_base_proto_rawDescGZIP(), []int{1} +} + +var File_nebius_storage_v1_base_proto protoreflect.FileDescriptor + +var file_nebius_storage_v1_base_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2a, 0x3b, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, + 0x53, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x2a, 0x5f, + 0x0a, 0x10, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x03, 0x42, + 0x58, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x42, 0x61, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_storage_v1_base_proto_rawDescOnce sync.Once + file_nebius_storage_v1_base_proto_rawDescData = file_nebius_storage_v1_base_proto_rawDesc +) + +func file_nebius_storage_v1_base_proto_rawDescGZIP() []byte { + file_nebius_storage_v1_base_proto_rawDescOnce.Do(func() { + file_nebius_storage_v1_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_storage_v1_base_proto_rawDescData) + }) + return file_nebius_storage_v1_base_proto_rawDescData +} + +var file_nebius_storage_v1_base_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_storage_v1_base_proto_goTypes = []any{ + (StorageClass)(0), // 0: nebius.storage.v1.StorageClass + (VersioningPolicy)(0), // 1: nebius.storage.v1.VersioningPolicy +} +var file_nebius_storage_v1_base_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_nebius_storage_v1_base_proto_init() } +func file_nebius_storage_v1_base_proto_init() { + if File_nebius_storage_v1_base_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_storage_v1_base_proto_rawDesc, + NumEnums: 2, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_storage_v1_base_proto_goTypes, + DependencyIndexes: file_nebius_storage_v1_base_proto_depIdxs, + EnumInfos: file_nebius_storage_v1_base_proto_enumTypes, + }.Build() + File_nebius_storage_v1_base_proto = out.File + file_nebius_storage_v1_base_proto_rawDesc = nil + file_nebius_storage_v1_base_proto_goTypes = nil + file_nebius_storage_v1_base_proto_depIdxs = nil +} diff --git a/proto/nebius/storage/v1/base.sensitive.pb.go b/proto/nebius/storage/v1/base.sensitive.pb.go new file mode 100644 index 0000000..79ffd73 --- /dev/null +++ b/proto/nebius/storage/v1/base.sensitive.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 diff --git a/proto/nebius/storage/v1/bucket.pb.go b/proto/nebius/storage/v1/bucket.pb.go new file mode 100644 index 0000000..2cd41bc --- /dev/null +++ b/proto/nebius/storage/v1/bucket.pb.go @@ -0,0 +1,553 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/storage/v1/bucket.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BucketStatus_State int32 + +const ( + BucketStatus_STATE_UNSPECIFIED BucketStatus_State = 0 + // Bucket is under creation and cannot be used yet. + BucketStatus_CREATING BucketStatus_State = 1 + // Bucket is active and ready for usage. + BucketStatus_ACTIVE BucketStatus_State = 2 + // Bucket is being updated. + // It can be used, but some settings are being modified and you can observe their inconsistency. + BucketStatus_UPDATING BucketStatus_State = 3 + // Bucket is scheduled for deletion. + // It cannot be used in s3 api anymore. + BucketStatus_SCHEDULED_FOR_DELETION BucketStatus_State = 4 +) + +// Enum value maps for BucketStatus_State. +var ( + BucketStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "ACTIVE", + 3: "UPDATING", + 4: "SCHEDULED_FOR_DELETION", + } + BucketStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "SCHEDULED_FOR_DELETION": 4, + } +) + +func (x BucketStatus_State) Enum() *BucketStatus_State { + p := new(BucketStatus_State) + *p = x + return p +} + +func (x BucketStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BucketStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_storage_v1_bucket_proto_enumTypes[0].Descriptor() +} + +func (BucketStatus_State) Type() protoreflect.EnumType { + return &file_nebius_storage_v1_bucket_proto_enumTypes[0] +} + +func (x BucketStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BucketStatus_State.Descriptor instead. +func (BucketStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_proto_rawDescGZIP(), []int{2, 0} +} + +type BucketStatus_SuspensionState int32 + +const ( + BucketStatus_SUSPENSION_STATE_UNSPECIFIED BucketStatus_SuspensionState = 0 + BucketStatus_NOT_SUSPENDED BucketStatus_SuspensionState = 1 + BucketStatus_SUSPENDED BucketStatus_SuspensionState = 2 +) + +// Enum value maps for BucketStatus_SuspensionState. +var ( + BucketStatus_SuspensionState_name = map[int32]string{ + 0: "SUSPENSION_STATE_UNSPECIFIED", + 1: "NOT_SUSPENDED", + 2: "SUSPENDED", + } + BucketStatus_SuspensionState_value = map[string]int32{ + "SUSPENSION_STATE_UNSPECIFIED": 0, + "NOT_SUSPENDED": 1, + "SUSPENDED": 2, + } +) + +func (x BucketStatus_SuspensionState) Enum() *BucketStatus_SuspensionState { + p := new(BucketStatus_SuspensionState) + *p = x + return p +} + +func (x BucketStatus_SuspensionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BucketStatus_SuspensionState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_storage_v1_bucket_proto_enumTypes[1].Descriptor() +} + +func (BucketStatus_SuspensionState) Type() protoreflect.EnumType { + return &file_nebius_storage_v1_bucket_proto_enumTypes[1] +} + +func (x BucketStatus_SuspensionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BucketStatus_SuspensionState.Descriptor instead. +func (BucketStatus_SuspensionState) EnumDescriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_proto_rawDescGZIP(), []int{2, 1} +} + +type Bucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BucketSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *BucketStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Bucket) Reset() { + *x = Bucket{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket) ProtoMessage() {} + +func (x *Bucket) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bucket.ProtoReflect.Descriptor instead. +func (*Bucket) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_proto_rawDescGZIP(), []int{0} +} + +func (x *Bucket) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Bucket) GetSpec() *BucketSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Bucket) GetStatus() *BucketStatus { + if x != nil { + return x.Status + } + return nil +} + +type BucketSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Supports transitions: + // - disabled -> enabled + // - disabled -> suspended + // - enabled <-> suspended + VersioningPolicy VersioningPolicy `protobuf:"varint,2,opt,name=versioning_policy,json=versioningPolicy,proto3,enum=nebius.storage.v1.VersioningPolicy" json:"versioning_policy,omitempty"` + // Maximum bucket size. + // Zero means unlimited. + // Actual limit can be lower if customer doesn't have enough quota. + // Real bucket size can go a little higher if customer writes too fast. + MaxSizeBytes int64 `protobuf:"varint,4,opt,name=max_size_bytes,json=maxSizeBytes,proto3" json:"max_size_bytes,omitempty"` + LifecycleConfiguration *LifecycleConfiguration `protobuf:"bytes,5,opt,name=lifecycle_configuration,json=lifecycleConfiguration,proto3" json:"lifecycle_configuration,omitempty"` +} + +func (x *BucketSpec) Reset() { + *x = BucketSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BucketSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BucketSpec) ProtoMessage() {} + +func (x *BucketSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BucketSpec.ProtoReflect.Descriptor instead. +func (*BucketSpec) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_proto_rawDescGZIP(), []int{1} +} + +func (x *BucketSpec) GetVersioningPolicy() VersioningPolicy { + if x != nil { + return x.VersioningPolicy + } + return VersioningPolicy_VERSIONING_POLICY_UNSPECIFIED +} + +func (x *BucketSpec) GetMaxSizeBytes() int64 { + if x != nil { + return x.MaxSizeBytes + } + return 0 +} + +func (x *BucketSpec) GetLifecycleConfiguration() *LifecycleConfiguration { + if x != nil { + return x.LifecycleConfiguration + } + return nil +} + +type BucketStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Counters []*BucketCounters `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters,omitempty"` + State BucketStatus_State `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.storage.v1.BucketStatus_State" json:"state,omitempty"` + SuspensionState BucketStatus_SuspensionState `protobuf:"varint,3,opt,name=suspension_state,json=suspensionState,proto3,enum=nebius.storage.v1.BucketStatus_SuspensionState" json:"suspension_state,omitempty"` + // The time when the bucket was deleted (or scheduled for deletion). + // It resets to null if the bucket is undeleted. + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + // The time when the bucket will be automatically purged in case it was soft-deleted. + PurgeAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=purge_at,json=purgeAt,proto3" json:"purge_at,omitempty"` +} + +func (x *BucketStatus) Reset() { + *x = BucketStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BucketStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BucketStatus) ProtoMessage() {} + +func (x *BucketStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BucketStatus.ProtoReflect.Descriptor instead. +func (*BucketStatus) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_proto_rawDescGZIP(), []int{2} +} + +func (x *BucketStatus) GetCounters() []*BucketCounters { + if x != nil { + return x.Counters + } + return nil +} + +func (x *BucketStatus) GetState() BucketStatus_State { + if x != nil { + return x.State + } + return BucketStatus_STATE_UNSPECIFIED +} + +func (x *BucketStatus) GetSuspensionState() BucketStatus_SuspensionState { + if x != nil { + return x.SuspensionState + } + return BucketStatus_SUSPENSION_STATE_UNSPECIFIED +} + +func (x *BucketStatus) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +func (x *BucketStatus) GetPurgeAt() *timestamppb.Timestamp { + if x != nil { + return x.PurgeAt + } + return nil +} + +var File_nebius_storage_v1_bucket_proto protoreflect.FileDescriptor + +var file_nebius_storage_v1_bucket_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x3a, 0x04, 0xba, 0x4a, 0x01, 0x03, 0x22, 0xee, 0x01, 0x0a, 0x0a, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x56, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x10, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, + 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x17, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x04, 0x0a, 0x0c, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x08, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x10, 0x73, 0x75, 0x73, 0x70, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x35, + 0x0a, 0x08, 0x70, 0x75, 0x72, 0x67, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x70, 0x75, + 0x72, 0x67, 0x65, 0x41, 0x74, 0x22, 0x62, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, + 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x55, 0x50, 0x44, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x1a, 0x0a, + 0x16, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x22, 0x55, 0x0a, 0x0f, 0x53, 0x75, 0x73, + 0x70, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x1c, + 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, + 0x42, 0x5a, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, + 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, + 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_storage_v1_bucket_proto_rawDescOnce sync.Once + file_nebius_storage_v1_bucket_proto_rawDescData = file_nebius_storage_v1_bucket_proto_rawDesc +) + +func file_nebius_storage_v1_bucket_proto_rawDescGZIP() []byte { + file_nebius_storage_v1_bucket_proto_rawDescOnce.Do(func() { + file_nebius_storage_v1_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_storage_v1_bucket_proto_rawDescData) + }) + return file_nebius_storage_v1_bucket_proto_rawDescData +} + +var file_nebius_storage_v1_bucket_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_storage_v1_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_storage_v1_bucket_proto_goTypes = []any{ + (BucketStatus_State)(0), // 0: nebius.storage.v1.BucketStatus.State + (BucketStatus_SuspensionState)(0), // 1: nebius.storage.v1.BucketStatus.SuspensionState + (*Bucket)(nil), // 2: nebius.storage.v1.Bucket + (*BucketSpec)(nil), // 3: nebius.storage.v1.BucketSpec + (*BucketStatus)(nil), // 4: nebius.storage.v1.BucketStatus + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata + (VersioningPolicy)(0), // 6: nebius.storage.v1.VersioningPolicy + (*LifecycleConfiguration)(nil), // 7: nebius.storage.v1.LifecycleConfiguration + (*BucketCounters)(nil), // 8: nebius.storage.v1.BucketCounters + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp +} +var file_nebius_storage_v1_bucket_proto_depIdxs = []int32{ + 5, // 0: nebius.storage.v1.Bucket.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.storage.v1.Bucket.spec:type_name -> nebius.storage.v1.BucketSpec + 4, // 2: nebius.storage.v1.Bucket.status:type_name -> nebius.storage.v1.BucketStatus + 6, // 3: nebius.storage.v1.BucketSpec.versioning_policy:type_name -> nebius.storage.v1.VersioningPolicy + 7, // 4: nebius.storage.v1.BucketSpec.lifecycle_configuration:type_name -> nebius.storage.v1.LifecycleConfiguration + 8, // 5: nebius.storage.v1.BucketStatus.counters:type_name -> nebius.storage.v1.BucketCounters + 0, // 6: nebius.storage.v1.BucketStatus.state:type_name -> nebius.storage.v1.BucketStatus.State + 1, // 7: nebius.storage.v1.BucketStatus.suspension_state:type_name -> nebius.storage.v1.BucketStatus.SuspensionState + 9, // 8: nebius.storage.v1.BucketStatus.deleted_at:type_name -> google.protobuf.Timestamp + 9, // 9: nebius.storage.v1.BucketStatus.purge_at:type_name -> google.protobuf.Timestamp + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_nebius_storage_v1_bucket_proto_init() } +func file_nebius_storage_v1_bucket_proto_init() { + if File_nebius_storage_v1_bucket_proto != nil { + return + } + file_nebius_storage_v1_base_proto_init() + file_nebius_storage_v1_bucket_counters_proto_init() + file_nebius_storage_v1_lifecycle_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_storage_v1_bucket_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Bucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*BucketSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*BucketStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_storage_v1_bucket_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_storage_v1_bucket_proto_goTypes, + DependencyIndexes: file_nebius_storage_v1_bucket_proto_depIdxs, + EnumInfos: file_nebius_storage_v1_bucket_proto_enumTypes, + MessageInfos: file_nebius_storage_v1_bucket_proto_msgTypes, + }.Build() + File_nebius_storage_v1_bucket_proto = out.File + file_nebius_storage_v1_bucket_proto_rawDesc = nil + file_nebius_storage_v1_bucket_proto_goTypes = nil + file_nebius_storage_v1_bucket_proto_depIdxs = nil +} diff --git a/proto/nebius/storage/v1/bucket.sensitive.pb.go b/proto/nebius/storage/v1/bucket.sensitive.pb.go new file mode 100644 index 0000000..177e0ce --- /dev/null +++ b/proto/nebius/storage/v1/bucket.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Bucket) Sanitize() // is not generated as no sensitive fields found +// func (x *Bucket) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BucketSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *BucketSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BucketStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *BucketStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/storage/v1/bucket_counters.pb.go b/proto/nebius/storage/v1/bucket_counters.pb.go new file mode 100644 index 0000000..e22154b --- /dev/null +++ b/proto/nebius/storage/v1/bucket_counters.pb.go @@ -0,0 +1,420 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/storage/v1/bucket_counters.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CurrentBucketCounters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SimpleObjectsQuantity int64 `protobuf:"varint,1,opt,name=simple_objects_quantity,json=simpleObjectsQuantity,proto3" json:"simple_objects_quantity,omitempty"` + SimpleObjectsSize int64 `protobuf:"varint,2,opt,name=simple_objects_size,json=simpleObjectsSize,proto3" json:"simple_objects_size,omitempty"` + MultipartObjectsQuantity int64 `protobuf:"varint,3,opt,name=multipart_objects_quantity,json=multipartObjectsQuantity,proto3" json:"multipart_objects_quantity,omitempty"` + MultipartObjectsSize int64 `protobuf:"varint,4,opt,name=multipart_objects_size,json=multipartObjectsSize,proto3" json:"multipart_objects_size,omitempty"` + MultipartUploadsQuantity int64 `protobuf:"varint,5,opt,name=multipart_uploads_quantity,json=multipartUploadsQuantity,proto3" json:"multipart_uploads_quantity,omitempty"` + InflightPartsQuantity int64 `protobuf:"varint,6,opt,name=inflight_parts_quantity,json=inflightPartsQuantity,proto3" json:"inflight_parts_quantity,omitempty"` + InflightPartsSize int64 `protobuf:"varint,7,opt,name=inflight_parts_size,json=inflightPartsSize,proto3" json:"inflight_parts_size,omitempty"` +} + +func (x *CurrentBucketCounters) Reset() { + *x = CurrentBucketCounters{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrentBucketCounters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrentBucketCounters) ProtoMessage() {} + +func (x *CurrentBucketCounters) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CurrentBucketCounters.ProtoReflect.Descriptor instead. +func (*CurrentBucketCounters) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_counters_proto_rawDescGZIP(), []int{0} +} + +func (x *CurrentBucketCounters) GetSimpleObjectsQuantity() int64 { + if x != nil { + return x.SimpleObjectsQuantity + } + return 0 +} + +func (x *CurrentBucketCounters) GetSimpleObjectsSize() int64 { + if x != nil { + return x.SimpleObjectsSize + } + return 0 +} + +func (x *CurrentBucketCounters) GetMultipartObjectsQuantity() int64 { + if x != nil { + return x.MultipartObjectsQuantity + } + return 0 +} + +func (x *CurrentBucketCounters) GetMultipartObjectsSize() int64 { + if x != nil { + return x.MultipartObjectsSize + } + return 0 +} + +func (x *CurrentBucketCounters) GetMultipartUploadsQuantity() int64 { + if x != nil { + return x.MultipartUploadsQuantity + } + return 0 +} + +func (x *CurrentBucketCounters) GetInflightPartsQuantity() int64 { + if x != nil { + return x.InflightPartsQuantity + } + return 0 +} + +func (x *CurrentBucketCounters) GetInflightPartsSize() int64 { + if x != nil { + return x.InflightPartsSize + } + return 0 +} + +// Counters for non-current object versions (for versioning buckets). +type NonCurrentBucketCounters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SimpleObjectsQuantity int64 `protobuf:"varint,1,opt,name=simple_objects_quantity,json=simpleObjectsQuantity,proto3" json:"simple_objects_quantity,omitempty"` + SimpleObjectsSize int64 `protobuf:"varint,2,opt,name=simple_objects_size,json=simpleObjectsSize,proto3" json:"simple_objects_size,omitempty"` + MultipartObjectsQuantity int64 `protobuf:"varint,3,opt,name=multipart_objects_quantity,json=multipartObjectsQuantity,proto3" json:"multipart_objects_quantity,omitempty"` + MultipartObjectsSize int64 `protobuf:"varint,4,opt,name=multipart_objects_size,json=multipartObjectsSize,proto3" json:"multipart_objects_size,omitempty"` +} + +func (x *NonCurrentBucketCounters) Reset() { + *x = NonCurrentBucketCounters{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NonCurrentBucketCounters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NonCurrentBucketCounters) ProtoMessage() {} + +func (x *NonCurrentBucketCounters) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NonCurrentBucketCounters.ProtoReflect.Descriptor instead. +func (*NonCurrentBucketCounters) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_counters_proto_rawDescGZIP(), []int{1} +} + +func (x *NonCurrentBucketCounters) GetSimpleObjectsQuantity() int64 { + if x != nil { + return x.SimpleObjectsQuantity + } + return 0 +} + +func (x *NonCurrentBucketCounters) GetSimpleObjectsSize() int64 { + if x != nil { + return x.SimpleObjectsSize + } + return 0 +} + +func (x *NonCurrentBucketCounters) GetMultipartObjectsQuantity() int64 { + if x != nil { + return x.MultipartObjectsQuantity + } + return 0 +} + +func (x *NonCurrentBucketCounters) GetMultipartObjectsSize() int64 { + if x != nil { + return x.MultipartObjectsSize + } + return 0 +} + +type BucketCounters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StorageClass StorageClass `protobuf:"varint,1,opt,name=storage_class,json=storageClass,proto3,enum=nebius.storage.v1.StorageClass" json:"storage_class,omitempty"` + Counters *CurrentBucketCounters `protobuf:"bytes,2,opt,name=counters,proto3" json:"counters,omitempty"` + NonCurrentCounters *NonCurrentBucketCounters `protobuf:"bytes,3,opt,name=non_current_counters,json=nonCurrentCounters,proto3" json:"non_current_counters,omitempty"` +} + +func (x *BucketCounters) Reset() { + *x = BucketCounters{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BucketCounters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BucketCounters) ProtoMessage() {} + +func (x *BucketCounters) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_counters_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BucketCounters.ProtoReflect.Descriptor instead. +func (*BucketCounters) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_counters_proto_rawDescGZIP(), []int{2} +} + +func (x *BucketCounters) GetStorageClass() StorageClass { + if x != nil { + return x.StorageClass + } + return StorageClass_STORAGE_CLASS_UNSPECIFIED +} + +func (x *BucketCounters) GetCounters() *CurrentBucketCounters { + if x != nil { + return x.Counters + } + return nil +} + +func (x *BucketCounters) GetNonCurrentCounters() *NonCurrentBucketCounters { + if x != nil { + return x.NonCurrentCounters + } + return nil +} + +var File_nebius_storage_v1_bucket_counters_proto protoreflect.FileDescriptor + +var file_nebius_storage_v1_bucket_counters_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x03, 0x0a, 0x15, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, + 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x69, 0x6d, 0x70, 0x6c, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3c, 0x0a, 0x1a, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x61, 0x72, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x3c, 0x0a, 0x1a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x75, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, + 0x0a, 0x17, 0x69, 0x6e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x73, + 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x72, 0x74, 0x73, 0x51, 0x75, + 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x11, 0x69, 0x6e, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x50, 0x61, 0x72, + 0x74, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x18, 0x4e, 0x6f, 0x6e, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x73, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x18, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x61, 0x72, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0xfb, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, + 0x0a, 0x14, 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x6e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x52, 0x12, 0x6e, 0x6f, 0x6e, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x42, 0x62, 0x0a, + 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_storage_v1_bucket_counters_proto_rawDescOnce sync.Once + file_nebius_storage_v1_bucket_counters_proto_rawDescData = file_nebius_storage_v1_bucket_counters_proto_rawDesc +) + +func file_nebius_storage_v1_bucket_counters_proto_rawDescGZIP() []byte { + file_nebius_storage_v1_bucket_counters_proto_rawDescOnce.Do(func() { + file_nebius_storage_v1_bucket_counters_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_storage_v1_bucket_counters_proto_rawDescData) + }) + return file_nebius_storage_v1_bucket_counters_proto_rawDescData +} + +var file_nebius_storage_v1_bucket_counters_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_storage_v1_bucket_counters_proto_goTypes = []any{ + (*CurrentBucketCounters)(nil), // 0: nebius.storage.v1.CurrentBucketCounters + (*NonCurrentBucketCounters)(nil), // 1: nebius.storage.v1.NonCurrentBucketCounters + (*BucketCounters)(nil), // 2: nebius.storage.v1.BucketCounters + (StorageClass)(0), // 3: nebius.storage.v1.StorageClass +} +var file_nebius_storage_v1_bucket_counters_proto_depIdxs = []int32{ + 3, // 0: nebius.storage.v1.BucketCounters.storage_class:type_name -> nebius.storage.v1.StorageClass + 0, // 1: nebius.storage.v1.BucketCounters.counters:type_name -> nebius.storage.v1.CurrentBucketCounters + 1, // 2: nebius.storage.v1.BucketCounters.non_current_counters:type_name -> nebius.storage.v1.NonCurrentBucketCounters + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_storage_v1_bucket_counters_proto_init() } +func file_nebius_storage_v1_bucket_counters_proto_init() { + if File_nebius_storage_v1_bucket_counters_proto != nil { + return + } + file_nebius_storage_v1_base_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_storage_v1_bucket_counters_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CurrentBucketCounters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_counters_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NonCurrentBucketCounters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_counters_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*BucketCounters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_storage_v1_bucket_counters_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_storage_v1_bucket_counters_proto_goTypes, + DependencyIndexes: file_nebius_storage_v1_bucket_counters_proto_depIdxs, + MessageInfos: file_nebius_storage_v1_bucket_counters_proto_msgTypes, + }.Build() + File_nebius_storage_v1_bucket_counters_proto = out.File + file_nebius_storage_v1_bucket_counters_proto_rawDesc = nil + file_nebius_storage_v1_bucket_counters_proto_goTypes = nil + file_nebius_storage_v1_bucket_counters_proto_depIdxs = nil +} diff --git a/proto/nebius/storage/v1/bucket_counters.sensitive.pb.go b/proto/nebius/storage/v1/bucket_counters.sensitive.pb.go new file mode 100644 index 0000000..f96ab90 --- /dev/null +++ b/proto/nebius/storage/v1/bucket_counters.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *CurrentBucketCounters) Sanitize() // is not generated as no sensitive fields found +// func (x *CurrentBucketCounters) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NonCurrentBucketCounters) Sanitize() // is not generated as no sensitive fields found +// func (x *NonCurrentBucketCounters) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *BucketCounters) Sanitize() // is not generated as no sensitive fields found +// func (x *BucketCounters) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/storage/v1/bucket_service.pb.go b/proto/nebius/storage/v1/bucket_service.pb.go new file mode 100644 index 0000000..c35a4f5 --- /dev/null +++ b/proto/nebius/storage/v1/bucket_service.pb.go @@ -0,0 +1,936 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/storage/v1/bucket_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // By default, only CREATING and ACTIVE buckets are visible. + // DEPRECATED: soft-deleted buckets are shown by default. + // + // Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. + WithDeleted bool `protobuf:"varint,2,opt,name=with_deleted,json=withDeleted,proto3" json:"with_deleted,omitempty"` +} + +func (x *GetBucketRequest) Reset() { + *x = GetBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBucketRequest) ProtoMessage() {} + +func (x *GetBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBucketRequest.ProtoReflect.Descriptor instead. +func (*GetBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetBucketRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. +func (x *GetBucketRequest) GetWithDeleted() bool { + if x != nil { + return x.WithDeleted + } + return false +} + +type GetBucketByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // By default, only CREATING and ACTIVE buckets are visible. + // DEPRECATED: soft-deleted buckets are shown by default. + // + // Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. + WithDeleted bool `protobuf:"varint,3,opt,name=with_deleted,json=withDeleted,proto3" json:"with_deleted,omitempty"` +} + +func (x *GetBucketByNameRequest) Reset() { + *x = GetBucketByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBucketByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBucketByNameRequest) ProtoMessage() {} + +func (x *GetBucketByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBucketByNameRequest.ProtoReflect.Descriptor instead. +func (*GetBucketByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetBucketByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetBucketByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. +func (x *GetBucketByNameRequest) GetWithDeleted() bool { + if x != nil { + return x.WithDeleted + } + return false +} + +type CreateBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BucketSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateBucketRequest) Reset() { + *x = CreateBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBucketRequest) ProtoMessage() {} + +func (x *CreateBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBucketRequest.ProtoReflect.Descriptor instead. +func (*CreateBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateBucketRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateBucketRequest) GetSpec() *BucketSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BucketSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateBucketRequest) Reset() { + *x = UpdateBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBucketRequest) ProtoMessage() {} + +func (x *UpdateBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBucketRequest.ProtoReflect.Descriptor instead. +func (*UpdateBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateBucketRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateBucketRequest) GetSpec() *BucketSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // You can provide purge_at or ttl after which the bucket will be purged automatically. + // Otherwise, default ttl of 7 days will be applied. + // + // Types that are assignable to Purge: + // + // *DeleteBucketRequest_PurgeAt + // *DeleteBucketRequest_Ttl + Purge isDeleteBucketRequest_Purge `protobuf_oneof:"purge"` +} + +func (x *DeleteBucketRequest) Reset() { + *x = DeleteBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBucketRequest) ProtoMessage() {} + +func (x *DeleteBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBucketRequest.ProtoReflect.Descriptor instead. +func (*DeleteBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteBucketRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *DeleteBucketRequest) GetPurge() isDeleteBucketRequest_Purge { + if m != nil { + return m.Purge + } + return nil +} + +func (x *DeleteBucketRequest) GetPurgeAt() *timestamppb.Timestamp { + if x, ok := x.GetPurge().(*DeleteBucketRequest_PurgeAt); ok { + return x.PurgeAt + } + return nil +} + +func (x *DeleteBucketRequest) GetTtl() *durationpb.Duration { + if x, ok := x.GetPurge().(*DeleteBucketRequest_Ttl); ok { + return x.Ttl + } + return nil +} + +type isDeleteBucketRequest_Purge interface { + isDeleteBucketRequest_Purge() +} + +type DeleteBucketRequest_PurgeAt struct { + // Absolute purging time: status.purge_at will be set to this value. + PurgeAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=purge_at,json=purgeAt,proto3,oneof"` +} + +type DeleteBucketRequest_Ttl struct { + // Relative purging time: status.purge_at will be set to (current timestamp + ttl). + Ttl *durationpb.Duration `protobuf:"bytes,4,opt,name=ttl,proto3,oneof"` +} + +func (*DeleteBucketRequest_PurgeAt) isDeleteBucketRequest_Purge() {} + +func (*DeleteBucketRequest_Ttl) isDeleteBucketRequest_Purge() {} + +type PurgeBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *PurgeBucketRequest) Reset() { + *x = PurgeBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PurgeBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurgeBucketRequest) ProtoMessage() {} + +func (x *PurgeBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurgeBucketRequest.ProtoReflect.Descriptor instead. +func (*PurgeBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{5} +} + +func (x *PurgeBucketRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type UndeleteBucketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *UndeleteBucketRequest) Reset() { + *x = UndeleteBucketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UndeleteBucketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UndeleteBucketRequest) ProtoMessage() {} + +func (x *UndeleteBucketRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UndeleteBucketRequest.ProtoReflect.Descriptor instead. +func (*UndeleteBucketRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UndeleteBucketRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListBucketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents the container ID. + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + // Specifies the maximum number of items to return in the response. + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token for pagination, allowing the retrieval of the next set of results. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A filter to narrow down the results based on specific criteria. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // By default, only CREATING and ACTIVE buckets are shown. + // DEPRECATED: soft-deleted buckets are shown by default. + // + // Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. + WithDeleted bool `protobuf:"varint,5,opt,name=with_deleted,json=withDeleted,proto3" json:"with_deleted,omitempty"` +} + +func (x *ListBucketsRequest) Reset() { + *x = ListBucketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBucketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBucketsRequest) ProtoMessage() {} + +func (x *ListBucketsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBucketsRequest.ProtoReflect.Descriptor instead. +func (*ListBucketsRequest) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{7} +} + +func (x *ListBucketsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListBucketsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListBucketsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListBucketsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Deprecated: Marked as deprecated in nebius/storage/v1/bucket_service.proto. +func (x *ListBucketsRequest) GetWithDeleted() bool { + if x != nil { + return x.WithDeleted + } + return false +} + +type ListBucketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of buckets returned in the response. The field should be named as `items` for consistency. + Items []*Bucket `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + // Token for pagination, indicating the next set of results can be retrieved using this token. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListBucketsResponse) Reset() { + *x = ListBucketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBucketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBucketsResponse) ProtoMessage() {} + +func (x *ListBucketsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_bucket_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBucketsResponse.ProtoReflect.Descriptor instead. +func (*ListBucketsResponse) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_bucket_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ListBucketsResponse) GetItems() []*Bucket { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListBucketsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_storage_v1_bucket_service_proto protoreflect.FileDescriptor + +var file_nebius_storage_v1_bucket_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x77, 0x69, + 0x74, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x70, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, + 0x77, 0x69, 0x74, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x13, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, + 0x9e, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x37, 0x0a, 0x08, 0x70, 0x75, 0x72, 0x67, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, + 0x07, 0x70, 0x75, 0x72, 0x67, 0x65, 0x41, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x70, 0x75, 0x72, 0x67, 0x65, + 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x75, 0x72, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2f, + 0x0a, 0x15, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0xb4, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x25, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x6e, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x9d, 0x05, 0x0a, 0x0d, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, + 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x05, 0x50, 0x75, 0x72, 0x67, 0x65, 0x12, + 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x08, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, + 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0e, 0xba, 0x4a, 0x0b, 0x63, 0x70, 0x6c, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x61, 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x42, 0x12, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, + 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_storage_v1_bucket_service_proto_rawDescOnce sync.Once + file_nebius_storage_v1_bucket_service_proto_rawDescData = file_nebius_storage_v1_bucket_service_proto_rawDesc +) + +func file_nebius_storage_v1_bucket_service_proto_rawDescGZIP() []byte { + file_nebius_storage_v1_bucket_service_proto_rawDescOnce.Do(func() { + file_nebius_storage_v1_bucket_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_storage_v1_bucket_service_proto_rawDescData) + }) + return file_nebius_storage_v1_bucket_service_proto_rawDescData +} + +var file_nebius_storage_v1_bucket_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_storage_v1_bucket_service_proto_goTypes = []any{ + (*GetBucketRequest)(nil), // 0: nebius.storage.v1.GetBucketRequest + (*GetBucketByNameRequest)(nil), // 1: nebius.storage.v1.GetBucketByNameRequest + (*CreateBucketRequest)(nil), // 2: nebius.storage.v1.CreateBucketRequest + (*UpdateBucketRequest)(nil), // 3: nebius.storage.v1.UpdateBucketRequest + (*DeleteBucketRequest)(nil), // 4: nebius.storage.v1.DeleteBucketRequest + (*PurgeBucketRequest)(nil), // 5: nebius.storage.v1.PurgeBucketRequest + (*UndeleteBucketRequest)(nil), // 6: nebius.storage.v1.UndeleteBucketRequest + (*ListBucketsRequest)(nil), // 7: nebius.storage.v1.ListBucketsRequest + (*ListBucketsResponse)(nil), // 8: nebius.storage.v1.ListBucketsResponse + (*v1.ResourceMetadata)(nil), // 9: nebius.common.v1.ResourceMetadata + (*BucketSpec)(nil), // 10: nebius.storage.v1.BucketSpec + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration + (*Bucket)(nil), // 13: nebius.storage.v1.Bucket + (*v1.Operation)(nil), // 14: nebius.common.v1.Operation +} +var file_nebius_storage_v1_bucket_service_proto_depIdxs = []int32{ + 9, // 0: nebius.storage.v1.CreateBucketRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 10, // 1: nebius.storage.v1.CreateBucketRequest.spec:type_name -> nebius.storage.v1.BucketSpec + 9, // 2: nebius.storage.v1.UpdateBucketRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 10, // 3: nebius.storage.v1.UpdateBucketRequest.spec:type_name -> nebius.storage.v1.BucketSpec + 11, // 4: nebius.storage.v1.DeleteBucketRequest.purge_at:type_name -> google.protobuf.Timestamp + 12, // 5: nebius.storage.v1.DeleteBucketRequest.ttl:type_name -> google.protobuf.Duration + 13, // 6: nebius.storage.v1.ListBucketsResponse.items:type_name -> nebius.storage.v1.Bucket + 0, // 7: nebius.storage.v1.BucketService.Get:input_type -> nebius.storage.v1.GetBucketRequest + 1, // 8: nebius.storage.v1.BucketService.GetByName:input_type -> nebius.storage.v1.GetBucketByNameRequest + 7, // 9: nebius.storage.v1.BucketService.List:input_type -> nebius.storage.v1.ListBucketsRequest + 2, // 10: nebius.storage.v1.BucketService.Create:input_type -> nebius.storage.v1.CreateBucketRequest + 3, // 11: nebius.storage.v1.BucketService.Update:input_type -> nebius.storage.v1.UpdateBucketRequest + 4, // 12: nebius.storage.v1.BucketService.Delete:input_type -> nebius.storage.v1.DeleteBucketRequest + 5, // 13: nebius.storage.v1.BucketService.Purge:input_type -> nebius.storage.v1.PurgeBucketRequest + 6, // 14: nebius.storage.v1.BucketService.Undelete:input_type -> nebius.storage.v1.UndeleteBucketRequest + 13, // 15: nebius.storage.v1.BucketService.Get:output_type -> nebius.storage.v1.Bucket + 13, // 16: nebius.storage.v1.BucketService.GetByName:output_type -> nebius.storage.v1.Bucket + 8, // 17: nebius.storage.v1.BucketService.List:output_type -> nebius.storage.v1.ListBucketsResponse + 14, // 18: nebius.storage.v1.BucketService.Create:output_type -> nebius.common.v1.Operation + 14, // 19: nebius.storage.v1.BucketService.Update:output_type -> nebius.common.v1.Operation + 14, // 20: nebius.storage.v1.BucketService.Delete:output_type -> nebius.common.v1.Operation + 14, // 21: nebius.storage.v1.BucketService.Purge:output_type -> nebius.common.v1.Operation + 14, // 22: nebius.storage.v1.BucketService.Undelete:output_type -> nebius.common.v1.Operation + 15, // [15:23] is the sub-list for method output_type + 7, // [7:15] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_storage_v1_bucket_service_proto_init() } +func file_nebius_storage_v1_bucket_service_proto_init() { + if File_nebius_storage_v1_bucket_service_proto != nil { + return + } + file_nebius_storage_v1_bucket_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_storage_v1_bucket_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetBucketByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UpdateBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*PurgeBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*UndeleteBucketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListBucketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListBucketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_storage_v1_bucket_service_proto_msgTypes[4].OneofWrappers = []any{ + (*DeleteBucketRequest_PurgeAt)(nil), + (*DeleteBucketRequest_Ttl)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_storage_v1_bucket_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_storage_v1_bucket_service_proto_goTypes, + DependencyIndexes: file_nebius_storage_v1_bucket_service_proto_depIdxs, + MessageInfos: file_nebius_storage_v1_bucket_service_proto_msgTypes, + }.Build() + File_nebius_storage_v1_bucket_service_proto = out.File + file_nebius_storage_v1_bucket_service_proto_rawDesc = nil + file_nebius_storage_v1_bucket_service_proto_goTypes = nil + file_nebius_storage_v1_bucket_service_proto_depIdxs = nil +} diff --git a/proto/nebius/storage/v1/bucket_service.sensitive.pb.go b/proto/nebius/storage/v1/bucket_service.sensitive.pb.go new file mode 100644 index 0000000..c191c10 --- /dev/null +++ b/proto/nebius/storage/v1/bucket_service.sensitive.pb.go @@ -0,0 +1,30 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetBucketByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetBucketByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PurgeBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *PurgeBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UndeleteBucketRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UndeleteBucketRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListBucketsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListBucketsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListBucketsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListBucketsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/storage/v1/bucket_service_grpc.pb.go b/proto/nebius/storage/v1/bucket_service_grpc.pb.go new file mode 100644 index 0000000..7529a58 --- /dev/null +++ b/proto/nebius/storage/v1/bucket_service_grpc.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/storage/v1/bucket_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + BucketService_Get_FullMethodName = "/nebius.storage.v1.BucketService/Get" + BucketService_GetByName_FullMethodName = "/nebius.storage.v1.BucketService/GetByName" + BucketService_List_FullMethodName = "/nebius.storage.v1.BucketService/List" + BucketService_Create_FullMethodName = "/nebius.storage.v1.BucketService/Create" + BucketService_Update_FullMethodName = "/nebius.storage.v1.BucketService/Update" + BucketService_Delete_FullMethodName = "/nebius.storage.v1.BucketService/Delete" + BucketService_Purge_FullMethodName = "/nebius.storage.v1.BucketService/Purge" + BucketService_Undelete_FullMethodName = "/nebius.storage.v1.BucketService/Undelete" +) + +// BucketServiceClient is the client API for BucketService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BucketServiceClient interface { + Get(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) + GetByName(ctx context.Context, in *GetBucketByNameRequest, opts ...grpc.CallOption) (*Bucket, error) + List(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) + Create(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Purge instantly deletes the bucket in ScheduledForDeletion state. + // It can be used only for buckets in ScheduledForDeletion state. + // If you want to delete Active bucket instantly, use Delete with zero ttl. + Purge(ctx context.Context, in *PurgeBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) + // Undelete recovers the bucket from ScheduledForDeletion state to Active. + Undelete(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type bucketServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBucketServiceClient(cc grpc.ClientConnInterface) BucketServiceClient { + return &bucketServiceClient{cc} +} + +func (c *bucketServiceClient) Get(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, BucketService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) GetByName(ctx context.Context, in *GetBucketByNameRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, BucketService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) List(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) { + out := new(ListBucketsResponse) + err := c.cc.Invoke(ctx, BucketService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) Create(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, BucketService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) Update(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, BucketService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) Delete(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, BucketService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) Purge(ctx context.Context, in *PurgeBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, BucketService_Purge_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bucketServiceClient) Undelete(ctx context.Context, in *UndeleteBucketRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, BucketService_Undelete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BucketServiceServer is the server API for BucketService service. +// All implementations should embed UnimplementedBucketServiceServer +// for forward compatibility +type BucketServiceServer interface { + Get(context.Context, *GetBucketRequest) (*Bucket, error) + GetByName(context.Context, *GetBucketByNameRequest) (*Bucket, error) + List(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) + Create(context.Context, *CreateBucketRequest) (*v1.Operation, error) + Update(context.Context, *UpdateBucketRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteBucketRequest) (*v1.Operation, error) + // Purge instantly deletes the bucket in ScheduledForDeletion state. + // It can be used only for buckets in ScheduledForDeletion state. + // If you want to delete Active bucket instantly, use Delete with zero ttl. + Purge(context.Context, *PurgeBucketRequest) (*v1.Operation, error) + // Undelete recovers the bucket from ScheduledForDeletion state to Active. + Undelete(context.Context, *UndeleteBucketRequest) (*v1.Operation, error) +} + +// UnimplementedBucketServiceServer should be embedded to have forward compatible implementations. +type UnimplementedBucketServiceServer struct { +} + +func (UnimplementedBucketServiceServer) Get(context.Context, *GetBucketRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedBucketServiceServer) GetByName(context.Context, *GetBucketByNameRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedBucketServiceServer) List(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedBucketServiceServer) Create(context.Context, *CreateBucketRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedBucketServiceServer) Update(context.Context, *UpdateBucketRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedBucketServiceServer) Delete(context.Context, *DeleteBucketRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedBucketServiceServer) Purge(context.Context, *PurgeBucketRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Purge not implemented") +} +func (UnimplementedBucketServiceServer) Undelete(context.Context, *UndeleteBucketRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Undelete not implemented") +} + +// UnsafeBucketServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BucketServiceServer will +// result in compilation errors. +type UnsafeBucketServiceServer interface { + mustEmbedUnimplementedBucketServiceServer() +} + +func RegisterBucketServiceServer(s grpc.ServiceRegistrar, srv BucketServiceServer) { + s.RegisterService(&BucketService_ServiceDesc, srv) +} + +func _BucketService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Get(ctx, req.(*GetBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBucketByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).GetByName(ctx, req.(*GetBucketByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBucketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).List(ctx, req.(*ListBucketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Create(ctx, req.(*CreateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Update(ctx, req.(*UpdateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Delete(ctx, req.(*DeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_Purge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurgeBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Purge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Purge_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Purge(ctx, req.(*PurgeBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BucketService_Undelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UndeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BucketServiceServer).Undelete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BucketService_Undelete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BucketServiceServer).Undelete(ctx, req.(*UndeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BucketService_ServiceDesc is the grpc.ServiceDesc for BucketService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BucketService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.storage.v1.BucketService", + HandlerType: (*BucketServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _BucketService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _BucketService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _BucketService_List_Handler, + }, + { + MethodName: "Create", + Handler: _BucketService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _BucketService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _BucketService_Delete_Handler, + }, + { + MethodName: "Purge", + Handler: _BucketService_Purge_Handler, + }, + { + MethodName: "Undelete", + Handler: _BucketService_Undelete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/storage/v1/bucket_service.proto", +} diff --git a/proto/nebius/storage/v1/lifecycle.pb.go b/proto/nebius/storage/v1/lifecycle.pb.go new file mode 100644 index 0000000..7179a9c --- /dev/null +++ b/proto/nebius/storage/v1/lifecycle.pb.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/storage/v1/lifecycle.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LifecycleRule_Status int32 + +const ( + LifecycleRule_STATUS_UNSPECIFIED LifecycleRule_Status = 0 + LifecycleRule_ENABLED LifecycleRule_Status = 1 + LifecycleRule_DISABLED LifecycleRule_Status = 2 +) + +// Enum value maps for LifecycleRule_Status. +var ( + LifecycleRule_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "ENABLED", + 2: "DISABLED", + } + LifecycleRule_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x LifecycleRule_Status) Enum() *LifecycleRule_Status { + p := new(LifecycleRule_Status) + *p = x + return p +} + +func (x LifecycleRule_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LifecycleRule_Status) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_storage_v1_lifecycle_proto_enumTypes[0].Descriptor() +} + +func (LifecycleRule_Status) Type() protoreflect.EnumType { + return &file_nebius_storage_v1_lifecycle_proto_enumTypes[0] +} + +func (x LifecycleRule_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LifecycleRule_Status.Descriptor instead. +func (LifecycleRule_Status) EnumDescriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{1, 0} +} + +// The lifecycle configuration consists of one or more rules. +// An Lifecycle configuration can have up to 1,000 rules. +// Each rule consists of the following: +// - A filter identifying a subset of objects to which the rule applies. +// The filter can be based on a key name prefix, object size, or any combination of these. +// - A status indicating whether the rule is currently active. +// - One or more lifecycle expiration actions that you want to be performed on the objects +// identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended +// (bucket.spec.versioning_policy equals to ENABLED or SUSPENDED) you can have many versions of the same +// object (one current version and zero or more noncurrent versions). The system provides predefined actions +// that you can specify for current and noncurrent object versions. +type LifecycleConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rules []*LifecycleRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *LifecycleConfiguration) Reset() { + *x = LifecycleConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleConfiguration) ProtoMessage() {} + +func (x *LifecycleConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleConfiguration.ProtoReflect.Descriptor instead. +func (*LifecycleConfiguration) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{0} +} + +func (x *LifecycleConfiguration) GetRules() []*LifecycleRule { + if x != nil { + return x.Rules + } + return nil +} + +type LifecycleRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier for the rule per configuration. + // The value cannot be longer than 255 characters. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status LifecycleRule_Status `protobuf:"varint,2,opt,name=status,proto3,enum=nebius.storage.v1.LifecycleRule_Status" json:"status,omitempty"` + // The Filter is used to identify objects that a Lifecycle Rule applies to. + // The Lifecycle Rule will apply to any object matching all of the predicates + // configured inside (using logical AND). + Filter *LifecycleFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Specifies the expiration for the lifecycle of the object in the form of date, days and, + // whether the object has a delete marker. + Expiration *LifecycleExpiration `protobuf:"bytes,4,opt,name=expiration,proto3" json:"expiration,omitempty"` + // Specifies when noncurrent object versions expire. + // It works only on a bucket that has versioning enabled (or suspended). + NoncurrentVersionExpiration *LifecycleNoncurrentVersionExpiration `protobuf:"bytes,5,opt,name=noncurrent_version_expiration,json=noncurrentVersionExpiration,proto3" json:"noncurrent_version_expiration,omitempty"` + // Specifies the days since the initiation of an incomplete multipart upload that + // the system will wait before permanently removing all parts of the upload. + AbortIncompleteMultipartUpload *LifecycleAbortIncompleteMultipartUpload `protobuf:"bytes,6,opt,name=abort_incomplete_multipart_upload,json=abortIncompleteMultipartUpload,proto3" json:"abort_incomplete_multipart_upload,omitempty"` +} + +func (x *LifecycleRule) Reset() { + *x = LifecycleRule{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleRule) ProtoMessage() {} + +func (x *LifecycleRule) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleRule.ProtoReflect.Descriptor instead. +func (*LifecycleRule) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{1} +} + +func (x *LifecycleRule) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *LifecycleRule) GetStatus() LifecycleRule_Status { + if x != nil { + return x.Status + } + return LifecycleRule_STATUS_UNSPECIFIED +} + +func (x *LifecycleRule) GetFilter() *LifecycleFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *LifecycleRule) GetExpiration() *LifecycleExpiration { + if x != nil { + return x.Expiration + } + return nil +} + +func (x *LifecycleRule) GetNoncurrentVersionExpiration() *LifecycleNoncurrentVersionExpiration { + if x != nil { + return x.NoncurrentVersionExpiration + } + return nil +} + +func (x *LifecycleRule) GetAbortIncompleteMultipartUpload() *LifecycleAbortIncompleteMultipartUpload { + if x != nil { + return x.AbortIncompleteMultipartUpload + } + return nil +} + +type LifecycleFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Prefix identifying one or more objects to which the rule applies. + // If prefix is empty, the rule applies to all objects in the bucket. + Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + // Minimum object size to which the rule applies. + ObjectSizeGreaterThanBytes int64 `protobuf:"varint,2,opt,name=object_size_greater_than_bytes,json=objectSizeGreaterThanBytes,proto3" json:"object_size_greater_than_bytes,omitempty"` + // Maximum object size to which the rule applies. + ObjectSizeLessThanBytes int64 `protobuf:"varint,3,opt,name=object_size_less_than_bytes,json=objectSizeLessThanBytes,proto3" json:"object_size_less_than_bytes,omitempty"` +} + +func (x *LifecycleFilter) Reset() { + *x = LifecycleFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleFilter) ProtoMessage() {} + +func (x *LifecycleFilter) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleFilter.ProtoReflect.Descriptor instead. +func (*LifecycleFilter) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{2} +} + +func (x *LifecycleFilter) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *LifecycleFilter) GetObjectSizeGreaterThanBytes() int64 { + if x != nil { + return x.ObjectSizeGreaterThanBytes + } + return 0 +} + +func (x *LifecycleFilter) GetObjectSizeLessThanBytes() int64 { + if x != nil { + return x.ObjectSizeLessThanBytes + } + return 0 +} + +type LifecycleExpiration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ExpiredWith: + // + // *LifecycleExpiration_Date + // *LifecycleExpiration_Days + ExpiredWith isLifecycleExpiration_ExpiredWith `protobuf_oneof:"expired_with"` + // Indicates whether the system will remove a "delete marker" with no noncurrent versions. + // If set to true, the "delete marker" will be permanently removed. + // If set to false the policy takes no action. + // This cannot be specified with Days or Date in a LifecycleExpiration Policy. + ExpiredObjectDeleteMarker bool `protobuf:"varint,3,opt,name=expired_object_delete_marker,json=expiredObjectDeleteMarker,proto3" json:"expired_object_delete_marker,omitempty"` +} + +func (x *LifecycleExpiration) Reset() { + *x = LifecycleExpiration{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleExpiration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleExpiration) ProtoMessage() {} + +func (x *LifecycleExpiration) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleExpiration.ProtoReflect.Descriptor instead. +func (*LifecycleExpiration) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{3} +} + +func (m *LifecycleExpiration) GetExpiredWith() isLifecycleExpiration_ExpiredWith { + if m != nil { + return m.ExpiredWith + } + return nil +} + +func (x *LifecycleExpiration) GetDate() *timestamppb.Timestamp { + if x, ok := x.GetExpiredWith().(*LifecycleExpiration_Date); ok { + return x.Date + } + return nil +} + +func (x *LifecycleExpiration) GetDays() int32 { + if x, ok := x.GetExpiredWith().(*LifecycleExpiration_Days); ok { + return x.Days + } + return 0 +} + +func (x *LifecycleExpiration) GetExpiredObjectDeleteMarker() bool { + if x != nil { + return x.ExpiredObjectDeleteMarker + } + return false +} + +type isLifecycleExpiration_ExpiredWith interface { + isLifecycleExpiration_ExpiredWith() +} + +type LifecycleExpiration_Date struct { + // Indicates at what date the object will be deleted. The time is always midnight UTC. + Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3,oneof"` +} + +type LifecycleExpiration_Days struct { + // Indicates the lifetime, in days, of the objects that are subject to the rule. + // The value must be a non-zero positive integer. + Days int32 `protobuf:"varint,2,opt,name=days,proto3,oneof"` +} + +func (*LifecycleExpiration_Date) isLifecycleExpiration_ExpiredWith() {} + +func (*LifecycleExpiration_Days) isLifecycleExpiration_ExpiredWith() {} + +type LifecycleNoncurrentVersionExpiration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies how many noncurrent versions the system will retain. + NewerNoncurrentVersions *int32 `protobuf:"varint,1,opt,name=newer_noncurrent_versions,json=newerNoncurrentVersions,proto3,oneof" json:"newer_noncurrent_versions,omitempty"` + // Specifies the number of days an object is noncurrent before the system will expire it. + NoncurrentDays int32 `protobuf:"varint,2,opt,name=noncurrent_days,json=noncurrentDays,proto3" json:"noncurrent_days,omitempty"` +} + +func (x *LifecycleNoncurrentVersionExpiration) Reset() { + *x = LifecycleNoncurrentVersionExpiration{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleNoncurrentVersionExpiration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleNoncurrentVersionExpiration) ProtoMessage() {} + +func (x *LifecycleNoncurrentVersionExpiration) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleNoncurrentVersionExpiration.ProtoReflect.Descriptor instead. +func (*LifecycleNoncurrentVersionExpiration) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{4} +} + +func (x *LifecycleNoncurrentVersionExpiration) GetNewerNoncurrentVersions() int32 { + if x != nil && x.NewerNoncurrentVersions != nil { + return *x.NewerNoncurrentVersions + } + return 0 +} + +func (x *LifecycleNoncurrentVersionExpiration) GetNoncurrentDays() int32 { + if x != nil { + return x.NoncurrentDays + } + return 0 +} + +type LifecycleAbortIncompleteMultipartUpload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the days since the initiation of an incomplete multipart upload that + // the system will wait before permanently removing all parts of the upload. + DaysAfterInitiation int32 `protobuf:"varint,1,opt,name=days_after_initiation,json=daysAfterInitiation,proto3" json:"days_after_initiation,omitempty"` +} + +func (x *LifecycleAbortIncompleteMultipartUpload) Reset() { + *x = LifecycleAbortIncompleteMultipartUpload{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleAbortIncompleteMultipartUpload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleAbortIncompleteMultipartUpload) ProtoMessage() {} + +func (x *LifecycleAbortIncompleteMultipartUpload) ProtoReflect() protoreflect.Message { + mi := &file_nebius_storage_v1_lifecycle_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LifecycleAbortIncompleteMultipartUpload.ProtoReflect.Descriptor instead. +func (*LifecycleAbortIncompleteMultipartUpload) Descriptor() ([]byte, []int) { + return file_nebius_storage_v1_lifecycle_proto_rawDescGZIP(), []int{5} +} + +func (x *LifecycleAbortIncompleteMultipartUpload) GetDaysAfterInitiation() int32 { + if x != nil { + return x.DaysAfterInitiation + } + return 0 +} + +var File_nebius_storage_v1_lifecycle_proto protoreflect.FileDescriptor + +var file_nebius_storage_v1_lifecycle_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, + 0x0a, 0x16, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x22, 0xbc, 0x04, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7b, 0x0a, + 0x1d, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x6e, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x21, 0x61, + 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x1e, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x3b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, + 0xab, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x42, 0x0a, 0x1e, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x1a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x47, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x3c, 0x0a, 0x1b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, + 0x4c, 0x65, 0x73, 0x73, 0x54, 0x68, 0x61, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xae, 0x01, + 0x0a, 0x13, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, + 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x3f, 0x0a, + 0x1c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x19, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x42, 0x0e, + 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x22, 0xae, + 0x01, 0x0a, 0x24, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x65, 0x72, + 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x17, 0x6e, 0x65, + 0x77, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x79, + 0x73, 0x42, 0x1c, 0x0a, 0x1a, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x5d, 0x0a, 0x27, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x61, + 0x79, 0x73, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x41, + 0x66, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5d, + 0x0a, 0x18, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_storage_v1_lifecycle_proto_rawDescOnce sync.Once + file_nebius_storage_v1_lifecycle_proto_rawDescData = file_nebius_storage_v1_lifecycle_proto_rawDesc +) + +func file_nebius_storage_v1_lifecycle_proto_rawDescGZIP() []byte { + file_nebius_storage_v1_lifecycle_proto_rawDescOnce.Do(func() { + file_nebius_storage_v1_lifecycle_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_storage_v1_lifecycle_proto_rawDescData) + }) + return file_nebius_storage_v1_lifecycle_proto_rawDescData +} + +var file_nebius_storage_v1_lifecycle_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_storage_v1_lifecycle_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_storage_v1_lifecycle_proto_goTypes = []any{ + (LifecycleRule_Status)(0), // 0: nebius.storage.v1.LifecycleRule.Status + (*LifecycleConfiguration)(nil), // 1: nebius.storage.v1.LifecycleConfiguration + (*LifecycleRule)(nil), // 2: nebius.storage.v1.LifecycleRule + (*LifecycleFilter)(nil), // 3: nebius.storage.v1.LifecycleFilter + (*LifecycleExpiration)(nil), // 4: nebius.storage.v1.LifecycleExpiration + (*LifecycleNoncurrentVersionExpiration)(nil), // 5: nebius.storage.v1.LifecycleNoncurrentVersionExpiration + (*LifecycleAbortIncompleteMultipartUpload)(nil), // 6: nebius.storage.v1.LifecycleAbortIncompleteMultipartUpload + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp +} +var file_nebius_storage_v1_lifecycle_proto_depIdxs = []int32{ + 2, // 0: nebius.storage.v1.LifecycleConfiguration.rules:type_name -> nebius.storage.v1.LifecycleRule + 0, // 1: nebius.storage.v1.LifecycleRule.status:type_name -> nebius.storage.v1.LifecycleRule.Status + 3, // 2: nebius.storage.v1.LifecycleRule.filter:type_name -> nebius.storage.v1.LifecycleFilter + 4, // 3: nebius.storage.v1.LifecycleRule.expiration:type_name -> nebius.storage.v1.LifecycleExpiration + 5, // 4: nebius.storage.v1.LifecycleRule.noncurrent_version_expiration:type_name -> nebius.storage.v1.LifecycleNoncurrentVersionExpiration + 6, // 5: nebius.storage.v1.LifecycleRule.abort_incomplete_multipart_upload:type_name -> nebius.storage.v1.LifecycleAbortIncompleteMultipartUpload + 7, // 6: nebius.storage.v1.LifecycleExpiration.date:type_name -> google.protobuf.Timestamp + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_storage_v1_lifecycle_proto_init() } +func file_nebius_storage_v1_lifecycle_proto_init() { + if File_nebius_storage_v1_lifecycle_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_storage_v1_lifecycle_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleExpiration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleNoncurrentVersionExpiration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*LifecycleAbortIncompleteMultipartUpload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[3].OneofWrappers = []any{ + (*LifecycleExpiration_Date)(nil), + (*LifecycleExpiration_Days)(nil), + } + file_nebius_storage_v1_lifecycle_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_storage_v1_lifecycle_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_storage_v1_lifecycle_proto_goTypes, + DependencyIndexes: file_nebius_storage_v1_lifecycle_proto_depIdxs, + EnumInfos: file_nebius_storage_v1_lifecycle_proto_enumTypes, + MessageInfos: file_nebius_storage_v1_lifecycle_proto_msgTypes, + }.Build() + File_nebius_storage_v1_lifecycle_proto = out.File + file_nebius_storage_v1_lifecycle_proto_rawDesc = nil + file_nebius_storage_v1_lifecycle_proto_goTypes = nil + file_nebius_storage_v1_lifecycle_proto_depIdxs = nil +} diff --git a/proto/nebius/storage/v1/lifecycle.sensitive.pb.go b/proto/nebius/storage/v1/lifecycle.sensitive.pb.go new file mode 100644 index 0000000..ea1f7b9 --- /dev/null +++ b/proto/nebius/storage/v1/lifecycle.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *LifecycleConfiguration) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleConfiguration) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LifecycleRule) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleRule) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LifecycleFilter) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleFilter) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LifecycleExpiration) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleExpiration) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LifecycleNoncurrentVersionExpiration) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleNoncurrentVersionExpiration) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LifecycleAbortIncompleteMultipartUpload) Sanitize() // is not generated as no sensitive fields found +// func (x *LifecycleAbortIncompleteMultipartUpload) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/allocation.pb.go b/proto/nebius/vpc/v1/allocation.pb.go new file mode 100644 index 0000000..77b2be1 --- /dev/null +++ b/proto/nebius/vpc/v1/allocation.pb.go @@ -0,0 +1,1086 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/allocation.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the Allocation. +type AllocationStatus_State int32 + +const ( + AllocationStatus_STATE_UNSPECIFIED AllocationStatus_State = 0 // Default state, unspecified. + AllocationStatus_CREATING AllocationStatus_State = 1 // Allocation is being created. + AllocationStatus_ALLOCATED AllocationStatus_State = 2 // Allocation is ready for use. + AllocationStatus_ASSIGNED AllocationStatus_State = 3 // Allocation is used. + AllocationStatus_DELETING AllocationStatus_State = 4 // Allocation is being deleted. +) + +// Enum value maps for AllocationStatus_State. +var ( + AllocationStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "ALLOCATED", + 3: "ASSIGNED", + 4: "DELETING", + } + AllocationStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ALLOCATED": 2, + "ASSIGNED": 3, + "DELETING": 4, + } +) + +func (x AllocationStatus_State) Enum() *AllocationStatus_State { + p := new(AllocationStatus_State) + *p = x + return p +} + +func (x AllocationStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AllocationStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_allocation_proto_enumTypes[0].Descriptor() +} + +func (AllocationStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_allocation_proto_enumTypes[0] +} + +func (x AllocationStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AllocationStatus_State.Descriptor instead. +func (AllocationStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{4, 0} +} + +type Allocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the Allocation. + // `metadata.parent_id` represents IAM Container. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specifications for the allocation, detailing its name and IP configuration. + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Contains the current status of the allocation, indicating its state and any additional details. + Status *AllocationStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Allocation) Reset() { + *x = Allocation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Allocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Allocation) ProtoMessage() {} + +func (x *Allocation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Allocation.ProtoReflect.Descriptor instead. +func (*Allocation) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{0} +} + +func (x *Allocation) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Allocation) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Allocation) GetStatus() *AllocationStatus { + if x != nil { + return x.Status + } + return nil +} + +type AllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Holds the IP specifications for the allocation, including the type of IP (IPv4 or IPv6) and its corresponding configuration. + // + // Types that are assignable to IpSpec: + // + // *AllocationSpec_Ipv4Private + // *AllocationSpec_Ipv4Public + IpSpec isAllocationSpec_IpSpec `protobuf_oneof:"ip_spec"` +} + +func (x *AllocationSpec) Reset() { + *x = AllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationSpec) ProtoMessage() {} + +func (x *AllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationSpec.ProtoReflect.Descriptor instead. +func (*AllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{1} +} + +func (m *AllocationSpec) GetIpSpec() isAllocationSpec_IpSpec { + if m != nil { + return m.IpSpec + } + return nil +} + +func (x *AllocationSpec) GetIpv4Private() *IPv4PrivateAllocationSpec { + if x, ok := x.GetIpSpec().(*AllocationSpec_Ipv4Private); ok { + return x.Ipv4Private + } + return nil +} + +func (x *AllocationSpec) GetIpv4Public() *IPv4PublicAllocationSpec { + if x, ok := x.GetIpSpec().(*AllocationSpec_Ipv4Public); ok { + return x.Ipv4Public + } + return nil +} + +type isAllocationSpec_IpSpec interface { + isAllocationSpec_IpSpec() +} + +type AllocationSpec_Ipv4Private struct { + Ipv4Private *IPv4PrivateAllocationSpec `protobuf:"bytes,1,opt,name=ipv4_private,json=ipv4Private,proto3,oneof"` +} + +type AllocationSpec_Ipv4Public struct { + Ipv4Public *IPv4PublicAllocationSpec `protobuf:"bytes,2,opt,name=ipv4_public,json=ipv4Public,proto3,oneof"` +} + +func (*AllocationSpec_Ipv4Private) isAllocationSpec_IpSpec() {} + +func (*AllocationSpec_Ipv4Public) isAllocationSpec_IpSpec() {} + +type IPv4PrivateAllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block for IPv4 Allocation. + // May be a single IP address (such as 10.2.3.4), + // a prefix length (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). + // Random address (/32) from pool would be allocated if field is omitted. + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // Types that are assignable to Pool: + // + // *IPv4PrivateAllocationSpec_SubnetId + // *IPv4PrivateAllocationSpec_PoolId + Pool isIPv4PrivateAllocationSpec_Pool `protobuf_oneof:"pool"` +} + +func (x *IPv4PrivateAllocationSpec) Reset() { + *x = IPv4PrivateAllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PrivateAllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PrivateAllocationSpec) ProtoMessage() {} + +func (x *IPv4PrivateAllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PrivateAllocationSpec.ProtoReflect.Descriptor instead. +func (*IPv4PrivateAllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{2} +} + +func (x *IPv4PrivateAllocationSpec) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (m *IPv4PrivateAllocationSpec) GetPool() isIPv4PrivateAllocationSpec_Pool { + if m != nil { + return m.Pool + } + return nil +} + +func (x *IPv4PrivateAllocationSpec) GetSubnetId() string { + if x, ok := x.GetPool().(*IPv4PrivateAllocationSpec_SubnetId); ok { + return x.SubnetId + } + return "" +} + +func (x *IPv4PrivateAllocationSpec) GetPoolId() string { + if x, ok := x.GetPool().(*IPv4PrivateAllocationSpec_PoolId); ok { + return x.PoolId + } + return "" +} + +type isIPv4PrivateAllocationSpec_Pool interface { + isIPv4PrivateAllocationSpec_Pool() +} + +type IPv4PrivateAllocationSpec_SubnetId struct { + // Subnet ID. + // Required same subnet to use allocation in subnet-resources (e.g. Network Interface) + SubnetId string `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3,oneof"` +} + +type IPv4PrivateAllocationSpec_PoolId struct { + // Pool for the IPv4 private allocation. + PoolId string `protobuf:"bytes,3,opt,name=pool_id,json=poolId,proto3,oneof"` +} + +func (*IPv4PrivateAllocationSpec_SubnetId) isIPv4PrivateAllocationSpec_Pool() {} + +func (*IPv4PrivateAllocationSpec_PoolId) isIPv4PrivateAllocationSpec_Pool() {} + +type IPv4PublicAllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block for IPv4 Allocation. + // May be a single IP address (such as 10.2.3.4), + // a prefix length (such as /32) or a CIDR-formatted string (such as 10.1.2.0/32). + // Random address (/32) from pool would be allocated if field is omitted. + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // Types that are assignable to Pool: + // + // *IPv4PublicAllocationSpec_SubnetId + // *IPv4PublicAllocationSpec_PoolId + Pool isIPv4PublicAllocationSpec_Pool `protobuf_oneof:"pool"` +} + +func (x *IPv4PublicAllocationSpec) Reset() { + *x = IPv4PublicAllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PublicAllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PublicAllocationSpec) ProtoMessage() {} + +func (x *IPv4PublicAllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PublicAllocationSpec.ProtoReflect.Descriptor instead. +func (*IPv4PublicAllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{3} +} + +func (x *IPv4PublicAllocationSpec) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (m *IPv4PublicAllocationSpec) GetPool() isIPv4PublicAllocationSpec_Pool { + if m != nil { + return m.Pool + } + return nil +} + +func (x *IPv4PublicAllocationSpec) GetSubnetId() string { + if x, ok := x.GetPool().(*IPv4PublicAllocationSpec_SubnetId); ok { + return x.SubnetId + } + return "" +} + +func (x *IPv4PublicAllocationSpec) GetPoolId() string { + if x, ok := x.GetPool().(*IPv4PublicAllocationSpec_PoolId); ok { + return x.PoolId + } + return "" +} + +type isIPv4PublicAllocationSpec_Pool interface { + isIPv4PublicAllocationSpec_Pool() +} + +type IPv4PublicAllocationSpec_SubnetId struct { + // Subnet ID. + // Required same subnet to use allocation in subnet-resources (e.g. Network Interface) + SubnetId string `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3,oneof"` +} + +type IPv4PublicAllocationSpec_PoolId struct { + // Pool for the IPv4 public allocation. + PoolId string `protobuf:"bytes,3,opt,name=pool_id,json=poolId,proto3,oneof"` +} + +func (*IPv4PublicAllocationSpec_SubnetId) isIPv4PublicAllocationSpec_Pool() {} + +func (*IPv4PublicAllocationSpec_PoolId) isIPv4PublicAllocationSpec_Pool() {} + +type AllocationStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field represents the current state of the allocation. + State AllocationStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1.AllocationStatus_State" json:"state,omitempty"` + // Detailed information about the allocation status, + // including the allocated CIDR, pool ID and IP version. + Details *AllocationDetails `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` + // Information about the assignment associated with the allocation, + // such as network interface or load balancer assignment. + Assignment *Assignment `protobuf:"bytes,3,opt,name=assignment,proto3" json:"assignment,omitempty"` + // If false - Lifecycle of allocation depends on resource that using it. + Static bool `protobuf:"varint,4,opt,name=static,proto3" json:"static,omitempty"` +} + +func (x *AllocationStatus) Reset() { + *x = AllocationStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationStatus) ProtoMessage() {} + +func (x *AllocationStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationStatus.ProtoReflect.Descriptor instead. +func (*AllocationStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{4} +} + +func (x *AllocationStatus) GetState() AllocationStatus_State { + if x != nil { + return x.State + } + return AllocationStatus_STATE_UNSPECIFIED +} + +func (x *AllocationStatus) GetDetails() *AllocationDetails { + if x != nil { + return x.Details + } + return nil +} + +func (x *AllocationStatus) GetAssignment() *Assignment { + if x != nil { + return x.Assignment + } + return nil +} + +func (x *AllocationStatus) GetStatic() bool { + if x != nil { + return x.Static + } + return false +} + +type AllocationDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AllocatedCidr string `protobuf:"bytes,1,opt,name=allocated_cidr,json=allocatedCidr,proto3" json:"allocated_cidr,omitempty"` + PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Version IpVersion `protobuf:"varint,4,opt,name=version,proto3,enum=nebius.vpc.v1.IpVersion" json:"version,omitempty"` +} + +func (x *AllocationDetails) Reset() { + *x = AllocationDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationDetails) ProtoMessage() {} + +func (x *AllocationDetails) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationDetails.ProtoReflect.Descriptor instead. +func (*AllocationDetails) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{5} +} + +func (x *AllocationDetails) GetAllocatedCidr() string { + if x != nil { + return x.AllocatedCidr + } + return "" +} + +func (x *AllocationDetails) GetPoolId() string { + if x != nil { + return x.PoolId + } + return "" +} + +func (x *AllocationDetails) GetVersion() IpVersion { + if x != nil { + return x.Version + } + return IpVersion_IP_VERSION_UNSPECIFIED +} + +type Assignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field specifies the type of assignment associated with the allocation, + // which could be a network interface or load balancer assignment. + // + // Types that are assignable to Type: + // + // *Assignment_NetworkInterface + // *Assignment_LoadBalancer + Type isAssignment_Type `protobuf_oneof:"type"` +} + +func (x *Assignment) Reset() { + *x = Assignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Assignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Assignment) ProtoMessage() {} + +func (x *Assignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Assignment.ProtoReflect.Descriptor instead. +func (*Assignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{6} +} + +func (m *Assignment) GetType() isAssignment_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Assignment) GetNetworkInterface() *NetworkInterfaceAssignment { + if x, ok := x.GetType().(*Assignment_NetworkInterface); ok { + return x.NetworkInterface + } + return nil +} + +func (x *Assignment) GetLoadBalancer() *LoadBalancerAssignment { + if x, ok := x.GetType().(*Assignment_LoadBalancer); ok { + return x.LoadBalancer + } + return nil +} + +type isAssignment_Type interface { + isAssignment_Type() +} + +type Assignment_NetworkInterface struct { + NetworkInterface *NetworkInterfaceAssignment `protobuf:"bytes,1,opt,name=network_interface,json=networkInterface,proto3,oneof"` +} + +type Assignment_LoadBalancer struct { + LoadBalancer *LoadBalancerAssignment `protobuf:"bytes,2,opt,name=load_balancer,json=loadBalancer,proto3,oneof"` +} + +func (*Assignment_NetworkInterface) isAssignment_Type() {} + +func (*Assignment_LoadBalancer) isAssignment_Type() {} + +type NetworkInterfaceAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Compute instance network interface belongs to. + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // Network interface name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *NetworkInterfaceAssignment) Reset() { + *x = NetworkInterfaceAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceAssignment) ProtoMessage() {} + +func (x *NetworkInterfaceAssignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceAssignment.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceAssignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{7} +} + +func (x *NetworkInterfaceAssignment) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *NetworkInterfaceAssignment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type LoadBalancerAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Load Balancer. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *LoadBalancerAssignment) Reset() { + *x = LoadBalancerAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadBalancerAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancerAssignment) ProtoMessage() {} + +func (x *LoadBalancerAssignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadBalancerAssignment.ProtoReflect.Descriptor instead. +func (*LoadBalancerAssignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_proto_rawDescGZIP(), []int{8} +} + +func (x *LoadBalancerAssignment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_vpc_v1_allocation_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_allocation_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc9, 0x01, 0x0a, + 0x0e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x53, 0x0a, 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x04, 0xba, 0x4a, 0x01, 0x06, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x42, 0x10, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0xc3, 0x02, 0x0a, 0x19, 0x49, 0x50, 0x76, + 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0xcc, 0x01, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xb7, 0x01, 0xba, 0x48, 0xaf, 0x01, 0xba, 0x01, 0xab, 0x01, + 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, + 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, + 0x61, 0x73, 0x6b, 0x1a, 0x66, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, + 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x32, 0x5d, 0x5b, + 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x33, 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x34, 0x29, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x28, 0x34, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x4a, 0x01, 0x02, 0x52, + 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x23, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, + 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, + 0x02, 0x48, 0x00, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x42, 0x11, 0x0a, 0x04, 0x70, + 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0xba, 0x48, 0x02, 0x08, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x22, 0xc2, + 0x02, 0x0a, 0x18, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0xcc, 0x01, 0x0a, 0x04, + 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xb7, 0x01, 0xba, 0x48, 0xaf, + 0x01, 0xba, 0x01, 0xab, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, + 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x66, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, + 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, + 0x31, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x33, 0x5b, 0x30, 0x2d, 0x32, 0x5d, + 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, + 0x70, 0x28, 0x34, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, + 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x34, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, + 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x23, 0x0a, 0x09, 0x73, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, + 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, + 0x42, 0x11, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0xba, 0x48, 0x02, 0x08, 0x01, 0xba, + 0x4a, 0x01, 0x02, 0x22, 0xb7, 0x02, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x22, 0x57, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, + 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x22, 0x87, 0x01, + 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x69, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, + 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xbc, 0x01, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x12, 0x4c, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0c, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x1a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x4c, 0x6f, 0x61, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x42, 0x56, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_allocation_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_allocation_proto_rawDescData = file_nebius_vpc_v1_allocation_proto_rawDesc +) + +func file_nebius_vpc_v1_allocation_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_allocation_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_allocation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_allocation_proto_rawDescData) + }) + return file_nebius_vpc_v1_allocation_proto_rawDescData +} + +var file_nebius_vpc_v1_allocation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1_allocation_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_vpc_v1_allocation_proto_goTypes = []any{ + (AllocationStatus_State)(0), // 0: nebius.vpc.v1.AllocationStatus.State + (*Allocation)(nil), // 1: nebius.vpc.v1.Allocation + (*AllocationSpec)(nil), // 2: nebius.vpc.v1.AllocationSpec + (*IPv4PrivateAllocationSpec)(nil), // 3: nebius.vpc.v1.IPv4PrivateAllocationSpec + (*IPv4PublicAllocationSpec)(nil), // 4: nebius.vpc.v1.IPv4PublicAllocationSpec + (*AllocationStatus)(nil), // 5: nebius.vpc.v1.AllocationStatus + (*AllocationDetails)(nil), // 6: nebius.vpc.v1.AllocationDetails + (*Assignment)(nil), // 7: nebius.vpc.v1.Assignment + (*NetworkInterfaceAssignment)(nil), // 8: nebius.vpc.v1.NetworkInterfaceAssignment + (*LoadBalancerAssignment)(nil), // 9: nebius.vpc.v1.LoadBalancerAssignment + (*v1.ResourceMetadata)(nil), // 10: nebius.common.v1.ResourceMetadata + (IpVersion)(0), // 11: nebius.vpc.v1.IpVersion +} +var file_nebius_vpc_v1_allocation_proto_depIdxs = []int32{ + 10, // 0: nebius.vpc.v1.Allocation.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1.Allocation.spec:type_name -> nebius.vpc.v1.AllocationSpec + 5, // 2: nebius.vpc.v1.Allocation.status:type_name -> nebius.vpc.v1.AllocationStatus + 3, // 3: nebius.vpc.v1.AllocationSpec.ipv4_private:type_name -> nebius.vpc.v1.IPv4PrivateAllocationSpec + 4, // 4: nebius.vpc.v1.AllocationSpec.ipv4_public:type_name -> nebius.vpc.v1.IPv4PublicAllocationSpec + 0, // 5: nebius.vpc.v1.AllocationStatus.state:type_name -> nebius.vpc.v1.AllocationStatus.State + 6, // 6: nebius.vpc.v1.AllocationStatus.details:type_name -> nebius.vpc.v1.AllocationDetails + 7, // 7: nebius.vpc.v1.AllocationStatus.assignment:type_name -> nebius.vpc.v1.Assignment + 11, // 8: nebius.vpc.v1.AllocationDetails.version:type_name -> nebius.vpc.v1.IpVersion + 8, // 9: nebius.vpc.v1.Assignment.network_interface:type_name -> nebius.vpc.v1.NetworkInterfaceAssignment + 9, // 10: nebius.vpc.v1.Assignment.load_balancer:type_name -> nebius.vpc.v1.LoadBalancerAssignment + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_allocation_proto_init() } +func file_nebius_vpc_v1_allocation_proto_init() { + if File_nebius_vpc_v1_allocation_proto != nil { + return + } + file_nebius_vpc_v1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_allocation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Allocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PrivateAllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PublicAllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*AllocationStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*AllocationDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*Assignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*LoadBalancerAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_vpc_v1_allocation_proto_msgTypes[1].OneofWrappers = []any{ + (*AllocationSpec_Ipv4Private)(nil), + (*AllocationSpec_Ipv4Public)(nil), + } + file_nebius_vpc_v1_allocation_proto_msgTypes[2].OneofWrappers = []any{ + (*IPv4PrivateAllocationSpec_SubnetId)(nil), + (*IPv4PrivateAllocationSpec_PoolId)(nil), + } + file_nebius_vpc_v1_allocation_proto_msgTypes[3].OneofWrappers = []any{ + (*IPv4PublicAllocationSpec_SubnetId)(nil), + (*IPv4PublicAllocationSpec_PoolId)(nil), + } + file_nebius_vpc_v1_allocation_proto_msgTypes[6].OneofWrappers = []any{ + (*Assignment_NetworkInterface)(nil), + (*Assignment_LoadBalancer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_allocation_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1_allocation_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_allocation_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1_allocation_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1_allocation_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_allocation_proto = out.File + file_nebius_vpc_v1_allocation_proto_rawDesc = nil + file_nebius_vpc_v1_allocation_proto_goTypes = nil + file_nebius_vpc_v1_allocation_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/allocation.sensitive.pb.go b/proto/nebius/vpc/v1/allocation.sensitive.pb.go new file mode 100644 index 0000000..e63967d --- /dev/null +++ b/proto/nebius/vpc/v1/allocation.sensitive.pb.go @@ -0,0 +1,30 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Allocation) Sanitize() // is not generated as no sensitive fields found +// func (x *Allocation) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PrivateAllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PrivateAllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PublicAllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PublicAllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationDetails) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationDetails) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Assignment) Sanitize() // is not generated as no sensitive fields found +// func (x *Assignment) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceAssignment) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceAssignment) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LoadBalancerAssignment) Sanitize() // is not generated as no sensitive fields found +// func (x *LoadBalancerAssignment) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/allocation_service.pb.go b/proto/nebius/vpc/v1/allocation_service.pb.go new file mode 100644 index 0000000..f296209 --- /dev/null +++ b/proto/nebius/vpc/v1/allocation_service.pb.go @@ -0,0 +1,664 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/allocation_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAllocationRequest) Reset() { + *x = GetAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllocationRequest) ProtoMessage() {} + +func (x *GetAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllocationRequest.ProtoReflect.Descriptor instead. +func (*GetAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetAllocationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetAllocationByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAllocationByNameRequest) Reset() { + *x = GetAllocationByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllocationByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllocationByNameRequest) ProtoMessage() {} + +func (x *GetAllocationByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllocationByNameRequest.ProtoReflect.Descriptor instead. +func (*GetAllocationByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAllocationByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetAllocationByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListAllocationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAllocationsRequest) Reset() { + *x = ListAllocationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllocationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllocationsRequest) ProtoMessage() {} + +func (x *ListAllocationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllocationsRequest.ProtoReflect.Descriptor instead. +func (*ListAllocationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAllocationsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListAllocationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAllocationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListAllocationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Allocation `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAllocationsResponse) Reset() { + *x = ListAllocationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllocationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllocationsResponse) ProtoMessage() {} + +func (x *ListAllocationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllocationsResponse.ProtoReflect.Descriptor instead. +func (*ListAllocationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAllocationsResponse) GetItems() []*Allocation { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListAllocationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateAllocationRequest) Reset() { + *x = CreateAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAllocationRequest) ProtoMessage() {} + +func (x *CreateAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAllocationRequest.ProtoReflect.Descriptor instead. +func (*CreateAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateAllocationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateAllocationRequest) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateAllocationRequest) Reset() { + *x = UpdateAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAllocationRequest) ProtoMessage() {} + +func (x *UpdateAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAllocationRequest.ProtoReflect.Descriptor instead. +func (*UpdateAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateAllocationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateAllocationRequest) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteAllocationRequest) Reset() { + *x = DeleteAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAllocationRequest) ProtoMessage() {} + +func (x *DeleteAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_allocation_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAllocationRequest.ProtoReflect.Descriptor instead. +func (*DeleteAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteAllocationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_vpc_v1_allocation_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_allocation_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x79, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x72, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x8c, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xf1, 0x03, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5d, 0x0a, 0x14, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x42, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_vpc_v1_allocation_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_allocation_service_proto_rawDescData = file_nebius_vpc_v1_allocation_service_proto_rawDesc +) + +func file_nebius_vpc_v1_allocation_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_allocation_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_allocation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_allocation_service_proto_rawDescData) + }) + return file_nebius_vpc_v1_allocation_service_proto_rawDescData +} + +var file_nebius_vpc_v1_allocation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_vpc_v1_allocation_service_proto_goTypes = []any{ + (*GetAllocationRequest)(nil), // 0: nebius.vpc.v1.GetAllocationRequest + (*GetAllocationByNameRequest)(nil), // 1: nebius.vpc.v1.GetAllocationByNameRequest + (*ListAllocationsRequest)(nil), // 2: nebius.vpc.v1.ListAllocationsRequest + (*ListAllocationsResponse)(nil), // 3: nebius.vpc.v1.ListAllocationsResponse + (*CreateAllocationRequest)(nil), // 4: nebius.vpc.v1.CreateAllocationRequest + (*UpdateAllocationRequest)(nil), // 5: nebius.vpc.v1.UpdateAllocationRequest + (*DeleteAllocationRequest)(nil), // 6: nebius.vpc.v1.DeleteAllocationRequest + (*Allocation)(nil), // 7: nebius.vpc.v1.Allocation + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*AllocationSpec)(nil), // 9: nebius.vpc.v1.AllocationSpec + (*v1.Operation)(nil), // 10: nebius.common.v1.Operation +} +var file_nebius_vpc_v1_allocation_service_proto_depIdxs = []int32{ + 7, // 0: nebius.vpc.v1.ListAllocationsResponse.items:type_name -> nebius.vpc.v1.Allocation + 8, // 1: nebius.vpc.v1.CreateAllocationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 2: nebius.vpc.v1.CreateAllocationRequest.spec:type_name -> nebius.vpc.v1.AllocationSpec + 8, // 3: nebius.vpc.v1.UpdateAllocationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 4: nebius.vpc.v1.UpdateAllocationRequest.spec:type_name -> nebius.vpc.v1.AllocationSpec + 0, // 5: nebius.vpc.v1.AllocationService.Get:input_type -> nebius.vpc.v1.GetAllocationRequest + 1, // 6: nebius.vpc.v1.AllocationService.GetByName:input_type -> nebius.vpc.v1.GetAllocationByNameRequest + 2, // 7: nebius.vpc.v1.AllocationService.List:input_type -> nebius.vpc.v1.ListAllocationsRequest + 4, // 8: nebius.vpc.v1.AllocationService.Create:input_type -> nebius.vpc.v1.CreateAllocationRequest + 5, // 9: nebius.vpc.v1.AllocationService.Update:input_type -> nebius.vpc.v1.UpdateAllocationRequest + 6, // 10: nebius.vpc.v1.AllocationService.Delete:input_type -> nebius.vpc.v1.DeleteAllocationRequest + 7, // 11: nebius.vpc.v1.AllocationService.Get:output_type -> nebius.vpc.v1.Allocation + 7, // 12: nebius.vpc.v1.AllocationService.GetByName:output_type -> nebius.vpc.v1.Allocation + 3, // 13: nebius.vpc.v1.AllocationService.List:output_type -> nebius.vpc.v1.ListAllocationsResponse + 10, // 14: nebius.vpc.v1.AllocationService.Create:output_type -> nebius.common.v1.Operation + 10, // 15: nebius.vpc.v1.AllocationService.Update:output_type -> nebius.common.v1.Operation + 10, // 16: nebius.vpc.v1.AllocationService.Delete:output_type -> nebius.common.v1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_allocation_service_proto_init() } +func file_nebius_vpc_v1_allocation_service_proto_init() { + if File_nebius_vpc_v1_allocation_service_proto != nil { + return + } + file_nebius_vpc_v1_allocation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_allocation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetAllocationByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListAllocationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListAllocationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_allocation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_allocation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1_allocation_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_allocation_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1_allocation_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_allocation_service_proto = out.File + file_nebius_vpc_v1_allocation_service_proto_rawDesc = nil + file_nebius_vpc_v1_allocation_service_proto_goTypes = nil + file_nebius_vpc_v1_allocation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/allocation_service.sensitive.pb.go b/proto/nebius/vpc/v1/allocation_service.sensitive.pb.go new file mode 100644 index 0000000..62f7622 --- /dev/null +++ b/proto/nebius/vpc/v1/allocation_service.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAllocationByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAllocationByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAllocationsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAllocationsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAllocationsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAllocationsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/allocation_service_grpc.pb.go b/proto/nebius/vpc/v1/allocation_service_grpc.pb.go new file mode 100644 index 0000000..95e4a0e --- /dev/null +++ b/proto/nebius/vpc/v1/allocation_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1/allocation_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AllocationService_Get_FullMethodName = "/nebius.vpc.v1.AllocationService/Get" + AllocationService_GetByName_FullMethodName = "/nebius.vpc.v1.AllocationService/GetByName" + AllocationService_List_FullMethodName = "/nebius.vpc.v1.AllocationService/List" + AllocationService_Create_FullMethodName = "/nebius.vpc.v1.AllocationService/Create" + AllocationService_Update_FullMethodName = "/nebius.vpc.v1.AllocationService/Update" + AllocationService_Delete_FullMethodName = "/nebius.vpc.v1.AllocationService/Delete" +) + +// AllocationServiceClient is the client API for AllocationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AllocationServiceClient interface { + Get(ctx context.Context, in *GetAllocationRequest, opts ...grpc.CallOption) (*Allocation, error) + GetByName(ctx context.Context, in *GetAllocationByNameRequest, opts ...grpc.CallOption) (*Allocation, error) + List(ctx context.Context, in *ListAllocationsRequest, opts ...grpc.CallOption) (*ListAllocationsResponse, error) + Create(ctx context.Context, in *CreateAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Update(ctx context.Context, in *UpdateAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) + Delete(ctx context.Context, in *DeleteAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type allocationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAllocationServiceClient(cc grpc.ClientConnInterface) AllocationServiceClient { + return &allocationServiceClient{cc} +} + +func (c *allocationServiceClient) Get(ctx context.Context, in *GetAllocationRequest, opts ...grpc.CallOption) (*Allocation, error) { + out := new(Allocation) + err := c.cc.Invoke(ctx, AllocationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) GetByName(ctx context.Context, in *GetAllocationByNameRequest, opts ...grpc.CallOption) (*Allocation, error) { + out := new(Allocation) + err := c.cc.Invoke(ctx, AllocationService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) List(ctx context.Context, in *ListAllocationsRequest, opts ...grpc.CallOption) (*ListAllocationsResponse, error) { + out := new(ListAllocationsResponse) + err := c.cc.Invoke(ctx, AllocationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Create(ctx context.Context, in *CreateAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Update(ctx context.Context, in *UpdateAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Delete(ctx context.Context, in *DeleteAllocationRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AllocationServiceServer is the server API for AllocationService service. +// All implementations should embed UnimplementedAllocationServiceServer +// for forward compatibility +type AllocationServiceServer interface { + Get(context.Context, *GetAllocationRequest) (*Allocation, error) + GetByName(context.Context, *GetAllocationByNameRequest) (*Allocation, error) + List(context.Context, *ListAllocationsRequest) (*ListAllocationsResponse, error) + Create(context.Context, *CreateAllocationRequest) (*v1.Operation, error) + Update(context.Context, *UpdateAllocationRequest) (*v1.Operation, error) + Delete(context.Context, *DeleteAllocationRequest) (*v1.Operation, error) +} + +// UnimplementedAllocationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedAllocationServiceServer struct { +} + +func (UnimplementedAllocationServiceServer) Get(context.Context, *GetAllocationRequest) (*Allocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedAllocationServiceServer) GetByName(context.Context, *GetAllocationByNameRequest) (*Allocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedAllocationServiceServer) List(context.Context, *ListAllocationsRequest) (*ListAllocationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedAllocationServiceServer) Create(context.Context, *CreateAllocationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedAllocationServiceServer) Update(context.Context, *UpdateAllocationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedAllocationServiceServer) Delete(context.Context, *DeleteAllocationRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeAllocationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AllocationServiceServer will +// result in compilation errors. +type UnsafeAllocationServiceServer interface { + mustEmbedUnimplementedAllocationServiceServer() +} + +func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer) { + s.RegisterService(&AllocationService_ServiceDesc, srv) +} + +func _AllocationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Get(ctx, req.(*GetAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllocationByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).GetByName(ctx, req.(*GetAllocationByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAllocationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).List(ctx, req.(*ListAllocationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Create(ctx, req.(*CreateAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Update(ctx, req.(*UpdateAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Delete(ctx, req.(*DeleteAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AllocationService_ServiceDesc is the grpc.ServiceDesc for AllocationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AllocationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1.AllocationService", + HandlerType: (*AllocationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _AllocationService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _AllocationService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _AllocationService_List_Handler, + }, + { + MethodName: "Create", + Handler: _AllocationService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _AllocationService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _AllocationService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1/allocation_service.proto", +} diff --git a/proto/nebius/vpc/v1/network.pb.go b/proto/nebius/vpc/v1/network.pb.go new file mode 100644 index 0000000..c53c213 --- /dev/null +++ b/proto/nebius/vpc/v1/network.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/network.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the network. +type NetworkStatus_State int32 + +const ( + NetworkStatus_STATE_UNSPECIFIED NetworkStatus_State = 0 // Default state, unspecified. + NetworkStatus_CREATING NetworkStatus_State = 1 // Network is being created. + NetworkStatus_READY NetworkStatus_State = 2 // Network is ready for use. + NetworkStatus_DELETING NetworkStatus_State = 3 // Network is being deleted. +) + +// Enum value maps for NetworkStatus_State. +var ( + NetworkStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + NetworkStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x NetworkStatus_State) Enum() *NetworkStatus_State { + p := new(NetworkStatus_State) + *p = x + return p +} + +func (x NetworkStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NetworkStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_network_proto_enumTypes[0].Descriptor() +} + +func (NetworkStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_network_proto_enumTypes[0] +} + +func (x NetworkStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NetworkStatus_State.Descriptor instead. +func (NetworkStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{5, 0} +} + +// Defines a Network, which serves as a virtual representation of a traditional LAN +// within a cloud environment. +// Networks facilitate communication between subnets. +type Network struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the network resource. + // `metadata.parent_id` represents IAM container + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the network. + Spec *NetworkSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status of the network. + Status *NetworkStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Network) Reset() { + *x = Network{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Network) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Network) ProtoMessage() {} + +func (x *Network) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Network.ProtoReflect.Descriptor instead. +func (*Network) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{0} +} + +func (x *Network) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Network) GetSpec() *NetworkSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Network) GetStatus() *NetworkStatus { + if x != nil { + return x.Status + } + return nil +} + +type NetworkSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pools for private ipv4 addresses. + // Default private pools will be created if not specified. + Ipv4PrivatePools *IPv4PrivateNetworkPools `protobuf:"bytes,1,opt,name=ipv4_private_pools,json=ipv4PrivatePools,proto3" json:"ipv4_private_pools,omitempty"` + // Pools for public ipv4 addresses. + // Default public pool will be used if not specified. + Ipv4PublicPools *IPv4PublicNetworkPools `protobuf:"bytes,2,opt,name=ipv4_public_pools,json=ipv4PublicPools,proto3" json:"ipv4_public_pools,omitempty"` +} + +func (x *NetworkSpec) Reset() { + *x = NetworkSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkSpec) ProtoMessage() {} + +func (x *NetworkSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkSpec.ProtoReflect.Descriptor instead. +func (*NetworkSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{1} +} + +func (x *NetworkSpec) GetIpv4PrivatePools() *IPv4PrivateNetworkPools { + if x != nil { + return x.Ipv4PrivatePools + } + return nil +} + +func (x *NetworkSpec) GetIpv4PublicPools() *IPv4PublicNetworkPools { + if x != nil { + return x.Ipv4PublicPools + } + return nil +} + +type IPv4PrivateNetworkPools struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pools []*NetworkPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` +} + +func (x *IPv4PrivateNetworkPools) Reset() { + *x = IPv4PrivateNetworkPools{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PrivateNetworkPools) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PrivateNetworkPools) ProtoMessage() {} + +func (x *IPv4PrivateNetworkPools) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PrivateNetworkPools.ProtoReflect.Descriptor instead. +func (*IPv4PrivateNetworkPools) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{2} +} + +func (x *IPv4PrivateNetworkPools) GetPools() []*NetworkPool { + if x != nil { + return x.Pools + } + return nil +} + +type IPv4PublicNetworkPools struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pools []*NetworkPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` +} + +func (x *IPv4PublicNetworkPools) Reset() { + *x = IPv4PublicNetworkPools{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PublicNetworkPools) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PublicNetworkPools) ProtoMessage() {} + +func (x *IPv4PublicNetworkPools) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PublicNetworkPools.ProtoReflect.Descriptor instead. +func (*IPv4PublicNetworkPools) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{3} +} + +func (x *IPv4PublicNetworkPools) GetPools() []*NetworkPool { + if x != nil { + return x.Pools + } + return nil +} + +type NetworkPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *NetworkPool) Reset() { + *x = NetworkPool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkPool) ProtoMessage() {} + +func (x *NetworkPool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkPool.ProtoReflect.Descriptor instead. +func (*NetworkPool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{4} +} + +func (x *NetworkPool) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type NetworkStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the network. + State NetworkStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1.NetworkStatus_State" json:"state,omitempty"` +} + +func (x *NetworkStatus) Reset() { + *x = NetworkStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkStatus) ProtoMessage() {} + +func (x *NetworkStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkStatus.ProtoReflect.Descriptor instead. +func (*NetworkStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_proto_rawDescGZIP(), []int{5} +} + +func (x *NetworkStatus) GetState() NetworkStatus_State { + if x != nil { + return x.State + } + return NetworkStatus_STATE_UNSPECIFIED +} + +var File_nebius_vpc_v1_network_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_network_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, + 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x2e, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x5a, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, + 0x52, 0x10, 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, + 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x34, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x4b, 0x0a, 0x17, 0x49, + 0x50, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x49, 0x50, 0x76, 0x34, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, + 0x6c, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, + 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x25, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x0d, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, + 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x53, + 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_network_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_network_proto_rawDescData = file_nebius_vpc_v1_network_proto_rawDesc +) + +func file_nebius_vpc_v1_network_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_network_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_network_proto_rawDescData) + }) + return file_nebius_vpc_v1_network_proto_rawDescData +} + +var file_nebius_vpc_v1_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_vpc_v1_network_proto_goTypes = []any{ + (NetworkStatus_State)(0), // 0: nebius.vpc.v1.NetworkStatus.State + (*Network)(nil), // 1: nebius.vpc.v1.Network + (*NetworkSpec)(nil), // 2: nebius.vpc.v1.NetworkSpec + (*IPv4PrivateNetworkPools)(nil), // 3: nebius.vpc.v1.IPv4PrivateNetworkPools + (*IPv4PublicNetworkPools)(nil), // 4: nebius.vpc.v1.IPv4PublicNetworkPools + (*NetworkPool)(nil), // 5: nebius.vpc.v1.NetworkPool + (*NetworkStatus)(nil), // 6: nebius.vpc.v1.NetworkStatus + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata +} +var file_nebius_vpc_v1_network_proto_depIdxs = []int32{ + 7, // 0: nebius.vpc.v1.Network.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1.Network.spec:type_name -> nebius.vpc.v1.NetworkSpec + 6, // 2: nebius.vpc.v1.Network.status:type_name -> nebius.vpc.v1.NetworkStatus + 3, // 3: nebius.vpc.v1.NetworkSpec.ipv4_private_pools:type_name -> nebius.vpc.v1.IPv4PrivateNetworkPools + 4, // 4: nebius.vpc.v1.NetworkSpec.ipv4_public_pools:type_name -> nebius.vpc.v1.IPv4PublicNetworkPools + 5, // 5: nebius.vpc.v1.IPv4PrivateNetworkPools.pools:type_name -> nebius.vpc.v1.NetworkPool + 5, // 6: nebius.vpc.v1.IPv4PublicNetworkPools.pools:type_name -> nebius.vpc.v1.NetworkPool + 0, // 7: nebius.vpc.v1.NetworkStatus.state:type_name -> nebius.vpc.v1.NetworkStatus.State + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_network_proto_init() } +func file_nebius_vpc_v1_network_proto_init() { + if File_nebius_vpc_v1_network_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_network_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Network); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NetworkSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PrivateNetworkPools); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PublicNetworkPools); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*NetworkPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*NetworkStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_network_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1_network_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_network_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1_network_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1_network_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_network_proto = out.File + file_nebius_vpc_v1_network_proto_rawDesc = nil + file_nebius_vpc_v1_network_proto_goTypes = nil + file_nebius_vpc_v1_network_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/network.sensitive.pb.go b/proto/nebius/vpc/v1/network.sensitive.pb.go new file mode 100644 index 0000000..12bdc99 --- /dev/null +++ b/proto/nebius/vpc/v1/network.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Network) Sanitize() // is not generated as no sensitive fields found +// func (x *Network) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PrivateNetworkPools) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PrivateNetworkPools) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PublicNetworkPools) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PublicNetworkPools) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkPool) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkPool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/network_service.pb.go b/proto/nebius/vpc/v1/network_service.pb.go new file mode 100644 index 0000000..c8d2b17 --- /dev/null +++ b/proto/nebius/vpc/v1/network_service.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/network_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetNetworkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetNetworkRequest) Reset() { + *x = GetNetworkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkRequest) ProtoMessage() {} + +func (x *GetNetworkRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetNetworkRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetNetworkByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetNetworkByNameRequest) Reset() { + *x = GetNetworkByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkByNameRequest) ProtoMessage() {} + +func (x *GetNetworkByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkByNameRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNetworkByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetNetworkByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListNetworksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListNetworksRequest) Reset() { + *x = ListNetworksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksRequest) ProtoMessage() {} + +func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksRequest.ProtoReflect.Descriptor instead. +func (*ListNetworksRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListNetworksRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListNetworksRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListNetworksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListNetworksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Network `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListNetworksResponse) Reset() { + *x = ListNetworksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksResponse) ProtoMessage() {} + +func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_network_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksResponse.ProtoReflect.Descriptor instead. +func (*ListNetworksResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_network_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListNetworksResponse) GetItems() []*Network { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListNetworksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1_network_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_network_service_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x76, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x6c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xef, 0x01, + 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x3f, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x4b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x4f, + 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x5a, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_network_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_network_service_proto_rawDescData = file_nebius_vpc_v1_network_service_proto_rawDesc +) + +func file_nebius_vpc_v1_network_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_network_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_network_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_network_service_proto_rawDescData) + }) + return file_nebius_vpc_v1_network_service_proto_rawDescData +} + +var file_nebius_vpc_v1_network_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1_network_service_proto_goTypes = []any{ + (*GetNetworkRequest)(nil), // 0: nebius.vpc.v1.GetNetworkRequest + (*GetNetworkByNameRequest)(nil), // 1: nebius.vpc.v1.GetNetworkByNameRequest + (*ListNetworksRequest)(nil), // 2: nebius.vpc.v1.ListNetworksRequest + (*ListNetworksResponse)(nil), // 3: nebius.vpc.v1.ListNetworksResponse + (*Network)(nil), // 4: nebius.vpc.v1.Network +} +var file_nebius_vpc_v1_network_service_proto_depIdxs = []int32{ + 4, // 0: nebius.vpc.v1.ListNetworksResponse.items:type_name -> nebius.vpc.v1.Network + 0, // 1: nebius.vpc.v1.NetworkService.Get:input_type -> nebius.vpc.v1.GetNetworkRequest + 1, // 2: nebius.vpc.v1.NetworkService.GetByName:input_type -> nebius.vpc.v1.GetNetworkByNameRequest + 2, // 3: nebius.vpc.v1.NetworkService.List:input_type -> nebius.vpc.v1.ListNetworksRequest + 4, // 4: nebius.vpc.v1.NetworkService.Get:output_type -> nebius.vpc.v1.Network + 4, // 5: nebius.vpc.v1.NetworkService.GetByName:output_type -> nebius.vpc.v1.Network + 3, // 6: nebius.vpc.v1.NetworkService.List:output_type -> nebius.vpc.v1.ListNetworksResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_network_service_proto_init() } +func file_nebius_vpc_v1_network_service_proto_init() { + if File_nebius_vpc_v1_network_service_proto != nil { + return + } + file_nebius_vpc_v1_network_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_network_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListNetworksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_network_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListNetworksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_network_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1_network_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_network_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1_network_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_network_service_proto = out.File + file_nebius_vpc_v1_network_service_proto_rawDesc = nil + file_nebius_vpc_v1_network_service_proto_goTypes = nil + file_nebius_vpc_v1_network_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/network_service.sensitive.pb.go b/proto/nebius/vpc/v1/network_service.sensitive.pb.go new file mode 100644 index 0000000..eadb6c0 --- /dev/null +++ b/proto/nebius/vpc/v1/network_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetNetworkRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNetworkRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetNetworkByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNetworkByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNetworksRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNetworksRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNetworksResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNetworksResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/network_service_grpc.pb.go b/proto/nebius/vpc/v1/network_service_grpc.pb.go new file mode 100644 index 0000000..89639f6 --- /dev/null +++ b/proto/nebius/vpc/v1/network_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1/network_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NetworkService_Get_FullMethodName = "/nebius.vpc.v1.NetworkService/Get" + NetworkService_GetByName_FullMethodName = "/nebius.vpc.v1.NetworkService/GetByName" + NetworkService_List_FullMethodName = "/nebius.vpc.v1.NetworkService/List" +) + +// NetworkServiceClient is the client API for NetworkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NetworkServiceClient interface { + Get(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*Network, error) + GetByName(ctx context.Context, in *GetNetworkByNameRequest, opts ...grpc.CallOption) (*Network, error) + List(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error) +} + +type networkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNetworkServiceClient(cc grpc.ClientConnInterface) NetworkServiceClient { + return &networkServiceClient{cc} +} + +func (c *networkServiceClient) Get(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*Network, error) { + out := new(Network) + err := c.cc.Invoke(ctx, NetworkService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkServiceClient) GetByName(ctx context.Context, in *GetNetworkByNameRequest, opts ...grpc.CallOption) (*Network, error) { + out := new(Network) + err := c.cc.Invoke(ctx, NetworkService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkServiceClient) List(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error) { + out := new(ListNetworksResponse) + err := c.cc.Invoke(ctx, NetworkService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkServiceServer is the server API for NetworkService service. +// All implementations should embed UnimplementedNetworkServiceServer +// for forward compatibility +type NetworkServiceServer interface { + Get(context.Context, *GetNetworkRequest) (*Network, error) + GetByName(context.Context, *GetNetworkByNameRequest) (*Network, error) + List(context.Context, *ListNetworksRequest) (*ListNetworksResponse, error) +} + +// UnimplementedNetworkServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNetworkServiceServer struct { +} + +func (UnimplementedNetworkServiceServer) Get(context.Context, *GetNetworkRequest) (*Network, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedNetworkServiceServer) GetByName(context.Context, *GetNetworkByNameRequest) (*Network, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedNetworkServiceServer) List(context.Context, *ListNetworksRequest) (*ListNetworksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeNetworkServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NetworkServiceServer will +// result in compilation errors. +type UnsafeNetworkServiceServer interface { + mustEmbedUnimplementedNetworkServiceServer() +} + +func RegisterNetworkServiceServer(s grpc.ServiceRegistrar, srv NetworkServiceServer) { + s.RegisterService(&NetworkService_ServiceDesc, srv) +} + +func _NetworkService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).Get(ctx, req.(*GetNetworkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).GetByName(ctx, req.(*GetNetworkByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNetworksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).List(ctx, req.(*ListNetworksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NetworkService_ServiceDesc is the grpc.ServiceDesc for NetworkService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NetworkService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1.NetworkService", + HandlerType: (*NetworkServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _NetworkService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _NetworkService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _NetworkService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1/network_service.proto", +} diff --git a/proto/nebius/vpc/v1/pool.pb.go b/proto/nebius/vpc/v1/pool.pb.go new file mode 100644 index 0000000..d0c991e --- /dev/null +++ b/proto/nebius/vpc/v1/pool.pb.go @@ -0,0 +1,714 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/pool.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AddressBlockState int32 + +const ( + AddressBlockState_STATE_UNSPECIFIED AddressBlockState = 0 // Default, unspecified state. + AddressBlockState_AVAILABLE AddressBlockState = 1 // Allocation from range is available. + AddressBlockState_DISABLED AddressBlockState = 2 // New allocation would not be created. +) + +// Enum value maps for AddressBlockState. +var ( + AddressBlockState_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "AVAILABLE", + 2: "DISABLED", + } + AddressBlockState_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "AVAILABLE": 1, + "DISABLED": 2, + } +) + +func (x AddressBlockState) Enum() *AddressBlockState { + p := new(AddressBlockState) + *p = x + return p +} + +func (x AddressBlockState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AddressBlockState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_pool_proto_enumTypes[0].Descriptor() +} + +func (AddressBlockState) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_pool_proto_enumTypes[0] +} + +func (x AddressBlockState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AddressBlockState.Descriptor instead. +func (AddressBlockState) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{0} +} + +type IpVersion int32 + +const ( + IpVersion_IP_VERSION_UNSPECIFIED IpVersion = 0 // Default, unspecified IP version. + IpVersion_IPV4 IpVersion = 1 // IPv4 address. + IpVersion_IPV6 IpVersion = 2 // IPv6 address. +) + +// Enum value maps for IpVersion. +var ( + IpVersion_name = map[int32]string{ + 0: "IP_VERSION_UNSPECIFIED", + 1: "IPV4", + 2: "IPV6", + } + IpVersion_value = map[string]int32{ + "IP_VERSION_UNSPECIFIED": 0, + "IPV4": 1, + "IPV6": 2, + } +) + +func (x IpVersion) Enum() *IpVersion { + p := new(IpVersion) + *p = x + return p +} + +func (x IpVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IpVersion) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_pool_proto_enumTypes[1].Descriptor() +} + +func (IpVersion) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_pool_proto_enumTypes[1] +} + +func (x IpVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IpVersion.Descriptor instead. +func (IpVersion) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{1} +} + +type IpVisibility int32 + +const ( + IpVisibility_IP_VISIBILITY_UNSPECIFIED IpVisibility = 0 // Default, unspecified IP visibility. + IpVisibility_PRIVATE IpVisibility = 1 // Private address. + IpVisibility_PUBLIC IpVisibility = 2 // Public address. +) + +// Enum value maps for IpVisibility. +var ( + IpVisibility_name = map[int32]string{ + 0: "IP_VISIBILITY_UNSPECIFIED", + 1: "PRIVATE", + 2: "PUBLIC", + } + IpVisibility_value = map[string]int32{ + "IP_VISIBILITY_UNSPECIFIED": 0, + "PRIVATE": 1, + "PUBLIC": 2, + } +) + +func (x IpVisibility) Enum() *IpVisibility { + p := new(IpVisibility) + *p = x + return p +} + +func (x IpVisibility) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IpVisibility) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_pool_proto_enumTypes[2].Descriptor() +} + +func (IpVisibility) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_pool_proto_enumTypes[2] +} + +func (x IpVisibility) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IpVisibility.Descriptor instead. +func (IpVisibility) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{2} +} + +// Possible states of the Pool. +type PoolStatus_State int32 + +const ( + PoolStatus_STATE_UNSPECIFIED PoolStatus_State = 0 // Default, unspecified state. + PoolStatus_CREATING PoolStatus_State = 1 // Pool is being created. + PoolStatus_READY PoolStatus_State = 2 // Pool is ready for use. + PoolStatus_DELETING PoolStatus_State = 3 // Pool is being deleted. +) + +// Enum value maps for PoolStatus_State. +var ( + PoolStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + PoolStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x PoolStatus_State) Enum() *PoolStatus_State { + p := new(PoolStatus_State) + *p = x + return p +} + +func (x PoolStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PoolStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_pool_proto_enumTypes[3].Descriptor() +} + +func (PoolStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_pool_proto_enumTypes[3] +} + +func (x PoolStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PoolStatus_State.Descriptor instead. +func (PoolStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{3, 0} +} + +type Pool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the Pool. + // `metadata.parent_id` represents the Project. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the Pool. + Spec *PoolSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status information for the Pool. + Status *PoolStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Pool) Reset() { + *x = Pool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pool) ProtoMessage() {} + +func (x *Pool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pool.ProtoReflect.Descriptor instead. +func (*Pool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{0} +} + +func (x *Pool) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Pool) GetSpec() *PoolSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Pool) GetStatus() *PoolStatus { + if x != nil { + return x.Status + } + return nil +} + +type PoolSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of source pool. Current pool will be created with the same scope. + // Pool is a root-pool if this field is empty + SourcePoolId string `protobuf:"bytes,1,opt,name=source_pool_id,json=sourcePoolId,proto3" json:"source_pool_id,omitempty"` + // IP version for the Pool. + Version IpVersion `protobuf:"varint,3,opt,name=version,proto3,enum=nebius.vpc.v1.IpVersion" json:"version,omitempty"` + Visibility IpVisibility `protobuf:"varint,5,opt,name=visibility,proto3,enum=nebius.vpc.v1.IpVisibility" json:"visibility,omitempty"` + // CIDR blocks. + Cidrs []*PoolCidr `protobuf:"bytes,4,rep,name=cidrs,proto3" json:"cidrs,omitempty"` +} + +func (x *PoolSpec) Reset() { + *x = PoolSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolSpec) ProtoMessage() {} + +func (x *PoolSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolSpec.ProtoReflect.Descriptor instead. +func (*PoolSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{1} +} + +func (x *PoolSpec) GetSourcePoolId() string { + if x != nil { + return x.SourcePoolId + } + return "" +} + +func (x *PoolSpec) GetVersion() IpVersion { + if x != nil { + return x.Version + } + return IpVersion_IP_VERSION_UNSPECIFIED +} + +func (x *PoolSpec) GetVisibility() IpVisibility { + if x != nil { + return x.Visibility + } + return IpVisibility_IP_VISIBILITY_UNSPECIFIED +} + +func (x *PoolSpec) GetCidrs() []*PoolCidr { + if x != nil { + return x.Cidrs + } + return nil +} + +type PoolCidr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block. + // May be a prefix length (such as /24) for non-top-level pools + // or a CIDR-formatted string (such as 10.1.2.0/24). + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // State of the Cidr. + // Default state is AVAILABLE + State AddressBlockState `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.vpc.v1.AddressBlockState" json:"state,omitempty"` + // Maximum mask length for allocation from this cidr including creation of sub-pools + // Default max_mask_length is 32 for IPv4 and 128 for IPv6 + MaxMaskLength int64 `protobuf:"varint,3,opt,name=max_mask_length,json=maxMaskLength,proto3" json:"max_mask_length,omitempty"` +} + +func (x *PoolCidr) Reset() { + *x = PoolCidr{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolCidr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolCidr) ProtoMessage() {} + +func (x *PoolCidr) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolCidr.ProtoReflect.Descriptor instead. +func (*PoolCidr) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{2} +} + +func (x *PoolCidr) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (x *PoolCidr) GetState() AddressBlockState { + if x != nil { + return x.State + } + return AddressBlockState_STATE_UNSPECIFIED +} + +func (x *PoolCidr) GetMaxMaskLength() int64 { + if x != nil { + return x.MaxMaskLength + } + return 0 +} + +type PoolStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the Pool. + State PoolStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1.PoolStatus_State" json:"state,omitempty"` + // CIDR blocks. + Cidrs []string `protobuf:"bytes,2,rep,name=cidrs,proto3" json:"cidrs,omitempty"` + // Scope is the unique identifier for single pool tree. + ScopeId string `protobuf:"bytes,3,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty"` +} + +func (x *PoolStatus) Reset() { + *x = PoolStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolStatus) ProtoMessage() {} + +func (x *PoolStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolStatus.ProtoReflect.Descriptor instead. +func (*PoolStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_proto_rawDescGZIP(), []int{3} +} + +func (x *PoolStatus) GetState() PoolStatus_State { + if x != nil { + return x.State + } + return PoolStatus_STATE_UNSPECIFIED +} + +func (x *PoolStatus) GetCidrs() []string { + if x != nil { + return x.Cidrs + } + return nil +} + +func (x *PoolStatus) GetScopeId() string { + if x != nil { + return x.ScopeId + } + return "" +} + +var File_nebius_vpc_v1_pool_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_pool_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x08, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x70, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, + 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x05, + 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, + 0x43, 0x69, 0x64, 0x72, 0x52, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x22, 0x91, 0x03, 0x0a, 0x08, + 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x69, 0x64, 0x72, 0x12, 0x8e, 0x02, 0x0a, 0x04, 0x63, 0x69, 0x64, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xf9, 0x01, 0xba, 0x48, 0xf5, 0x01, 0xba, 0x01, + 0x9d, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, + 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x58, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, + 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x39, + 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x31, 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, + 0x38, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, + 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, + 0x01, 0x4e, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x1a, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, + 0xc8, 0x01, 0x01, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x0e, 0xba, 0x48, 0x07, 0x22, 0x05, 0x18, 0x80, 0x01, 0x28, 0x00, 0xba, 0x4a, 0x01, 0x07, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4d, 0x61, 0x73, 0x6b, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, + 0xbb, 0x01, 0x0a, 0x0a, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x2a, 0x47, 0x0a, + 0x11, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, + 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, + 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x3b, 0x0a, 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x50, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, + 0x36, 0x10, 0x02, 0x2a, 0x46, 0x0a, 0x0c, 0x49, 0x70, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x50, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, + 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x02, 0x42, 0x50, 0x0a, 0x14, 0x61, + 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x42, 0x09, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_pool_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_pool_proto_rawDescData = file_nebius_vpc_v1_pool_proto_rawDesc +) + +func file_nebius_vpc_v1_pool_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_pool_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_pool_proto_rawDescData) + }) + return file_nebius_vpc_v1_pool_proto_rawDescData +} + +var file_nebius_vpc_v1_pool_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_nebius_vpc_v1_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1_pool_proto_goTypes = []any{ + (AddressBlockState)(0), // 0: nebius.vpc.v1.AddressBlockState + (IpVersion)(0), // 1: nebius.vpc.v1.IpVersion + (IpVisibility)(0), // 2: nebius.vpc.v1.IpVisibility + (PoolStatus_State)(0), // 3: nebius.vpc.v1.PoolStatus.State + (*Pool)(nil), // 4: nebius.vpc.v1.Pool + (*PoolSpec)(nil), // 5: nebius.vpc.v1.PoolSpec + (*PoolCidr)(nil), // 6: nebius.vpc.v1.PoolCidr + (*PoolStatus)(nil), // 7: nebius.vpc.v1.PoolStatus + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata +} +var file_nebius_vpc_v1_pool_proto_depIdxs = []int32{ + 8, // 0: nebius.vpc.v1.Pool.metadata:type_name -> nebius.common.v1.ResourceMetadata + 5, // 1: nebius.vpc.v1.Pool.spec:type_name -> nebius.vpc.v1.PoolSpec + 7, // 2: nebius.vpc.v1.Pool.status:type_name -> nebius.vpc.v1.PoolStatus + 1, // 3: nebius.vpc.v1.PoolSpec.version:type_name -> nebius.vpc.v1.IpVersion + 2, // 4: nebius.vpc.v1.PoolSpec.visibility:type_name -> nebius.vpc.v1.IpVisibility + 6, // 5: nebius.vpc.v1.PoolSpec.cidrs:type_name -> nebius.vpc.v1.PoolCidr + 0, // 6: nebius.vpc.v1.PoolCidr.state:type_name -> nebius.vpc.v1.AddressBlockState + 3, // 7: nebius.vpc.v1.PoolStatus.state:type_name -> nebius.vpc.v1.PoolStatus.State + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_pool_proto_init() } +func file_nebius_vpc_v1_pool_proto_init() { + if File_nebius_vpc_v1_pool_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Pool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PoolSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PoolCidr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*PoolStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_pool_proto_rawDesc, + NumEnums: 4, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1_pool_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_pool_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1_pool_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1_pool_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_pool_proto = out.File + file_nebius_vpc_v1_pool_proto_rawDesc = nil + file_nebius_vpc_v1_pool_proto_goTypes = nil + file_nebius_vpc_v1_pool_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/pool.sensitive.pb.go b/proto/nebius/vpc/v1/pool.sensitive.pb.go new file mode 100644 index 0000000..7dac04a --- /dev/null +++ b/proto/nebius/vpc/v1/pool.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Pool) Sanitize() // is not generated as no sensitive fields found +// func (x *Pool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolCidr) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolCidr) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/pool_service.pb.go b/proto/nebius/vpc/v1/pool_service.pb.go new file mode 100644 index 0000000..2230d51 --- /dev/null +++ b/proto/nebius/vpc/v1/pool_service.pb.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/pool_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPoolRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetPoolRequest) Reset() { + *x = GetPoolRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoolRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoolRequest) ProtoMessage() {} + +func (x *GetPoolRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoolRequest.ProtoReflect.Descriptor instead. +func (*GetPoolRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPoolRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetPoolByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPoolByNameRequest) Reset() { + *x = GetPoolByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoolByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoolByNameRequest) ProtoMessage() {} + +func (x *GetPoolByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoolByNameRequest.ProtoReflect.Descriptor instead. +func (*GetPoolByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPoolByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetPoolByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListPoolsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListPoolsRequest) Reset() { + *x = ListPoolsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPoolsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoolsRequest) ProtoMessage() {} + +func (x *ListPoolsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoolsRequest.ProtoReflect.Descriptor instead. +func (*ListPoolsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListPoolsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListPoolsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPoolsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListPoolsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Pool `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPoolsResponse) Reset() { + *x = ListPoolsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPoolsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoolsResponse) ProtoMessage() {} + +func (x *ListPoolsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoolsResponse.ProtoReflect.Descriptor instead. +func (*ListPoolsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListPoolsResponse) GetItems() []*Pool { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListPoolsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type UpdatePoolRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *PoolSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdatePoolRequest) Reset() { + *x = UpdatePoolRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePoolRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePoolRequest) ProtoMessage() {} + +func (x *UpdatePoolRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_pool_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePoolRequest.ProtoReflect.Descriptor instead. +func (*UpdatePoolRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_pool_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdatePoolRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdatePoolRequest) GetSpec() *PoolSpec { + if x != nil { + return x.Spec + } + return nil +} + +var File_nebius_vpc_v1_pool_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_pool_service_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x73, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x66, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x11, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x2b, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x32, 0xa3, + 0x02, 0x0a, 0x0b, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x45, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, + 0x12, 0x49, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x57, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_pool_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_pool_service_proto_rawDescData = file_nebius_vpc_v1_pool_service_proto_rawDesc +) + +func file_nebius_vpc_v1_pool_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_pool_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_pool_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_pool_service_proto_rawDescData) + }) + return file_nebius_vpc_v1_pool_service_proto_rawDescData +} + +var file_nebius_vpc_v1_pool_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_vpc_v1_pool_service_proto_goTypes = []any{ + (*GetPoolRequest)(nil), // 0: nebius.vpc.v1.GetPoolRequest + (*GetPoolByNameRequest)(nil), // 1: nebius.vpc.v1.GetPoolByNameRequest + (*ListPoolsRequest)(nil), // 2: nebius.vpc.v1.ListPoolsRequest + (*ListPoolsResponse)(nil), // 3: nebius.vpc.v1.ListPoolsResponse + (*UpdatePoolRequest)(nil), // 4: nebius.vpc.v1.UpdatePoolRequest + (*Pool)(nil), // 5: nebius.vpc.v1.Pool + (*v1.ResourceMetadata)(nil), // 6: nebius.common.v1.ResourceMetadata + (*PoolSpec)(nil), // 7: nebius.vpc.v1.PoolSpec + (*v1.Operation)(nil), // 8: nebius.common.v1.Operation +} +var file_nebius_vpc_v1_pool_service_proto_depIdxs = []int32{ + 5, // 0: nebius.vpc.v1.ListPoolsResponse.items:type_name -> nebius.vpc.v1.Pool + 6, // 1: nebius.vpc.v1.UpdatePoolRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 7, // 2: nebius.vpc.v1.UpdatePoolRequest.spec:type_name -> nebius.vpc.v1.PoolSpec + 0, // 3: nebius.vpc.v1.PoolService.Get:input_type -> nebius.vpc.v1.GetPoolRequest + 1, // 4: nebius.vpc.v1.PoolService.GetByName:input_type -> nebius.vpc.v1.GetPoolByNameRequest + 2, // 5: nebius.vpc.v1.PoolService.List:input_type -> nebius.vpc.v1.ListPoolsRequest + 4, // 6: nebius.vpc.v1.PoolService.Update:input_type -> nebius.vpc.v1.UpdatePoolRequest + 5, // 7: nebius.vpc.v1.PoolService.Get:output_type -> nebius.vpc.v1.Pool + 5, // 8: nebius.vpc.v1.PoolService.GetByName:output_type -> nebius.vpc.v1.Pool + 3, // 9: nebius.vpc.v1.PoolService.List:output_type -> nebius.vpc.v1.ListPoolsResponse + 8, // 10: nebius.vpc.v1.PoolService.Update:output_type -> nebius.common.v1.Operation + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_pool_service_proto_init() } +func file_nebius_vpc_v1_pool_service_proto_init() { + if File_nebius_vpc_v1_pool_service_proto != nil { + return + } + file_nebius_vpc_v1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetPoolRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetPoolByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListPoolsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListPoolsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_pool_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UpdatePoolRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_pool_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1_pool_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_pool_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1_pool_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_pool_service_proto = out.File + file_nebius_vpc_v1_pool_service_proto_rawDesc = nil + file_nebius_vpc_v1_pool_service_proto_goTypes = nil + file_nebius_vpc_v1_pool_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/pool_service.sensitive.pb.go b/proto/nebius/vpc/v1/pool_service.sensitive.pb.go new file mode 100644 index 0000000..fbc2c07 --- /dev/null +++ b/proto/nebius/vpc/v1/pool_service.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetPoolRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetPoolRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetPoolByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetPoolByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListPoolsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPoolsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListPoolsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPoolsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdatePoolRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdatePoolRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/pool_service_grpc.pb.go b/proto/nebius/vpc/v1/pool_service_grpc.pb.go new file mode 100644 index 0000000..05b01c5 --- /dev/null +++ b/proto/nebius/vpc/v1/pool_service_grpc.pb.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1/pool_service.proto + +package v1 + +import ( + context "context" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PoolService_Get_FullMethodName = "/nebius.vpc.v1.PoolService/Get" + PoolService_GetByName_FullMethodName = "/nebius.vpc.v1.PoolService/GetByName" + PoolService_List_FullMethodName = "/nebius.vpc.v1.PoolService/List" + PoolService_Update_FullMethodName = "/nebius.vpc.v1.PoolService/Update" +) + +// PoolServiceClient is the client API for PoolService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PoolServiceClient interface { + Get(ctx context.Context, in *GetPoolRequest, opts ...grpc.CallOption) (*Pool, error) + GetByName(ctx context.Context, in *GetPoolByNameRequest, opts ...grpc.CallOption) (*Pool, error) + List(ctx context.Context, in *ListPoolsRequest, opts ...grpc.CallOption) (*ListPoolsResponse, error) + Update(ctx context.Context, in *UpdatePoolRequest, opts ...grpc.CallOption) (*v1.Operation, error) +} + +type poolServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPoolServiceClient(cc grpc.ClientConnInterface) PoolServiceClient { + return &poolServiceClient{cc} +} + +func (c *poolServiceClient) Get(ctx context.Context, in *GetPoolRequest, opts ...grpc.CallOption) (*Pool, error) { + out := new(Pool) + err := c.cc.Invoke(ctx, PoolService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *poolServiceClient) GetByName(ctx context.Context, in *GetPoolByNameRequest, opts ...grpc.CallOption) (*Pool, error) { + out := new(Pool) + err := c.cc.Invoke(ctx, PoolService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *poolServiceClient) List(ctx context.Context, in *ListPoolsRequest, opts ...grpc.CallOption) (*ListPoolsResponse, error) { + out := new(ListPoolsResponse) + err := c.cc.Invoke(ctx, PoolService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *poolServiceClient) Update(ctx context.Context, in *UpdatePoolRequest, opts ...grpc.CallOption) (*v1.Operation, error) { + out := new(v1.Operation) + err := c.cc.Invoke(ctx, PoolService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PoolServiceServer is the server API for PoolService service. +// All implementations should embed UnimplementedPoolServiceServer +// for forward compatibility +type PoolServiceServer interface { + Get(context.Context, *GetPoolRequest) (*Pool, error) + GetByName(context.Context, *GetPoolByNameRequest) (*Pool, error) + List(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error) + Update(context.Context, *UpdatePoolRequest) (*v1.Operation, error) +} + +// UnimplementedPoolServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPoolServiceServer struct { +} + +func (UnimplementedPoolServiceServer) Get(context.Context, *GetPoolRequest) (*Pool, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedPoolServiceServer) GetByName(context.Context, *GetPoolByNameRequest) (*Pool, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedPoolServiceServer) List(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedPoolServiceServer) Update(context.Context, *UpdatePoolRequest) (*v1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} + +// UnsafePoolServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PoolServiceServer will +// result in compilation errors. +type UnsafePoolServiceServer interface { + mustEmbedUnimplementedPoolServiceServer() +} + +func RegisterPoolServiceServer(s grpc.ServiceRegistrar, srv PoolServiceServer) { + s.RegisterService(&PoolService_ServiceDesc, srv) +} + +func _PoolService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).Get(ctx, req.(*GetPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PoolService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoolByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).GetByName(ctx, req.(*GetPoolByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PoolService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPoolsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).List(ctx, req.(*ListPoolsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PoolService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePoolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).Update(ctx, req.(*UpdatePoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PoolService_ServiceDesc is the grpc.ServiceDesc for PoolService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PoolService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1.PoolService", + HandlerType: (*PoolServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _PoolService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _PoolService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _PoolService_List_Handler, + }, + { + MethodName: "Update", + Handler: _PoolService_Update_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1/pool_service.proto", +} diff --git a/proto/nebius/vpc/v1/subnet.pb.go b/proto/nebius/vpc/v1/subnet.pb.go new file mode 100644 index 0000000..c597476 --- /dev/null +++ b/proto/nebius/vpc/v1/subnet.pb.go @@ -0,0 +1,777 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/subnet.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the subnet. +type SubnetStatus_State int32 + +const ( + SubnetStatus_STATE_UNSPECIFIED SubnetStatus_State = 0 // Default state, unspecified. + SubnetStatus_CREATING SubnetStatus_State = 1 // Subnet is being created. + SubnetStatus_READY SubnetStatus_State = 2 // Subnet is ready for use. + SubnetStatus_DELETING SubnetStatus_State = 3 // Subnet is being deleted. +) + +// Enum value maps for SubnetStatus_State. +var ( + SubnetStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + SubnetStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x SubnetStatus_State) Enum() *SubnetStatus_State { + p := new(SubnetStatus_State) + *p = x + return p +} + +func (x SubnetStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubnetStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1_subnet_proto_enumTypes[0].Descriptor() +} + +func (SubnetStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1_subnet_proto_enumTypes[0] +} + +func (x SubnetStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubnetStatus_State.Descriptor instead. +func (SubnetStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{6, 0} +} + +// Defines a Subnet, a segment of a network used for more granular control and management. +// Subnet uses pools to organize address space. +type Subnet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the subnet resource. + // `metadata.parent_id` represents IAM container + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the subnet. + Spec *SubnetSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status of the subnet. + Status *SubnetStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Subnet) Reset() { + *x = Subnet{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Subnet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subnet) ProtoMessage() {} + +func (x *Subnet) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subnet.ProtoReflect.Descriptor instead. +func (*Subnet) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{0} +} + +func (x *Subnet) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Subnet) GetSpec() *SubnetSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Subnet) GetStatus() *SubnetStatus { + if x != nil { + return x.Status + } + return nil +} + +type SubnetSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Network ID. + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + // Pools for private ipv4 addresses. + // Default is 'use_network_pools = true' + Ipv4PrivatePools *IPv4PrivateSubnetPools `protobuf:"bytes,2,opt,name=ipv4_private_pools,json=ipv4PrivatePools,proto3" json:"ipv4_private_pools,omitempty"` + // Pools for public ipv4 addresses. + // Default is 'use_network_pools = true' + Ipv4PublicPools *IPv4PublicSubnetPools `protobuf:"bytes,3,opt,name=ipv4_public_pools,json=ipv4PublicPools,proto3" json:"ipv4_public_pools,omitempty"` +} + +func (x *SubnetSpec) Reset() { + *x = SubnetSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetSpec) ProtoMessage() {} + +func (x *SubnetSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetSpec.ProtoReflect.Descriptor instead. +func (*SubnetSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{1} +} + +func (x *SubnetSpec) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *SubnetSpec) GetIpv4PrivatePools() *IPv4PrivateSubnetPools { + if x != nil { + return x.Ipv4PrivatePools + } + return nil +} + +func (x *SubnetSpec) GetIpv4PublicPools() *IPv4PublicSubnetPools { + if x != nil { + return x.Ipv4PublicPools + } + return nil +} + +type IPv4PrivateSubnetPools struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pools for private ipv4 allocations in subnet + // Must be empty if 'use_network_pools = true' + Pools []*SubnetPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` + // Allow using of private ipv4 pools which are specified in network + // Must be false if 'pools' is not empty + UseNetworkPools bool `protobuf:"varint,2,opt,name=use_network_pools,json=useNetworkPools,proto3" json:"use_network_pools,omitempty"` +} + +func (x *IPv4PrivateSubnetPools) Reset() { + *x = IPv4PrivateSubnetPools{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PrivateSubnetPools) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PrivateSubnetPools) ProtoMessage() {} + +func (x *IPv4PrivateSubnetPools) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PrivateSubnetPools.ProtoReflect.Descriptor instead. +func (*IPv4PrivateSubnetPools) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{2} +} + +func (x *IPv4PrivateSubnetPools) GetPools() []*SubnetPool { + if x != nil { + return x.Pools + } + return nil +} + +func (x *IPv4PrivateSubnetPools) GetUseNetworkPools() bool { + if x != nil { + return x.UseNetworkPools + } + return false +} + +type IPv4PublicSubnetPools struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pools for public ipv4 allocations in subnet + // Must be empty if 'use_network_pools = true' + Pools []*SubnetPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` + // Allow using of public ipv4 pools which are specified in network + // Must be false if 'pools' is not empty + UseNetworkPools bool `protobuf:"varint,2,opt,name=use_network_pools,json=useNetworkPools,proto3" json:"use_network_pools,omitempty"` +} + +func (x *IPv4PublicSubnetPools) Reset() { + *x = IPv4PublicSubnetPools{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PublicSubnetPools) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PublicSubnetPools) ProtoMessage() {} + +func (x *IPv4PublicSubnetPools) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PublicSubnetPools.ProtoReflect.Descriptor instead. +func (*IPv4PublicSubnetPools) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{3} +} + +func (x *IPv4PublicSubnetPools) GetPools() []*SubnetPool { + if x != nil { + return x.Pools + } + return nil +} + +func (x *IPv4PublicSubnetPools) GetUseNetworkPools() bool { + if x != nil { + return x.UseNetworkPools + } + return false +} + +type SubnetPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cidrs []*SubnetCidr `protobuf:"bytes,2,rep,name=cidrs,proto3" json:"cidrs,omitempty"` +} + +func (x *SubnetPool) Reset() { + *x = SubnetPool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetPool) ProtoMessage() {} + +func (x *SubnetPool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetPool.ProtoReflect.Descriptor instead. +func (*SubnetPool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{4} +} + +func (x *SubnetPool) GetCidrs() []*SubnetCidr { + if x != nil { + return x.Cidrs + } + return nil +} + +type SubnetCidr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block. + // May be a prefix length (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // State of the Cidr. + // Default state is AVAILABLE + State AddressBlockState `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.vpc.v1.AddressBlockState" json:"state,omitempty"` + // Maximum mask length for allocation from this cidr + // Default max_mask_length is 32 for IPv4 and 128 for IPv6 + MaxMaskLength int64 `protobuf:"varint,3,opt,name=max_mask_length,json=maxMaskLength,proto3" json:"max_mask_length,omitempty"` +} + +func (x *SubnetCidr) Reset() { + *x = SubnetCidr{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetCidr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetCidr) ProtoMessage() {} + +func (x *SubnetCidr) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetCidr.ProtoReflect.Descriptor instead. +func (*SubnetCidr) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{5} +} + +func (x *SubnetCidr) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (x *SubnetCidr) GetState() AddressBlockState { + if x != nil { + return x.State + } + return AddressBlockState_STATE_UNSPECIFIED +} + +func (x *SubnetCidr) GetMaxMaskLength() int64 { + if x != nil { + return x.MaxMaskLength + } + return 0 +} + +type SubnetStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the subnet. + State SubnetStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1.SubnetStatus_State" json:"state,omitempty"` + // CIDR blocks. + Ipv4PrivateCidrs []string `protobuf:"bytes,2,rep,name=ipv4_private_cidrs,json=ipv4PrivateCidrs,proto3" json:"ipv4_private_cidrs,omitempty"` + // CIDR blocks. + Ipv4PublicCidrs []string `protobuf:"bytes,3,rep,name=ipv4_public_cidrs,json=ipv4PublicCidrs,proto3" json:"ipv4_public_cidrs,omitempty"` +} + +func (x *SubnetStatus) Reset() { + *x = SubnetStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetStatus) ProtoMessage() {} + +func (x *SubnetStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetStatus.ProtoReflect.Descriptor instead. +func (*SubnetStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_proto_rawDescGZIP(), []int{6} +} + +func (x *SubnetStatus) GetState() SubnetStatus_State { + if x != nil { + return x.State + } + return SubnetStatus_STATE_UNSPECIFIED +} + +func (x *SubnetStatus) GetIpv4PrivateCidrs() []string { + if x != nil { + return x.Ipv4PrivateCidrs + } + return nil +} + +func (x *SubnetStatus) GetIpv4PublicCidrs() []string { + if x != nil { + return x.Ipv4PublicCidrs + } + return nil +} + +var File_nebius_vpc_v1_subnet_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_subnet_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, + 0x0a, 0x06, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe8, 0x01, 0x0a, + 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0a, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x50, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x42, 0x05, 0xba, 0x4a, 0x02, 0x07, 0x06, 0x52, 0x10, 0x69, 0x70, + 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x57, + 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x70, 0x6f, + 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x42, + 0x05, 0xba, 0x4a, 0x02, 0x07, 0x06, 0x52, 0x0f, 0x69, 0x70, 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x75, 0x0a, 0x16, 0x49, 0x50, 0x76, 0x34, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, + 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, + 0x73, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x74, + 0x0a, 0x15, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x3d, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, + 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x43, 0x69, 0x64, 0x72, 0x52, 0x05, 0x63, 0x69, + 0x64, 0x72, 0x73, 0x22, 0xa2, 0x03, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x43, 0x69, + 0x64, 0x72, 0x12, 0x9d, 0x02, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x88, 0x02, 0xba, 0x48, 0x84, 0x02, 0xba, 0x01, 0xac, 0x01, 0x0a, 0x11, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, + 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, + 0x67, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, + 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, + 0x7c, 0x31, 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x38, 0x5d, 0x29, 0x24, 0x27, 0x29, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x29, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x01, 0x4e, 0x0a, 0x0f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x0a, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x63, 0x69, + 0x64, 0x72, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x36, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0xba, 0x48, 0x07, 0x22, 0x05, + 0x18, 0x80, 0x01, 0x28, 0x00, 0xba, 0x4a, 0x01, 0x07, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4d, 0x61, + 0x73, 0x6b, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0xe8, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, + 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x69, 0x64, 0x72, 0x73, + 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x70, 0x76, + 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x69, 0x64, 0x72, 0x73, 0x22, 0x45, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, + 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x42, 0x52, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x53, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, + 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_subnet_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_subnet_proto_rawDescData = file_nebius_vpc_v1_subnet_proto_rawDesc +) + +func file_nebius_vpc_v1_subnet_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_subnet_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_subnet_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_subnet_proto_rawDescData) + }) + return file_nebius_vpc_v1_subnet_proto_rawDescData +} + +var file_nebius_vpc_v1_subnet_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1_subnet_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_vpc_v1_subnet_proto_goTypes = []any{ + (SubnetStatus_State)(0), // 0: nebius.vpc.v1.SubnetStatus.State + (*Subnet)(nil), // 1: nebius.vpc.v1.Subnet + (*SubnetSpec)(nil), // 2: nebius.vpc.v1.SubnetSpec + (*IPv4PrivateSubnetPools)(nil), // 3: nebius.vpc.v1.IPv4PrivateSubnetPools + (*IPv4PublicSubnetPools)(nil), // 4: nebius.vpc.v1.IPv4PublicSubnetPools + (*SubnetPool)(nil), // 5: nebius.vpc.v1.SubnetPool + (*SubnetCidr)(nil), // 6: nebius.vpc.v1.SubnetCidr + (*SubnetStatus)(nil), // 7: nebius.vpc.v1.SubnetStatus + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (AddressBlockState)(0), // 9: nebius.vpc.v1.AddressBlockState +} +var file_nebius_vpc_v1_subnet_proto_depIdxs = []int32{ + 8, // 0: nebius.vpc.v1.Subnet.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1.Subnet.spec:type_name -> nebius.vpc.v1.SubnetSpec + 7, // 2: nebius.vpc.v1.Subnet.status:type_name -> nebius.vpc.v1.SubnetStatus + 3, // 3: nebius.vpc.v1.SubnetSpec.ipv4_private_pools:type_name -> nebius.vpc.v1.IPv4PrivateSubnetPools + 4, // 4: nebius.vpc.v1.SubnetSpec.ipv4_public_pools:type_name -> nebius.vpc.v1.IPv4PublicSubnetPools + 5, // 5: nebius.vpc.v1.IPv4PrivateSubnetPools.pools:type_name -> nebius.vpc.v1.SubnetPool + 5, // 6: nebius.vpc.v1.IPv4PublicSubnetPools.pools:type_name -> nebius.vpc.v1.SubnetPool + 6, // 7: nebius.vpc.v1.SubnetPool.cidrs:type_name -> nebius.vpc.v1.SubnetCidr + 9, // 8: nebius.vpc.v1.SubnetCidr.state:type_name -> nebius.vpc.v1.AddressBlockState + 0, // 9: nebius.vpc.v1.SubnetStatus.state:type_name -> nebius.vpc.v1.SubnetStatus.State + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_subnet_proto_init() } +func file_nebius_vpc_v1_subnet_proto_init() { + if File_nebius_vpc_v1_subnet_proto != nil { + return + } + file_nebius_vpc_v1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_subnet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Subnet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*SubnetSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PrivateSubnetPools); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PublicSubnetPools); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*SubnetPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*SubnetCidr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*SubnetStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_subnet_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1_subnet_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_subnet_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1_subnet_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1_subnet_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_subnet_proto = out.File + file_nebius_vpc_v1_subnet_proto_rawDesc = nil + file_nebius_vpc_v1_subnet_proto_goTypes = nil + file_nebius_vpc_v1_subnet_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/subnet.sensitive.pb.go b/proto/nebius/vpc/v1/subnet.sensitive.pb.go new file mode 100644 index 0000000..e4aef12 --- /dev/null +++ b/proto/nebius/vpc/v1/subnet.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *Subnet) Sanitize() // is not generated as no sensitive fields found +// func (x *Subnet) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PrivateSubnetPools) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PrivateSubnetPools) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PublicSubnetPools) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PublicSubnetPools) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetPool) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetPool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetCidr) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetCidr) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/subnet_service.pb.go b/proto/nebius/vpc/v1/subnet_service.pb.go new file mode 100644 index 0000000..2703eb5 --- /dev/null +++ b/proto/nebius/vpc/v1/subnet_service.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1/subnet_service.proto + +package v1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetSubnetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSubnetRequest) Reset() { + *x = GetSubnetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubnetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubnetRequest) ProtoMessage() {} + +func (x *GetSubnetRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubnetRequest.ProtoReflect.Descriptor instead. +func (*GetSubnetRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSubnetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSubnetByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSubnetByNameRequest) Reset() { + *x = GetSubnetByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubnetByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubnetByNameRequest) ProtoMessage() {} + +func (x *GetSubnetByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubnetByNameRequest.ProtoReflect.Descriptor instead. +func (*GetSubnetByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSubnetByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetSubnetByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListSubnetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListSubnetsRequest) Reset() { + *x = ListSubnetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsRequest) ProtoMessage() {} + +func (x *ListSubnetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsRequest.ProtoReflect.Descriptor instead. +func (*ListSubnetsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSubnetsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListSubnetsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSubnetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListSubnetsByNetworkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListSubnetsByNetworkRequest) Reset() { + *x = ListSubnetsByNetworkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsByNetworkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsByNetworkRequest) ProtoMessage() {} + +func (x *ListSubnetsByNetworkRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsByNetworkRequest.ProtoReflect.Descriptor instead. +func (*ListSubnetsByNetworkRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListSubnetsByNetworkRequest) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *ListSubnetsByNetworkRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSubnetsByNetworkRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListSubnetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Subnet `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListSubnetsResponse) Reset() { + *x = ListSubnetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsResponse) ProtoMessage() {} + +func (x *ListSubnetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1_subnet_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsResponse.ProtoReflect.Descriptor instead. +func (*ListSubnetsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListSubnetsResponse) GetItems() []*Subnet { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListSubnetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1_subnet_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1_subnet_service_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x59, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x75, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, + 0x6e, 0x65, 0x74, 0x73, 0x42, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x09, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6a, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x32, 0xdb, 0x02, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, + 0x4d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, + 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x42, 0x79, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x10, 0x9a, 0xb5, 0x18, 0x0c, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, + 0x64, 0x42, 0x59, 0x0a, 0x14, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x53, 0x75, 0x62, 0x6e, 0x65, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1_subnet_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1_subnet_service_proto_rawDescData = file_nebius_vpc_v1_subnet_service_proto_rawDesc +) + +func file_nebius_vpc_v1_subnet_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1_subnet_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1_subnet_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1_subnet_service_proto_rawDescData) + }) + return file_nebius_vpc_v1_subnet_service_proto_rawDescData +} + +var file_nebius_vpc_v1_subnet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_vpc_v1_subnet_service_proto_goTypes = []any{ + (*GetSubnetRequest)(nil), // 0: nebius.vpc.v1.GetSubnetRequest + (*GetSubnetByNameRequest)(nil), // 1: nebius.vpc.v1.GetSubnetByNameRequest + (*ListSubnetsRequest)(nil), // 2: nebius.vpc.v1.ListSubnetsRequest + (*ListSubnetsByNetworkRequest)(nil), // 3: nebius.vpc.v1.ListSubnetsByNetworkRequest + (*ListSubnetsResponse)(nil), // 4: nebius.vpc.v1.ListSubnetsResponse + (*Subnet)(nil), // 5: nebius.vpc.v1.Subnet +} +var file_nebius_vpc_v1_subnet_service_proto_depIdxs = []int32{ + 5, // 0: nebius.vpc.v1.ListSubnetsResponse.items:type_name -> nebius.vpc.v1.Subnet + 0, // 1: nebius.vpc.v1.SubnetService.Get:input_type -> nebius.vpc.v1.GetSubnetRequest + 1, // 2: nebius.vpc.v1.SubnetService.GetByName:input_type -> nebius.vpc.v1.GetSubnetByNameRequest + 2, // 3: nebius.vpc.v1.SubnetService.List:input_type -> nebius.vpc.v1.ListSubnetsRequest + 3, // 4: nebius.vpc.v1.SubnetService.ListByNetwork:input_type -> nebius.vpc.v1.ListSubnetsByNetworkRequest + 5, // 5: nebius.vpc.v1.SubnetService.Get:output_type -> nebius.vpc.v1.Subnet + 5, // 6: nebius.vpc.v1.SubnetService.GetByName:output_type -> nebius.vpc.v1.Subnet + 4, // 7: nebius.vpc.v1.SubnetService.List:output_type -> nebius.vpc.v1.ListSubnetsResponse + 4, // 8: nebius.vpc.v1.SubnetService.ListByNetwork:output_type -> nebius.vpc.v1.ListSubnetsResponse + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1_subnet_service_proto_init() } +func file_nebius_vpc_v1_subnet_service_proto_init() { + if File_nebius_vpc_v1_subnet_service_proto != nil { + return + } + file_nebius_vpc_v1_subnet_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1_subnet_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetSubnetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetSubnetByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsByNetworkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1_subnet_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1_subnet_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1_subnet_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1_subnet_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1_subnet_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1_subnet_service_proto = out.File + file_nebius_vpc_v1_subnet_service_proto_rawDesc = nil + file_nebius_vpc_v1_subnet_service_proto_goTypes = nil + file_nebius_vpc_v1_subnet_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1/subnet_service.sensitive.pb.go b/proto/nebius/vpc/v1/subnet_service.sensitive.pb.go new file mode 100644 index 0000000..e5b96b3 --- /dev/null +++ b/proto/nebius/vpc/v1/subnet_service.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1 + +// func (x *GetSubnetRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSubnetRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetSubnetByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSubnetByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsByNetworkRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsByNetworkRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1/subnet_service_grpc.pb.go b/proto/nebius/vpc/v1/subnet_service_grpc.pb.go new file mode 100644 index 0000000..074a19b --- /dev/null +++ b/proto/nebius/vpc/v1/subnet_service_grpc.pb.go @@ -0,0 +1,218 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1/subnet_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SubnetService_Get_FullMethodName = "/nebius.vpc.v1.SubnetService/Get" + SubnetService_GetByName_FullMethodName = "/nebius.vpc.v1.SubnetService/GetByName" + SubnetService_List_FullMethodName = "/nebius.vpc.v1.SubnetService/List" + SubnetService_ListByNetwork_FullMethodName = "/nebius.vpc.v1.SubnetService/ListByNetwork" +) + +// SubnetServiceClient is the client API for SubnetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SubnetServiceClient interface { + Get(ctx context.Context, in *GetSubnetRequest, opts ...grpc.CallOption) (*Subnet, error) + GetByName(ctx context.Context, in *GetSubnetByNameRequest, opts ...grpc.CallOption) (*Subnet, error) + List(ctx context.Context, in *ListSubnetsRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) + ListByNetwork(ctx context.Context, in *ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) +} + +type subnetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSubnetServiceClient(cc grpc.ClientConnInterface) SubnetServiceClient { + return &subnetServiceClient{cc} +} + +func (c *subnetServiceClient) Get(ctx context.Context, in *GetSubnetRequest, opts ...grpc.CallOption) (*Subnet, error) { + out := new(Subnet) + err := c.cc.Invoke(ctx, SubnetService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) GetByName(ctx context.Context, in *GetSubnetByNameRequest, opts ...grpc.CallOption) (*Subnet, error) { + out := new(Subnet) + err := c.cc.Invoke(ctx, SubnetService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) List(ctx context.Context, in *ListSubnetsRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) { + out := new(ListSubnetsResponse) + err := c.cc.Invoke(ctx, SubnetService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) ListByNetwork(ctx context.Context, in *ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) { + out := new(ListSubnetsResponse) + err := c.cc.Invoke(ctx, SubnetService_ListByNetwork_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubnetServiceServer is the server API for SubnetService service. +// All implementations should embed UnimplementedSubnetServiceServer +// for forward compatibility +type SubnetServiceServer interface { + Get(context.Context, *GetSubnetRequest) (*Subnet, error) + GetByName(context.Context, *GetSubnetByNameRequest) (*Subnet, error) + List(context.Context, *ListSubnetsRequest) (*ListSubnetsResponse, error) + ListByNetwork(context.Context, *ListSubnetsByNetworkRequest) (*ListSubnetsResponse, error) +} + +// UnimplementedSubnetServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSubnetServiceServer struct { +} + +func (UnimplementedSubnetServiceServer) Get(context.Context, *GetSubnetRequest) (*Subnet, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedSubnetServiceServer) GetByName(context.Context, *GetSubnetByNameRequest) (*Subnet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedSubnetServiceServer) List(context.Context, *ListSubnetsRequest) (*ListSubnetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedSubnetServiceServer) ListByNetwork(context.Context, *ListSubnetsByNetworkRequest) (*ListSubnetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByNetwork not implemented") +} + +// UnsafeSubnetServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SubnetServiceServer will +// result in compilation errors. +type UnsafeSubnetServiceServer interface { + mustEmbedUnimplementedSubnetServiceServer() +} + +func RegisterSubnetServiceServer(s grpc.ServiceRegistrar, srv SubnetServiceServer) { + s.RegisterService(&SubnetService_ServiceDesc, srv) +} + +func _SubnetService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubnetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).Get(ctx, req.(*GetSubnetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubnetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).GetByName(ctx, req.(*GetSubnetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubnetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).List(ctx, req.(*ListSubnetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_ListByNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubnetsByNetworkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).ListByNetwork(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_ListByNetwork_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).ListByNetwork(ctx, req.(*ListSubnetsByNetworkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SubnetService_ServiceDesc is the grpc.ServiceDesc for SubnetService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SubnetService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1.SubnetService", + HandlerType: (*SubnetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _SubnetService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _SubnetService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _SubnetService_List_Handler, + }, + { + MethodName: "ListByNetwork", + Handler: _SubnetService_ListByNetwork_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1/subnet_service.proto", +} diff --git a/proto/nebius/vpc/v1alpha1/allocation.pb.go b/proto/nebius/vpc/v1alpha1/allocation.pb.go new file mode 100644 index 0000000..e0b9674 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/allocation.pb.go @@ -0,0 +1,1047 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/allocation.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the Allocation. +type AllocationStatus_State int32 + +const ( + AllocationStatus_STATE_UNSPECIFIED AllocationStatus_State = 0 // Default state, unspecified. + AllocationStatus_CREATING AllocationStatus_State = 1 // Allocation is being created. + AllocationStatus_ALLOCATED AllocationStatus_State = 2 // Allocation is ready for use. + AllocationStatus_ASSIGNED AllocationStatus_State = 3 // Allocation is used. + AllocationStatus_DELETING AllocationStatus_State = 4 // Allocation is being deleted. +) + +// Enum value maps for AllocationStatus_State. +var ( + AllocationStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "ALLOCATED", + 3: "ASSIGNED", + 4: "DELETING", + } + AllocationStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ALLOCATED": 2, + "ASSIGNED": 3, + "DELETING": 4, + } +) + +func (x AllocationStatus_State) Enum() *AllocationStatus_State { + p := new(AllocationStatus_State) + *p = x + return p +} + +func (x AllocationStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AllocationStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_allocation_proto_enumTypes[0].Descriptor() +} + +func (AllocationStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_allocation_proto_enumTypes[0] +} + +func (x AllocationStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AllocationStatus_State.Descriptor instead. +func (AllocationStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{4, 0} +} + +type Allocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the Allocation. + // `metadata.parent_id` represents IAM Container. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specifications for the allocation, detailing its name and IP configuration. + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Contains the current status of the allocation, indicating its state and any additional details. + Status *AllocationStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Allocation) Reset() { + *x = Allocation{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Allocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Allocation) ProtoMessage() {} + +func (x *Allocation) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Allocation.ProtoReflect.Descriptor instead. +func (*Allocation) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{0} +} + +func (x *Allocation) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Allocation) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Allocation) GetStatus() *AllocationStatus { + if x != nil { + return x.Status + } + return nil +} + +type AllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Holds the IP specifications for the allocation, including the type of IP (IPv4 or IPv6) and its corresponding configuration. + // + // Types that are assignable to IpSpec: + // + // *AllocationSpec_Ipv4Private + // *AllocationSpec_Ipv4Public + IpSpec isAllocationSpec_IpSpec `protobuf_oneof:"ip_spec"` +} + +func (x *AllocationSpec) Reset() { + *x = AllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationSpec) ProtoMessage() {} + +func (x *AllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationSpec.ProtoReflect.Descriptor instead. +func (*AllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{1} +} + +func (m *AllocationSpec) GetIpSpec() isAllocationSpec_IpSpec { + if m != nil { + return m.IpSpec + } + return nil +} + +func (x *AllocationSpec) GetIpv4Private() *IPv4PrivateAllocationSpec { + if x, ok := x.GetIpSpec().(*AllocationSpec_Ipv4Private); ok { + return x.Ipv4Private + } + return nil +} + +func (x *AllocationSpec) GetIpv4Public() *IPv4PublicAllocationSpec { + if x, ok := x.GetIpSpec().(*AllocationSpec_Ipv4Public); ok { + return x.Ipv4Public + } + return nil +} + +type isAllocationSpec_IpSpec interface { + isAllocationSpec_IpSpec() +} + +type AllocationSpec_Ipv4Private struct { + Ipv4Private *IPv4PrivateAllocationSpec `protobuf:"bytes,1,opt,name=ipv4_private,json=ipv4Private,proto3,oneof"` +} + +type AllocationSpec_Ipv4Public struct { + Ipv4Public *IPv4PublicAllocationSpec `protobuf:"bytes,2,opt,name=ipv4_public,json=ipv4Public,proto3,oneof"` +} + +func (*AllocationSpec_Ipv4Private) isAllocationSpec_IpSpec() {} + +func (*AllocationSpec_Ipv4Public) isAllocationSpec_IpSpec() {} + +type IPv4PrivateAllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block for IPv4 Allocation. + // May be a single IP address (such as 10.2.3.4), + // a prefix length (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). + // Random address (/32) from pool would be allocated if field is omitted. + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // Types that are assignable to Pool: + // + // *IPv4PrivateAllocationSpec_SubnetId + // *IPv4PrivateAllocationSpec_PoolId + Pool isIPv4PrivateAllocationSpec_Pool `protobuf_oneof:"pool"` +} + +func (x *IPv4PrivateAllocationSpec) Reset() { + *x = IPv4PrivateAllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PrivateAllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PrivateAllocationSpec) ProtoMessage() {} + +func (x *IPv4PrivateAllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PrivateAllocationSpec.ProtoReflect.Descriptor instead. +func (*IPv4PrivateAllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{2} +} + +func (x *IPv4PrivateAllocationSpec) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (m *IPv4PrivateAllocationSpec) GetPool() isIPv4PrivateAllocationSpec_Pool { + if m != nil { + return m.Pool + } + return nil +} + +func (x *IPv4PrivateAllocationSpec) GetSubnetId() string { + if x, ok := x.GetPool().(*IPv4PrivateAllocationSpec_SubnetId); ok { + return x.SubnetId + } + return "" +} + +func (x *IPv4PrivateAllocationSpec) GetPoolId() string { + if x, ok := x.GetPool().(*IPv4PrivateAllocationSpec_PoolId); ok { + return x.PoolId + } + return "" +} + +type isIPv4PrivateAllocationSpec_Pool interface { + isIPv4PrivateAllocationSpec_Pool() +} + +type IPv4PrivateAllocationSpec_SubnetId struct { + // Subnet ID. + // Required same subnet to use allocation in subnet-resources (e.g. Network Interface) + SubnetId string `protobuf:"bytes,2,opt,name=subnet_id,json=subnetId,proto3,oneof"` +} + +type IPv4PrivateAllocationSpec_PoolId struct { + // Pool for the IPv4 private allocation. + PoolId string `protobuf:"bytes,3,opt,name=pool_id,json=poolId,proto3,oneof"` +} + +func (*IPv4PrivateAllocationSpec_SubnetId) isIPv4PrivateAllocationSpec_Pool() {} + +func (*IPv4PrivateAllocationSpec_PoolId) isIPv4PrivateAllocationSpec_Pool() {} + +type IPv4PublicAllocationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block for IPv4 Allocation. + // May be a single IP address (such as 10.2.3.4), + // a prefix length (such as /32) or a CIDR-formatted string (such as 10.1.2.0/32). + // Random address (/32) from pool would be allocated if field is omitted. + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // Pool for the IPv4 public allocation. + PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` +} + +func (x *IPv4PublicAllocationSpec) Reset() { + *x = IPv4PublicAllocationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPv4PublicAllocationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPv4PublicAllocationSpec) ProtoMessage() {} + +func (x *IPv4PublicAllocationSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPv4PublicAllocationSpec.ProtoReflect.Descriptor instead. +func (*IPv4PublicAllocationSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{3} +} + +func (x *IPv4PublicAllocationSpec) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (x *IPv4PublicAllocationSpec) GetPoolId() string { + if x != nil { + return x.PoolId + } + return "" +} + +type AllocationStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field represents the current state of the allocation. + State AllocationStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.AllocationStatus_State" json:"state,omitempty"` + // Detailed information about the allocation status, + // including the allocated CIDR, pool ID, scope type, and IP version. + Details *AllocationDetails `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` + // Information about the assignment associated with the allocation, + // such as network interface or load balancer assignment. + Assignment *Assignment `protobuf:"bytes,3,opt,name=assignment,proto3" json:"assignment,omitempty"` + // If false - Lifecycle of allocation depends on resource that using it. + Static bool `protobuf:"varint,4,opt,name=static,proto3" json:"static,omitempty"` +} + +func (x *AllocationStatus) Reset() { + *x = AllocationStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationStatus) ProtoMessage() {} + +func (x *AllocationStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationStatus.ProtoReflect.Descriptor instead. +func (*AllocationStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{4} +} + +func (x *AllocationStatus) GetState() AllocationStatus_State { + if x != nil { + return x.State + } + return AllocationStatus_STATE_UNSPECIFIED +} + +func (x *AllocationStatus) GetDetails() *AllocationDetails { + if x != nil { + return x.Details + } + return nil +} + +func (x *AllocationStatus) GetAssignment() *Assignment { + if x != nil { + return x.Assignment + } + return nil +} + +func (x *AllocationStatus) GetStatic() bool { + if x != nil { + return x.Static + } + return false +} + +type AllocationDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AllocatedCidr string `protobuf:"bytes,1,opt,name=allocated_cidr,json=allocatedCidr,proto3" json:"allocated_cidr,omitempty"` + PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Version IpVersion `protobuf:"varint,4,opt,name=version,proto3,enum=nebius.vpc.v1alpha1.IpVersion" json:"version,omitempty"` +} + +func (x *AllocationDetails) Reset() { + *x = AllocationDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllocationDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllocationDetails) ProtoMessage() {} + +func (x *AllocationDetails) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllocationDetails.ProtoReflect.Descriptor instead. +func (*AllocationDetails) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{5} +} + +func (x *AllocationDetails) GetAllocatedCidr() string { + if x != nil { + return x.AllocatedCidr + } + return "" +} + +func (x *AllocationDetails) GetPoolId() string { + if x != nil { + return x.PoolId + } + return "" +} + +func (x *AllocationDetails) GetVersion() IpVersion { + if x != nil { + return x.Version + } + return IpVersion_IP_VERSION_UNSPECIFIED +} + +type Assignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field specifies the type of assignment associated with the allocation, + // which could be a network interface or load balancer assignment. + // + // Types that are assignable to Type: + // + // *Assignment_NetworkInterface + // *Assignment_LoadBalancer + Type isAssignment_Type `protobuf_oneof:"type"` +} + +func (x *Assignment) Reset() { + *x = Assignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Assignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Assignment) ProtoMessage() {} + +func (x *Assignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Assignment.ProtoReflect.Descriptor instead. +func (*Assignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{6} +} + +func (m *Assignment) GetType() isAssignment_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Assignment) GetNetworkInterface() *NetworkInterfaceAssignment { + if x, ok := x.GetType().(*Assignment_NetworkInterface); ok { + return x.NetworkInterface + } + return nil +} + +func (x *Assignment) GetLoadBalancer() *LoadBalancerAssignment { + if x, ok := x.GetType().(*Assignment_LoadBalancer); ok { + return x.LoadBalancer + } + return nil +} + +type isAssignment_Type interface { + isAssignment_Type() +} + +type Assignment_NetworkInterface struct { + NetworkInterface *NetworkInterfaceAssignment `protobuf:"bytes,1,opt,name=network_interface,json=networkInterface,proto3,oneof"` +} + +type Assignment_LoadBalancer struct { + LoadBalancer *LoadBalancerAssignment `protobuf:"bytes,2,opt,name=load_balancer,json=loadBalancer,proto3,oneof"` +} + +func (*Assignment_NetworkInterface) isAssignment_Type() {} + +func (*Assignment_LoadBalancer) isAssignment_Type() {} + +type NetworkInterfaceAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Compute instance network interface belongs to. + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // Network interface name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *NetworkInterfaceAssignment) Reset() { + *x = NetworkInterfaceAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceAssignment) ProtoMessage() {} + +func (x *NetworkInterfaceAssignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceAssignment.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceAssignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{7} +} + +func (x *NetworkInterfaceAssignment) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *NetworkInterfaceAssignment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type LoadBalancerAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the Load Balancer. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *LoadBalancerAssignment) Reset() { + *x = LoadBalancerAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadBalancerAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancerAssignment) ProtoMessage() {} + +func (x *LoadBalancerAssignment) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadBalancerAssignment.ProtoReflect.Descriptor instead. +func (*LoadBalancerAssignment) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP(), []int{8} +} + +func (x *LoadBalancerAssignment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_vpc_v1alpha1_allocation_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_allocation_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x37, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x59, 0x0a, + 0x0c, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x70, 0x76, + 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x04, 0xba, 0x4a, + 0x01, 0x06, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x42, 0x10, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x12, 0x05, 0xba, 0x48, 0x02, + 0x08, 0x01, 0x22, 0xbf, 0x02, 0x0a, 0x19, 0x49, 0x50, 0x76, 0x34, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x12, 0xcc, 0x01, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0xb7, 0x01, 0xba, 0x48, 0xaf, 0x01, 0xba, 0x01, 0xab, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, + 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x66, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, + 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x33, + 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x34, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x34, 0x2c, 0x20, + 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, + 0x23, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x06, 0x70, + 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x42, 0x0d, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0x88, 0x02, 0x0a, 0x18, 0x49, 0x50, 0x76, 0x34, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x12, 0xcc, 0x01, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0xb7, 0x01, 0xba, 0x48, 0xaf, 0x01, 0xba, 0x01, 0xab, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2e, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x66, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x5b, + 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, + 0x33, 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x34, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x34, 0x2c, + 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, + 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x22, + 0xc9, 0x02, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0a, 0x61, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, + 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x22, 0x57, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x22, 0x8d, 0x01, 0x0a, 0x11, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, + 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x43, 0x69, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, + 0x64, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x0a, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x11, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x72, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0c, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x1a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x4c, 0x6f, 0x61, + 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x42, 0x62, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_allocation_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_allocation_proto_rawDescData = file_nebius_vpc_v1alpha1_allocation_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_allocation_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_allocation_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_allocation_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_allocation_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_allocation_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_allocation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1alpha1_allocation_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_nebius_vpc_v1alpha1_allocation_proto_goTypes = []any{ + (AllocationStatus_State)(0), // 0: nebius.vpc.v1alpha1.AllocationStatus.State + (*Allocation)(nil), // 1: nebius.vpc.v1alpha1.Allocation + (*AllocationSpec)(nil), // 2: nebius.vpc.v1alpha1.AllocationSpec + (*IPv4PrivateAllocationSpec)(nil), // 3: nebius.vpc.v1alpha1.IPv4PrivateAllocationSpec + (*IPv4PublicAllocationSpec)(nil), // 4: nebius.vpc.v1alpha1.IPv4PublicAllocationSpec + (*AllocationStatus)(nil), // 5: nebius.vpc.v1alpha1.AllocationStatus + (*AllocationDetails)(nil), // 6: nebius.vpc.v1alpha1.AllocationDetails + (*Assignment)(nil), // 7: nebius.vpc.v1alpha1.Assignment + (*NetworkInterfaceAssignment)(nil), // 8: nebius.vpc.v1alpha1.NetworkInterfaceAssignment + (*LoadBalancerAssignment)(nil), // 9: nebius.vpc.v1alpha1.LoadBalancerAssignment + (*v1.ResourceMetadata)(nil), // 10: nebius.common.v1.ResourceMetadata + (IpVersion)(0), // 11: nebius.vpc.v1alpha1.IpVersion +} +var file_nebius_vpc_v1alpha1_allocation_proto_depIdxs = []int32{ + 10, // 0: nebius.vpc.v1alpha1.Allocation.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1alpha1.Allocation.spec:type_name -> nebius.vpc.v1alpha1.AllocationSpec + 5, // 2: nebius.vpc.v1alpha1.Allocation.status:type_name -> nebius.vpc.v1alpha1.AllocationStatus + 3, // 3: nebius.vpc.v1alpha1.AllocationSpec.ipv4_private:type_name -> nebius.vpc.v1alpha1.IPv4PrivateAllocationSpec + 4, // 4: nebius.vpc.v1alpha1.AllocationSpec.ipv4_public:type_name -> nebius.vpc.v1alpha1.IPv4PublicAllocationSpec + 0, // 5: nebius.vpc.v1alpha1.AllocationStatus.state:type_name -> nebius.vpc.v1alpha1.AllocationStatus.State + 6, // 6: nebius.vpc.v1alpha1.AllocationStatus.details:type_name -> nebius.vpc.v1alpha1.AllocationDetails + 7, // 7: nebius.vpc.v1alpha1.AllocationStatus.assignment:type_name -> nebius.vpc.v1alpha1.Assignment + 11, // 8: nebius.vpc.v1alpha1.AllocationDetails.version:type_name -> nebius.vpc.v1alpha1.IpVersion + 8, // 9: nebius.vpc.v1alpha1.Assignment.network_interface:type_name -> nebius.vpc.v1alpha1.NetworkInterfaceAssignment + 9, // 10: nebius.vpc.v1alpha1.Assignment.load_balancer:type_name -> nebius.vpc.v1alpha1.LoadBalancerAssignment + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_allocation_proto_init() } +func file_nebius_vpc_v1alpha1_allocation_proto_init() { + if File_nebius_vpc_v1alpha1_allocation_proto != nil { + return + } + file_nebius_vpc_v1alpha1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Allocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*AllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PrivateAllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*IPv4PublicAllocationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*AllocationStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*AllocationDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*Assignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*LoadBalancerAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[1].OneofWrappers = []any{ + (*AllocationSpec_Ipv4Private)(nil), + (*AllocationSpec_Ipv4Public)(nil), + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[2].OneofWrappers = []any{ + (*IPv4PrivateAllocationSpec_SubnetId)(nil), + (*IPv4PrivateAllocationSpec_PoolId)(nil), + } + file_nebius_vpc_v1alpha1_allocation_proto_msgTypes[6].OneofWrappers = []any{ + (*Assignment_NetworkInterface)(nil), + (*Assignment_LoadBalancer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_allocation_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_allocation_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_allocation_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1alpha1_allocation_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1alpha1_allocation_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_allocation_proto = out.File + file_nebius_vpc_v1alpha1_allocation_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_allocation_proto_goTypes = nil + file_nebius_vpc_v1alpha1_allocation_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/allocation.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/allocation.sensitive.pb.go new file mode 100644 index 0000000..acc1dd0 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/allocation.sensitive.pb.go @@ -0,0 +1,30 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Allocation) Sanitize() // is not generated as no sensitive fields found +// func (x *Allocation) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PrivateAllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PrivateAllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPv4PublicAllocationSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *IPv4PublicAllocationSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *AllocationDetails) Sanitize() // is not generated as no sensitive fields found +// func (x *AllocationDetails) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *Assignment) Sanitize() // is not generated as no sensitive fields found +// func (x *Assignment) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceAssignment) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceAssignment) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *LoadBalancerAssignment) Sanitize() // is not generated as no sensitive fields found +// func (x *LoadBalancerAssignment) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/allocation_service.pb.go b/proto/nebius/vpc/v1alpha1/allocation_service.pb.go new file mode 100644 index 0000000..b4839c3 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/allocation_service.pb.go @@ -0,0 +1,682 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/allocation_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAllocationRequest) Reset() { + *x = GetAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllocationRequest) ProtoMessage() {} + +func (x *GetAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllocationRequest.ProtoReflect.Descriptor instead. +func (*GetAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetAllocationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetAllocationByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAllocationByNameRequest) Reset() { + *x = GetAllocationByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllocationByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllocationByNameRequest) ProtoMessage() {} + +func (x *GetAllocationByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAllocationByNameRequest.ProtoReflect.Descriptor instead. +func (*GetAllocationByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAllocationByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetAllocationByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListAllocationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListAllocationsRequest) Reset() { + *x = ListAllocationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllocationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllocationsRequest) ProtoMessage() {} + +func (x *ListAllocationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllocationsRequest.ProtoReflect.Descriptor instead. +func (*ListAllocationsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAllocationsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListAllocationsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAllocationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAllocationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListAllocationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Allocation `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAllocationsResponse) Reset() { + *x = ListAllocationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAllocationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAllocationsResponse) ProtoMessage() {} + +func (x *ListAllocationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAllocationsResponse.ProtoReflect.Descriptor instead. +func (*ListAllocationsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAllocationsResponse) GetItems() []*Allocation { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListAllocationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type CreateAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *CreateAllocationRequest) Reset() { + *x = CreateAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAllocationRequest) ProtoMessage() {} + +func (x *CreateAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAllocationRequest.ProtoReflect.Descriptor instead. +func (*CreateAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateAllocationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *CreateAllocationRequest) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type UpdateAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *AllocationSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *UpdateAllocationRequest) Reset() { + *x = UpdateAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAllocationRequest) ProtoMessage() {} + +func (x *UpdateAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAllocationRequest.ProtoReflect.Descriptor instead. +func (*UpdateAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateAllocationRequest) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UpdateAllocationRequest) GetSpec() *AllocationSpec { + if x != nil { + return x.Spec + } + return nil +} + +type DeleteAllocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteAllocationRequest) Reset() { + *x = DeleteAllocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAllocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAllocationRequest) ProtoMessage() {} + +func (x *DeleteAllocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAllocationRequest.ProtoReflect.Descriptor instead. +func (*DeleteAllocationRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteAllocationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_nebius_vpc_v1alpha1_allocation_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_allocation_service_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x5d, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x91, + 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0x78, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa2, 0x01, 0x0a, + 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x3f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x32, 0xb9, 0x04, 0x0a, 0x11, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x51, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x2f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x61, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2c, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x59, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x06, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescData = file_nebius_vpc_v1alpha1_allocation_service_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_allocation_service_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_nebius_vpc_v1alpha1_allocation_service_proto_goTypes = []any{ + (*GetAllocationRequest)(nil), // 0: nebius.vpc.v1alpha1.GetAllocationRequest + (*GetAllocationByNameRequest)(nil), // 1: nebius.vpc.v1alpha1.GetAllocationByNameRequest + (*ListAllocationsRequest)(nil), // 2: nebius.vpc.v1alpha1.ListAllocationsRequest + (*ListAllocationsResponse)(nil), // 3: nebius.vpc.v1alpha1.ListAllocationsResponse + (*CreateAllocationRequest)(nil), // 4: nebius.vpc.v1alpha1.CreateAllocationRequest + (*UpdateAllocationRequest)(nil), // 5: nebius.vpc.v1alpha1.UpdateAllocationRequest + (*DeleteAllocationRequest)(nil), // 6: nebius.vpc.v1alpha1.DeleteAllocationRequest + (*Allocation)(nil), // 7: nebius.vpc.v1alpha1.Allocation + (*v1.ResourceMetadata)(nil), // 8: nebius.common.v1.ResourceMetadata + (*AllocationSpec)(nil), // 9: nebius.vpc.v1alpha1.AllocationSpec + (*v1alpha1.Operation)(nil), // 10: nebius.common.v1alpha1.Operation +} +var file_nebius_vpc_v1alpha1_allocation_service_proto_depIdxs = []int32{ + 7, // 0: nebius.vpc.v1alpha1.ListAllocationsResponse.items:type_name -> nebius.vpc.v1alpha1.Allocation + 8, // 1: nebius.vpc.v1alpha1.CreateAllocationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 2: nebius.vpc.v1alpha1.CreateAllocationRequest.spec:type_name -> nebius.vpc.v1alpha1.AllocationSpec + 8, // 3: nebius.vpc.v1alpha1.UpdateAllocationRequest.metadata:type_name -> nebius.common.v1.ResourceMetadata + 9, // 4: nebius.vpc.v1alpha1.UpdateAllocationRequest.spec:type_name -> nebius.vpc.v1alpha1.AllocationSpec + 0, // 5: nebius.vpc.v1alpha1.AllocationService.Get:input_type -> nebius.vpc.v1alpha1.GetAllocationRequest + 1, // 6: nebius.vpc.v1alpha1.AllocationService.GetByName:input_type -> nebius.vpc.v1alpha1.GetAllocationByNameRequest + 2, // 7: nebius.vpc.v1alpha1.AllocationService.List:input_type -> nebius.vpc.v1alpha1.ListAllocationsRequest + 4, // 8: nebius.vpc.v1alpha1.AllocationService.Create:input_type -> nebius.vpc.v1alpha1.CreateAllocationRequest + 5, // 9: nebius.vpc.v1alpha1.AllocationService.Update:input_type -> nebius.vpc.v1alpha1.UpdateAllocationRequest + 6, // 10: nebius.vpc.v1alpha1.AllocationService.Delete:input_type -> nebius.vpc.v1alpha1.DeleteAllocationRequest + 7, // 11: nebius.vpc.v1alpha1.AllocationService.Get:output_type -> nebius.vpc.v1alpha1.Allocation + 7, // 12: nebius.vpc.v1alpha1.AllocationService.GetByName:output_type -> nebius.vpc.v1alpha1.Allocation + 3, // 13: nebius.vpc.v1alpha1.AllocationService.List:output_type -> nebius.vpc.v1alpha1.ListAllocationsResponse + 10, // 14: nebius.vpc.v1alpha1.AllocationService.Create:output_type -> nebius.common.v1alpha1.Operation + 10, // 15: nebius.vpc.v1alpha1.AllocationService.Update:output_type -> nebius.common.v1alpha1.Operation + 10, // 16: nebius.vpc.v1alpha1.AllocationService.Delete:output_type -> nebius.common.v1alpha1.Operation + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_allocation_service_proto_init() } +func file_nebius_vpc_v1alpha1_allocation_service_proto_init() { + if File_nebius_vpc_v1alpha1_allocation_service_proto != nil { + return + } + file_nebius_vpc_v1alpha1_allocation_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetAllocationByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListAllocationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListAllocationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteAllocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_allocation_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1alpha1_allocation_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_allocation_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_allocation_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_allocation_service_proto = out.File + file_nebius_vpc_v1alpha1_allocation_service_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_allocation_service_proto_goTypes = nil + file_nebius_vpc_v1alpha1_allocation_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/allocation_service.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/allocation_service.sensitive.pb.go new file mode 100644 index 0000000..69e7041 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/allocation_service.sensitive.pb.go @@ -0,0 +1,24 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetAllocationByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetAllocationByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAllocationsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAllocationsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListAllocationsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListAllocationsResponse) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *CreateAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *CreateAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *UpdateAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *UpdateAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *DeleteAllocationRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *DeleteAllocationRequest) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/allocation_service_grpc.pb.go b/proto/nebius/vpc/v1alpha1/allocation_service_grpc.pb.go new file mode 100644 index 0000000..52d835f --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/allocation_service_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1alpha1/allocation_service.proto + +package v1alpha1 + +import ( + context "context" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AllocationService_Get_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/Get" + AllocationService_GetByName_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/GetByName" + AllocationService_List_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/List" + AllocationService_Create_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/Create" + AllocationService_Update_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/Update" + AllocationService_Delete_FullMethodName = "/nebius.vpc.v1alpha1.AllocationService/Delete" +) + +// AllocationServiceClient is the client API for AllocationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AllocationServiceClient interface { + Get(ctx context.Context, in *GetAllocationRequest, opts ...grpc.CallOption) (*Allocation, error) + GetByName(ctx context.Context, in *GetAllocationByNameRequest, opts ...grpc.CallOption) (*Allocation, error) + List(ctx context.Context, in *ListAllocationsRequest, opts ...grpc.CallOption) (*ListAllocationsResponse, error) + Create(ctx context.Context, in *CreateAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Update(ctx context.Context, in *UpdateAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) + Delete(ctx context.Context, in *DeleteAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) +} + +type allocationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAllocationServiceClient(cc grpc.ClientConnInterface) AllocationServiceClient { + return &allocationServiceClient{cc} +} + +func (c *allocationServiceClient) Get(ctx context.Context, in *GetAllocationRequest, opts ...grpc.CallOption) (*Allocation, error) { + out := new(Allocation) + err := c.cc.Invoke(ctx, AllocationService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) GetByName(ctx context.Context, in *GetAllocationByNameRequest, opts ...grpc.CallOption) (*Allocation, error) { + out := new(Allocation) + err := c.cc.Invoke(ctx, AllocationService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) List(ctx context.Context, in *ListAllocationsRequest, opts ...grpc.CallOption) (*ListAllocationsResponse, error) { + out := new(ListAllocationsResponse) + err := c.cc.Invoke(ctx, AllocationService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Create(ctx context.Context, in *CreateAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Create_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Update(ctx context.Context, in *UpdateAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Update_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *allocationServiceClient) Delete(ctx context.Context, in *DeleteAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Operation, error) { + out := new(v1alpha1.Operation) + err := c.cc.Invoke(ctx, AllocationService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AllocationServiceServer is the server API for AllocationService service. +// All implementations should embed UnimplementedAllocationServiceServer +// for forward compatibility +type AllocationServiceServer interface { + Get(context.Context, *GetAllocationRequest) (*Allocation, error) + GetByName(context.Context, *GetAllocationByNameRequest) (*Allocation, error) + List(context.Context, *ListAllocationsRequest) (*ListAllocationsResponse, error) + Create(context.Context, *CreateAllocationRequest) (*v1alpha1.Operation, error) + Update(context.Context, *UpdateAllocationRequest) (*v1alpha1.Operation, error) + Delete(context.Context, *DeleteAllocationRequest) (*v1alpha1.Operation, error) +} + +// UnimplementedAllocationServiceServer should be embedded to have forward compatible implementations. +type UnimplementedAllocationServiceServer struct { +} + +func (UnimplementedAllocationServiceServer) Get(context.Context, *GetAllocationRequest) (*Allocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedAllocationServiceServer) GetByName(context.Context, *GetAllocationByNameRequest) (*Allocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedAllocationServiceServer) List(context.Context, *ListAllocationsRequest) (*ListAllocationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedAllocationServiceServer) Create(context.Context, *CreateAllocationRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedAllocationServiceServer) Update(context.Context, *UpdateAllocationRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedAllocationServiceServer) Delete(context.Context, *DeleteAllocationRequest) (*v1alpha1.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + +// UnsafeAllocationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AllocationServiceServer will +// result in compilation errors. +type UnsafeAllocationServiceServer interface { + mustEmbedUnimplementedAllocationServiceServer() +} + +func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer) { + s.RegisterService(&AllocationService_ServiceDesc, srv) +} + +func _AllocationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Get(ctx, req.(*GetAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllocationByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).GetByName(ctx, req.(*GetAllocationByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAllocationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).List(ctx, req.(*ListAllocationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Create(ctx, req.(*CreateAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Update(ctx, req.(*UpdateAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AllocationService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AllocationServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AllocationService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AllocationServiceServer).Delete(ctx, req.(*DeleteAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AllocationService_ServiceDesc is the grpc.ServiceDesc for AllocationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AllocationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1alpha1.AllocationService", + HandlerType: (*AllocationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _AllocationService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _AllocationService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _AllocationService_List_Handler, + }, + { + MethodName: "Create", + Handler: _AllocationService_Create_Handler, + }, + { + MethodName: "Update", + Handler: _AllocationService_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _AllocationService_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1alpha1/allocation_service.proto", +} diff --git a/proto/nebius/vpc/v1alpha1/network.pb.go b/proto/nebius/vpc/v1alpha1/network.pb.go new file mode 100644 index 0000000..e7e3760 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/network.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the network. +type NetworkStatus_State int32 + +const ( + NetworkStatus_STATE_UNSPECIFIED NetworkStatus_State = 0 // Default state, unspecified. + NetworkStatus_CREATING NetworkStatus_State = 1 // Network is being created. + NetworkStatus_READY NetworkStatus_State = 2 // Network is ready for use. + NetworkStatus_DELETING NetworkStatus_State = 3 // Network is being deleted. +) + +// Enum value maps for NetworkStatus_State. +var ( + NetworkStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + NetworkStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x NetworkStatus_State) Enum() *NetworkStatus_State { + p := new(NetworkStatus_State) + *p = x + return p +} + +func (x NetworkStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NetworkStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_network_proto_enumTypes[0].Descriptor() +} + +func (NetworkStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_network_proto_enumTypes[0] +} + +func (x NetworkStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NetworkStatus_State.Descriptor instead. +func (NetworkStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP(), []int{3, 0} +} + +// Defines a Network, which serves as a virtual representation of a traditional LAN +// within a cloud environment. +// Networks facilitate communication between subnets. +type Network struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the network resource. + // `metadata.parent_id` represents IAM container + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the network. + Spec *NetworkSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status of the network. + Status *NetworkStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Network) Reset() { + *x = Network{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Network) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Network) ProtoMessage() {} + +func (x *Network) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Network.ProtoReflect.Descriptor instead. +func (*Network) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP(), []int{0} +} + +func (x *Network) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Network) GetSpec() *NetworkSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Network) GetStatus() *NetworkStatus { + if x != nil { + return x.Status + } + return nil +} + +type NetworkSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pools for addresses + Pools []*NetworkPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` +} + +func (x *NetworkSpec) Reset() { + *x = NetworkSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkSpec) ProtoMessage() {} + +func (x *NetworkSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkSpec.ProtoReflect.Descriptor instead. +func (*NetworkSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP(), []int{1} +} + +func (x *NetworkSpec) GetPools() []*NetworkPool { + if x != nil { + return x.Pools + } + return nil +} + +type NetworkPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PoolId string `protobuf:"bytes,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` +} + +func (x *NetworkPool) Reset() { + *x = NetworkPool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkPool) ProtoMessage() {} + +func (x *NetworkPool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkPool.ProtoReflect.Descriptor instead. +func (*NetworkPool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP(), []int{2} +} + +func (x *NetworkPool) GetPoolId() string { + if x != nil { + return x.PoolId + } + return "" +} + +type NetworkStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the network. + State NetworkStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.NetworkStatus_State" json:"state,omitempty"` + // Scope ID of all pools + ScopeId string `protobuf:"bytes,2,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty"` +} + +func (x *NetworkStatus) Reset() { + *x = NetworkStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkStatus) ProtoMessage() {} + +func (x *NetworkStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkStatus.ProtoReflect.Descriptor instead. +func (*NetworkStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP(), []int{3} +} + +func (x *NetworkStatus) GetState() NetworkStatus_State { + if x != nil { + return x.State + } + return NetworkStatus_STATE_UNSPECIFIED +} + +func (x *NetworkStatus) GetScopeId() string { + if x != nil { + return x.ScopeId + } + return "" +} + +var File_nebius_vpc_v1alpha1_network_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_network_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x34, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x45, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x2e, 0x0a, 0x0b, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x0d, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, + 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, + 0x5f, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_network_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_network_proto_rawDescData = file_nebius_vpc_v1alpha1_network_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_network_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_network_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_network_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_network_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1alpha1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1alpha1_network_proto_goTypes = []any{ + (NetworkStatus_State)(0), // 0: nebius.vpc.v1alpha1.NetworkStatus.State + (*Network)(nil), // 1: nebius.vpc.v1alpha1.Network + (*NetworkSpec)(nil), // 2: nebius.vpc.v1alpha1.NetworkSpec + (*NetworkPool)(nil), // 3: nebius.vpc.v1alpha1.NetworkPool + (*NetworkStatus)(nil), // 4: nebius.vpc.v1alpha1.NetworkStatus + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata +} +var file_nebius_vpc_v1alpha1_network_proto_depIdxs = []int32{ + 5, // 0: nebius.vpc.v1alpha1.Network.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1alpha1.Network.spec:type_name -> nebius.vpc.v1alpha1.NetworkSpec + 4, // 2: nebius.vpc.v1alpha1.Network.status:type_name -> nebius.vpc.v1alpha1.NetworkStatus + 3, // 3: nebius.vpc.v1alpha1.NetworkSpec.pools:type_name -> nebius.vpc.v1alpha1.NetworkPool + 0, // 4: nebius.vpc.v1alpha1.NetworkStatus.state:type_name -> nebius.vpc.v1alpha1.NetworkStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_network_proto_init() } +func file_nebius_vpc_v1alpha1_network_proto_init() { + if File_nebius_vpc_v1alpha1_network_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_network_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Network); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*NetworkSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*NetworkPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NetworkStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_network_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_network_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_network_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1alpha1_network_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1alpha1_network_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_network_proto = out.File + file_nebius_vpc_v1alpha1_network_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_network_proto_goTypes = nil + file_nebius_vpc_v1alpha1_network_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/network.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/network.sensitive.pb.go new file mode 100644 index 0000000..11f1fab --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Network) Sanitize() // is not generated as no sensitive fields found +// func (x *Network) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkPool) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkPool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/network_interface.pb.go b/proto/nebius/vpc/v1alpha1/network_interface.pb.go new file mode 100644 index 0000000..80cca11 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network_interface.pb.go @@ -0,0 +1,640 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/network_interface.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Describes the specification of a network interface. +type NetworkInterfaceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Subnet ID + SubnetId string `protobuf:"bytes,1,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` + // Name for interface. + // Must be unique within instance's network interfaces + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Private IPv4 address associated with the interface. + IpAddress *IPAddress `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + // Public IPv4 address associated with the interface. + PublicIpAddress *PublicIPAddress `protobuf:"bytes,4,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` +} + +func (x *NetworkInterfaceSpec) Reset() { + *x = NetworkInterfaceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceSpec) ProtoMessage() {} + +func (x *NetworkInterfaceSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceSpec.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{0} +} + +func (x *NetworkInterfaceSpec) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +func (x *NetworkInterfaceSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NetworkInterfaceSpec) GetIpAddress() *IPAddress { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *NetworkInterfaceSpec) GetPublicIpAddress() *PublicIPAddress { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +// Describes an IPv4 address. +type IPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Allocation identifier if it was created before. + AllocationId string `protobuf:"bytes,1,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *IPAddress) Reset() { + *x = IPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPAddress) ProtoMessage() {} + +func (x *IPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPAddress.ProtoReflect.Descriptor instead. +func (*IPAddress) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{1} +} + +func (x *IPAddress) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +// Describes a public IP address. +type PublicIPAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes different methods of public IP address allocation. + // + // Types that are assignable to Allocation: + // + // *PublicIPAddress_AllocationId + Allocation isPublicIPAddress_Allocation `protobuf_oneof:"allocation"` + // If false - Lifecycle of allocation depends on NetworkInterface.Allocate/NetworkInterface.Deallocate + // If true - Lifecycle of allocation depends on NetworkInterface.Create/NetworkInterface.Delete + // False by default + Static bool `protobuf:"varint,3,opt,name=static,proto3" json:"static,omitempty"` +} + +func (x *PublicIPAddress) Reset() { + *x = PublicIPAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddress) ProtoMessage() {} + +func (x *PublicIPAddress) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddress.ProtoReflect.Descriptor instead. +func (*PublicIPAddress) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{2} +} + +func (m *PublicIPAddress) GetAllocation() isPublicIPAddress_Allocation { + if m != nil { + return m.Allocation + } + return nil +} + +func (x *PublicIPAddress) GetAllocationId() string { + if x, ok := x.GetAllocation().(*PublicIPAddress_AllocationId); ok { + return x.AllocationId + } + return "" +} + +func (x *PublicIPAddress) GetStatic() bool { + if x != nil { + return x.Static + } + return false +} + +type isPublicIPAddress_Allocation interface { + isPublicIPAddress_Allocation() +} + +type PublicIPAddress_AllocationId struct { + // Allocation identifier if it was created before. + AllocationId string `protobuf:"bytes,1,opt,name=allocation_id,json=allocationId,proto3,oneof"` +} + +func (*PublicIPAddress_AllocationId) isPublicIPAddress_Allocation() {} + +// Describes the status of a network interface. +type NetworkInterfaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The index of the network interface + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + // Name for interface. + // Unique within instance's network interfaces + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Effective Private IPv4 address + IpAddress *IPAddressStatus `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + // Effective Public IPv4 address + PublicIpAddress *PublicIPAddressStatus `protobuf:"bytes,4,opt,name=public_ip_address,json=publicIpAddress,proto3" json:"public_ip_address,omitempty"` + // MAC address + MacAddress string `protobuf:"bytes,7,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"` +} + +func (x *NetworkInterfaceStatus) Reset() { + *x = NetworkInterfaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterfaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterfaceStatus) ProtoMessage() {} + +func (x *NetworkInterfaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterfaceStatus.ProtoReflect.Descriptor instead. +func (*NetworkInterfaceStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{3} +} + +func (x *NetworkInterfaceStatus) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *NetworkInterfaceStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NetworkInterfaceStatus) GetIpAddress() *IPAddressStatus { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *NetworkInterfaceStatus) GetPublicIpAddress() *PublicIPAddressStatus { + if x != nil { + return x.PublicIpAddress + } + return nil +} + +func (x *NetworkInterfaceStatus) GetMacAddress() string { + if x != nil { + return x.MacAddress + } + return "" +} + +type IPAddressStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Effective private IPv4 address assigned to the interface. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Allocation identifier. + AllocationId string `protobuf:"bytes,2,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *IPAddressStatus) Reset() { + *x = IPAddressStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPAddressStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPAddressStatus) ProtoMessage() {} + +func (x *IPAddressStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPAddressStatus.ProtoReflect.Descriptor instead. +func (*IPAddressStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{4} +} + +func (x *IPAddressStatus) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *IPAddressStatus) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +type PublicIPAddressStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Effective public IPv4 address assigned to the interface. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Allocation identifier. + AllocationId string `protobuf:"bytes,2,opt,name=allocation_id,json=allocationId,proto3" json:"allocation_id,omitempty"` +} + +func (x *PublicIPAddressStatus) Reset() { + *x = PublicIPAddressStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicIPAddressStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicIPAddressStatus) ProtoMessage() {} + +func (x *PublicIPAddressStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicIPAddressStatus.ProtoReflect.Descriptor instead. +func (*PublicIPAddressStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP(), []int{5} +} + +func (x *PublicIPAddressStatus) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PublicIPAddressStatus) GetAllocationId() string { + if x != nil { + return x.AllocationId + } + return "" +} + +var File_nebius_vpc_v1alpha1_network_interface_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_network_interface_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x14, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, + 0x02, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xba, 0x48, 0x1f, 0xc8, 0x01, + 0x01, 0x72, 0x1a, 0x10, 0x01, 0x18, 0x3c, 0x32, 0x14, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, + 0x7a, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2a, 0x24, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x50, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, 0x09, 0x69, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x06, 0x52, + 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x30, 0x0a, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x42, 0x0c, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x80, 0x02, 0x0a, 0x16, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x11, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x0f, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x15, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, + 0x68, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_network_interface_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_network_interface_proto_rawDescData = file_nebius_vpc_v1alpha1_network_interface_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_network_interface_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_network_interface_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_network_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_network_interface_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_network_interface_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_vpc_v1alpha1_network_interface_proto_goTypes = []any{ + (*NetworkInterfaceSpec)(nil), // 0: nebius.vpc.v1alpha1.NetworkInterfaceSpec + (*IPAddress)(nil), // 1: nebius.vpc.v1alpha1.IPAddress + (*PublicIPAddress)(nil), // 2: nebius.vpc.v1alpha1.PublicIPAddress + (*NetworkInterfaceStatus)(nil), // 3: nebius.vpc.v1alpha1.NetworkInterfaceStatus + (*IPAddressStatus)(nil), // 4: nebius.vpc.v1alpha1.IPAddressStatus + (*PublicIPAddressStatus)(nil), // 5: nebius.vpc.v1alpha1.PublicIPAddressStatus +} +var file_nebius_vpc_v1alpha1_network_interface_proto_depIdxs = []int32{ + 1, // 0: nebius.vpc.v1alpha1.NetworkInterfaceSpec.ip_address:type_name -> nebius.vpc.v1alpha1.IPAddress + 2, // 1: nebius.vpc.v1alpha1.NetworkInterfaceSpec.public_ip_address:type_name -> nebius.vpc.v1alpha1.PublicIPAddress + 4, // 2: nebius.vpc.v1alpha1.NetworkInterfaceStatus.ip_address:type_name -> nebius.vpc.v1alpha1.IPAddressStatus + 5, // 3: nebius.vpc.v1alpha1.NetworkInterfaceStatus.public_ip_address:type_name -> nebius.vpc.v1alpha1.PublicIPAddressStatus + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_network_interface_proto_init() } +func file_nebius_vpc_v1alpha1_network_interface_proto_init() { + if File_nebius_vpc_v1alpha1_network_interface_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*IPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*NetworkInterfaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*IPAddressStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*PublicIPAddressStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes[2].OneofWrappers = []any{ + (*PublicIPAddress_AllocationId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_network_interface_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_network_interface_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_network_interface_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_network_interface_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_network_interface_proto = out.File + file_nebius_vpc_v1alpha1_network_interface_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_network_interface_proto_goTypes = nil + file_nebius_vpc_v1alpha1_network_interface_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/network_interface.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/network_interface.sensitive.pb.go new file mode 100644 index 0000000..4e729d5 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network_interface.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *NetworkInterfaceSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *IPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddress) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddress) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *NetworkInterfaceStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *NetworkInterfaceStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *IPAddressStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *IPAddressStatus) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PublicIPAddressStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *PublicIPAddressStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/network_service.pb.go b/proto/nebius/vpc/v1alpha1/network_service.pb.go new file mode 100644 index 0000000..e2713d5 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network_service.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/network_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetNetworkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetNetworkRequest) Reset() { + *x = GetNetworkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkRequest) ProtoMessage() {} + +func (x *GetNetworkRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetNetworkRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetNetworkByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetNetworkByNameRequest) Reset() { + *x = GetNetworkByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkByNameRequest) ProtoMessage() {} + +func (x *GetNetworkByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkByNameRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNetworkByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetNetworkByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListNetworksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListNetworksRequest) Reset() { + *x = ListNetworksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksRequest) ProtoMessage() {} + +func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksRequest.ProtoReflect.Descriptor instead. +func (*ListNetworksRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListNetworksRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListNetworksRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListNetworksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListNetworksRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListNetworksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Network `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListNetworksResponse) Reset() { + *x = ListNetworksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksResponse) ProtoMessage() {} + +func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksResponse.ProtoReflect.Descriptor instead. +func (*ListNetworksResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_network_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListNetworksResponse) GetItems() []*Network { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListNetworksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1alpha1_network_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_network_service_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x72, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x93, + 0x02, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x57, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x5b, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x66, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x13, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_network_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_network_service_proto_rawDescData = file_nebius_vpc_v1alpha1_network_service_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_network_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_network_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_network_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_network_service_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_network_service_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_network_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1alpha1_network_service_proto_goTypes = []any{ + (*GetNetworkRequest)(nil), // 0: nebius.vpc.v1alpha1.GetNetworkRequest + (*GetNetworkByNameRequest)(nil), // 1: nebius.vpc.v1alpha1.GetNetworkByNameRequest + (*ListNetworksRequest)(nil), // 2: nebius.vpc.v1alpha1.ListNetworksRequest + (*ListNetworksResponse)(nil), // 3: nebius.vpc.v1alpha1.ListNetworksResponse + (*Network)(nil), // 4: nebius.vpc.v1alpha1.Network +} +var file_nebius_vpc_v1alpha1_network_service_proto_depIdxs = []int32{ + 4, // 0: nebius.vpc.v1alpha1.ListNetworksResponse.items:type_name -> nebius.vpc.v1alpha1.Network + 0, // 1: nebius.vpc.v1alpha1.NetworkService.Get:input_type -> nebius.vpc.v1alpha1.GetNetworkRequest + 1, // 2: nebius.vpc.v1alpha1.NetworkService.GetByName:input_type -> nebius.vpc.v1alpha1.GetNetworkByNameRequest + 2, // 3: nebius.vpc.v1alpha1.NetworkService.List:input_type -> nebius.vpc.v1alpha1.ListNetworksRequest + 4, // 4: nebius.vpc.v1alpha1.NetworkService.Get:output_type -> nebius.vpc.v1alpha1.Network + 4, // 5: nebius.vpc.v1alpha1.NetworkService.GetByName:output_type -> nebius.vpc.v1alpha1.Network + 3, // 6: nebius.vpc.v1alpha1.NetworkService.List:output_type -> nebius.vpc.v1alpha1.ListNetworksResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_network_service_proto_init() } +func file_nebius_vpc_v1alpha1_network_service_proto_init() { + if File_nebius_vpc_v1alpha1_network_service_proto != nil { + return + } + file_nebius_vpc_v1alpha1_network_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListNetworksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_network_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListNetworksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_network_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1alpha1_network_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_network_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_network_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_network_service_proto = out.File + file_nebius_vpc_v1alpha1_network_service_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_network_service_proto_goTypes = nil + file_nebius_vpc_v1alpha1_network_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/network_service.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/network_service.sensitive.pb.go new file mode 100644 index 0000000..b375675 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetNetworkRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNetworkRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetNetworkByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetNetworkByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNetworksRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNetworksRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListNetworksResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListNetworksResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/network_service_grpc.pb.go b/proto/nebius/vpc/v1alpha1/network_service_grpc.pb.go new file mode 100644 index 0000000..f80fae2 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/network_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1alpha1/network_service.proto + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NetworkService_Get_FullMethodName = "/nebius.vpc.v1alpha1.NetworkService/Get" + NetworkService_GetByName_FullMethodName = "/nebius.vpc.v1alpha1.NetworkService/GetByName" + NetworkService_List_FullMethodName = "/nebius.vpc.v1alpha1.NetworkService/List" +) + +// NetworkServiceClient is the client API for NetworkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NetworkServiceClient interface { + Get(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*Network, error) + GetByName(ctx context.Context, in *GetNetworkByNameRequest, opts ...grpc.CallOption) (*Network, error) + List(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error) +} + +type networkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNetworkServiceClient(cc grpc.ClientConnInterface) NetworkServiceClient { + return &networkServiceClient{cc} +} + +func (c *networkServiceClient) Get(ctx context.Context, in *GetNetworkRequest, opts ...grpc.CallOption) (*Network, error) { + out := new(Network) + err := c.cc.Invoke(ctx, NetworkService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkServiceClient) GetByName(ctx context.Context, in *GetNetworkByNameRequest, opts ...grpc.CallOption) (*Network, error) { + out := new(Network) + err := c.cc.Invoke(ctx, NetworkService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkServiceClient) List(ctx context.Context, in *ListNetworksRequest, opts ...grpc.CallOption) (*ListNetworksResponse, error) { + out := new(ListNetworksResponse) + err := c.cc.Invoke(ctx, NetworkService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkServiceServer is the server API for NetworkService service. +// All implementations should embed UnimplementedNetworkServiceServer +// for forward compatibility +type NetworkServiceServer interface { + Get(context.Context, *GetNetworkRequest) (*Network, error) + GetByName(context.Context, *GetNetworkByNameRequest) (*Network, error) + List(context.Context, *ListNetworksRequest) (*ListNetworksResponse, error) +} + +// UnimplementedNetworkServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNetworkServiceServer struct { +} + +func (UnimplementedNetworkServiceServer) Get(context.Context, *GetNetworkRequest) (*Network, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedNetworkServiceServer) GetByName(context.Context, *GetNetworkByNameRequest) (*Network, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedNetworkServiceServer) List(context.Context, *ListNetworksRequest) (*ListNetworksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeNetworkServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NetworkServiceServer will +// result in compilation errors. +type UnsafeNetworkServiceServer interface { + mustEmbedUnimplementedNetworkServiceServer() +} + +func RegisterNetworkServiceServer(s grpc.ServiceRegistrar, srv NetworkServiceServer) { + s.RegisterService(&NetworkService_ServiceDesc, srv) +} + +func _NetworkService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).Get(ctx, req.(*GetNetworkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).GetByName(ctx, req.(*GetNetworkByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NetworkService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNetworksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NetworkService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).List(ctx, req.(*ListNetworksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NetworkService_ServiceDesc is the grpc.ServiceDesc for NetworkService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NetworkService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1alpha1.NetworkService", + HandlerType: (*NetworkServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _NetworkService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _NetworkService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _NetworkService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1alpha1/network_service.proto", +} diff --git a/proto/nebius/vpc/v1alpha1/pool.pb.go b/proto/nebius/vpc/v1alpha1/pool.pb.go new file mode 100644 index 0000000..71f56e2 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/pool.pb.go @@ -0,0 +1,689 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/pool.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PoolCidrState int32 + +const ( + PoolCidrState_STATE_UNSPECIFIED PoolCidrState = 0 // Default, unspecified state. + PoolCidrState_AVAILABLE PoolCidrState = 1 // Allocation from range is available. + PoolCidrState_DISABLED PoolCidrState = 2 // New allocation would not be created. +) + +// Enum value maps for PoolCidrState. +var ( + PoolCidrState_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "AVAILABLE", + 2: "DISABLED", + } + PoolCidrState_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "AVAILABLE": 1, + "DISABLED": 2, + } +) + +func (x PoolCidrState) Enum() *PoolCidrState { + p := new(PoolCidrState) + *p = x + return p +} + +func (x PoolCidrState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PoolCidrState) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_pool_proto_enumTypes[0].Descriptor() +} + +func (PoolCidrState) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_pool_proto_enumTypes[0] +} + +func (x PoolCidrState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PoolCidrState.Descriptor instead. +func (PoolCidrState) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{0} +} + +type IpVersion int32 + +const ( + IpVersion_IP_VERSION_UNSPECIFIED IpVersion = 0 // Default, unspecified IP version. + IpVersion_IPV4 IpVersion = 1 // IPv4 address. + IpVersion_IPV6 IpVersion = 2 // IPv6 address. +) + +// Enum value maps for IpVersion. +var ( + IpVersion_name = map[int32]string{ + 0: "IP_VERSION_UNSPECIFIED", + 1: "IPV4", + 2: "IPV6", + } + IpVersion_value = map[string]int32{ + "IP_VERSION_UNSPECIFIED": 0, + "IPV4": 1, + "IPV6": 2, + } +) + +func (x IpVersion) Enum() *IpVersion { + p := new(IpVersion) + *p = x + return p +} + +func (x IpVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IpVersion) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_pool_proto_enumTypes[1].Descriptor() +} + +func (IpVersion) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_pool_proto_enumTypes[1] +} + +func (x IpVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IpVersion.Descriptor instead. +func (IpVersion) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{1} +} + +// Possible states of the Pool. +type PoolStatus_State int32 + +const ( + PoolStatus_STATE_UNSPECIFIED PoolStatus_State = 0 // Default, unspecified state. + PoolStatus_CREATING PoolStatus_State = 1 // Pool is being created. + PoolStatus_READY PoolStatus_State = 2 // Pool is ready for use. + PoolStatus_DELETING PoolStatus_State = 3 // Pool is being deleted. +) + +// Enum value maps for PoolStatus_State. +var ( + PoolStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + PoolStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x PoolStatus_State) Enum() *PoolStatus_State { + p := new(PoolStatus_State) + *p = x + return p +} + +func (x PoolStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PoolStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_pool_proto_enumTypes[2].Descriptor() +} + +func (PoolStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_pool_proto_enumTypes[2] +} + +func (x PoolStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PoolStatus_State.Descriptor instead. +func (PoolStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{3, 0} +} + +type Pool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the Pool. + // `metadata.parent_id` represents the Project. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the Pool. + Spec *PoolSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status information for the Pool. + Status *PoolStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Pool) Reset() { + *x = Pool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pool) ProtoMessage() {} + +func (x *Pool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pool.ProtoReflect.Descriptor instead. +func (*Pool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{0} +} + +func (x *Pool) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Pool) GetSpec() *PoolSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Pool) GetStatus() *PoolStatus { + if x != nil { + return x.Status + } + return nil +} + +type PoolSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Source: + // + // *PoolSpec_SourcePoolId + // *PoolSpec_SourceScopeId + Source isPoolSpec_Source `protobuf_oneof:"source"` + // IP version for the Pool. + Version IpVersion `protobuf:"varint,3,opt,name=version,proto3,enum=nebius.vpc.v1alpha1.IpVersion" json:"version,omitempty"` + // CIDR blocks. + Cidrs []*PoolCidr `protobuf:"bytes,4,rep,name=cidrs,proto3" json:"cidrs,omitempty"` +} + +func (x *PoolSpec) Reset() { + *x = PoolSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolSpec) ProtoMessage() {} + +func (x *PoolSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolSpec.ProtoReflect.Descriptor instead. +func (*PoolSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{1} +} + +func (m *PoolSpec) GetSource() isPoolSpec_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *PoolSpec) GetSourcePoolId() string { + if x, ok := x.GetSource().(*PoolSpec_SourcePoolId); ok { + return x.SourcePoolId + } + return "" +} + +func (x *PoolSpec) GetSourceScopeId() string { + if x, ok := x.GetSource().(*PoolSpec_SourceScopeId); ok { + return x.SourceScopeId + } + return "" +} + +func (x *PoolSpec) GetVersion() IpVersion { + if x != nil { + return x.Version + } + return IpVersion_IP_VERSION_UNSPECIFIED +} + +func (x *PoolSpec) GetCidrs() []*PoolCidr { + if x != nil { + return x.Cidrs + } + return nil +} + +type isPoolSpec_Source interface { + isPoolSpec_Source() +} + +type PoolSpec_SourcePoolId struct { + // ID of source pool. Current pool will be created with the same scope. + SourcePoolId string `protobuf:"bytes,1,opt,name=source_pool_id,json=sourcePoolId,proto3,oneof"` +} + +type PoolSpec_SourceScopeId struct { + // ID of the scope. Pool will be considered as top-level pool within scope. + SourceScopeId string `protobuf:"bytes,2,opt,name=source_scope_id,json=sourceScopeId,proto3,oneof"` +} + +func (*PoolSpec_SourcePoolId) isPoolSpec_Source() {} + +func (*PoolSpec_SourceScopeId) isPoolSpec_Source() {} + +type PoolCidr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block. + // May be a prefix length (such as /24) for non-top-level pools + // or a CIDR-formatted string (such as 10.1.2.0/24). + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // State of the Cidr. + State PoolCidrState `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.PoolCidrState" json:"state,omitempty"` + // Maximum mask length for allocation from this IP pool including creation of sub-pools + AllowedMask int64 `protobuf:"varint,3,opt,name=allowed_mask,json=allowedMask,proto3" json:"allowed_mask,omitempty"` +} + +func (x *PoolCidr) Reset() { + *x = PoolCidr{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolCidr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolCidr) ProtoMessage() {} + +func (x *PoolCidr) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolCidr.ProtoReflect.Descriptor instead. +func (*PoolCidr) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{2} +} + +func (x *PoolCidr) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (x *PoolCidr) GetState() PoolCidrState { + if x != nil { + return x.State + } + return PoolCidrState_STATE_UNSPECIFIED +} + +func (x *PoolCidr) GetAllowedMask() int64 { + if x != nil { + return x.AllowedMask + } + return 0 +} + +type PoolStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the Pool. + State PoolStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.PoolStatus_State" json:"state,omitempty"` + // CIDR blocks. + Cidrs []string `protobuf:"bytes,2,rep,name=cidrs,proto3" json:"cidrs,omitempty"` + // ID of the scope + ScopeId string `protobuf:"bytes,3,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty"` +} + +func (x *PoolStatus) Reset() { + *x = PoolStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoolStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoolStatus) ProtoMessage() {} + +func (x *PoolStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoolStatus.ProtoReflect.Descriptor instead. +func (*PoolStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP(), []int{3} +} + +func (x *PoolStatus) GetState() PoolStatus_State { + if x != nil { + return x.State + } + return PoolStatus_STATE_UNSPECIFIED +} + +func (x *PoolStatus) GetCidrs() []string { + if x != nil { + return x.Cidrs + } + return nil +} + +func (x *PoolStatus) GetScopeId() string { + if x != nil { + return x.ScopeId + } + return "" +} + +var File_nebius_vpc_v1alpha1_pool_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_pool_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, + 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, + 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x2c, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, + 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xba, 0x4a, 0x01, 0x02, 0x48, 0x00, 0x52, 0x0d, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x44, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xba, 0x4a, 0x01, 0x02, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x69, 0x64, + 0x72, 0x52, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x42, 0x0f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x8f, 0x03, 0x0a, 0x08, 0x50, 0x6f, + 0x6f, 0x6c, 0x43, 0x69, 0x64, 0x72, 0x12, 0x8e, 0x02, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xf9, 0x01, 0xba, 0x48, 0xf5, 0x01, 0xba, 0x01, 0x9d, 0x01, + 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, + 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, + 0x61, 0x73, 0x6b, 0x1a, 0x58, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, + 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, + 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x31, 0x5b, 0x30, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x38, 0x5d, + 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, + 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x01, 0x4e, + 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x1a, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0xc8, 0x01, + 0x01, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, + 0x6c, 0x43, 0x69, 0x64, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x22, 0x05, 0x18, 0x80, 0x01, 0x28, 0x00, 0x52, 0x0b, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xc1, 0x01, 0x0a, 0x0a, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, + 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x2a, + 0x43, 0x0a, 0x0d, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x69, 0x64, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, 0x49, 0x4c, + 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, + 0x45, 0x44, 0x10, 0x02, 0x2a, 0x3b, 0x0a, 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x50, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x36, 0x10, + 0x02, 0x42, 0x5c, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, + 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x09, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_pool_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_pool_proto_rawDescData = file_nebius_vpc_v1alpha1_pool_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_pool_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_pool_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_pool_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_pool_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_pool_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_nebius_vpc_v1alpha1_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1alpha1_pool_proto_goTypes = []any{ + (PoolCidrState)(0), // 0: nebius.vpc.v1alpha1.PoolCidrState + (IpVersion)(0), // 1: nebius.vpc.v1alpha1.IpVersion + (PoolStatus_State)(0), // 2: nebius.vpc.v1alpha1.PoolStatus.State + (*Pool)(nil), // 3: nebius.vpc.v1alpha1.Pool + (*PoolSpec)(nil), // 4: nebius.vpc.v1alpha1.PoolSpec + (*PoolCidr)(nil), // 5: nebius.vpc.v1alpha1.PoolCidr + (*PoolStatus)(nil), // 6: nebius.vpc.v1alpha1.PoolStatus + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata +} +var file_nebius_vpc_v1alpha1_pool_proto_depIdxs = []int32{ + 7, // 0: nebius.vpc.v1alpha1.Pool.metadata:type_name -> nebius.common.v1.ResourceMetadata + 4, // 1: nebius.vpc.v1alpha1.Pool.spec:type_name -> nebius.vpc.v1alpha1.PoolSpec + 6, // 2: nebius.vpc.v1alpha1.Pool.status:type_name -> nebius.vpc.v1alpha1.PoolStatus + 1, // 3: nebius.vpc.v1alpha1.PoolSpec.version:type_name -> nebius.vpc.v1alpha1.IpVersion + 5, // 4: nebius.vpc.v1alpha1.PoolSpec.cidrs:type_name -> nebius.vpc.v1alpha1.PoolCidr + 0, // 5: nebius.vpc.v1alpha1.PoolCidr.state:type_name -> nebius.vpc.v1alpha1.PoolCidrState + 2, // 6: nebius.vpc.v1alpha1.PoolStatus.state:type_name -> nebius.vpc.v1alpha1.PoolStatus.State + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_pool_proto_init() } +func file_nebius_vpc_v1alpha1_pool_proto_init() { + if File_nebius_vpc_v1alpha1_pool_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_pool_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Pool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PoolSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PoolCidr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*PoolStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_vpc_v1alpha1_pool_proto_msgTypes[1].OneofWrappers = []any{ + (*PoolSpec_SourcePoolId)(nil), + (*PoolSpec_SourceScopeId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_pool_proto_rawDesc, + NumEnums: 3, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_pool_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_pool_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1alpha1_pool_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1alpha1_pool_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_pool_proto = out.File + file_nebius_vpc_v1alpha1_pool_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_pool_proto_goTypes = nil + file_nebius_vpc_v1alpha1_pool_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/pool.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/pool.sensitive.pb.go new file mode 100644 index 0000000..1515bbe --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/pool.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Pool) Sanitize() // is not generated as no sensitive fields found +// func (x *Pool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolCidr) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolCidr) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *PoolStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *PoolStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/pool_service.pb.go b/proto/nebius/vpc/v1alpha1/pool_service.pb.go new file mode 100644 index 0000000..e380dc9 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/pool_service.pb.go @@ -0,0 +1,421 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/pool_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPoolRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetPoolRequest) Reset() { + *x = GetPoolRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoolRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoolRequest) ProtoMessage() {} + +func (x *GetPoolRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoolRequest.ProtoReflect.Descriptor instead. +func (*GetPoolRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPoolRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetPoolByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPoolByNameRequest) Reset() { + *x = GetPoolByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoolByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoolByNameRequest) ProtoMessage() {} + +func (x *GetPoolByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoolByNameRequest.ProtoReflect.Descriptor instead. +func (*GetPoolByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPoolByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetPoolByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListPoolsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListPoolsRequest) Reset() { + *x = ListPoolsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPoolsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoolsRequest) ProtoMessage() {} + +func (x *ListPoolsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoolsRequest.ProtoReflect.Descriptor instead. +func (*ListPoolsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListPoolsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListPoolsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPoolsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListPoolsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListPoolsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Pool `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPoolsResponse) Reset() { + *x = ListPoolsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPoolsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPoolsResponse) ProtoMessage() {} + +func (x *ListPoolsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPoolsResponse.ProtoReflect.Descriptor instead. +func (*ListPoolsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_pool_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListPoolsResponse) GetItems() []*Pool { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListPoolsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1alpha1_pool_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_pool_service_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, + 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x6c, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xfe, 0x01, 0x0a, 0x0b, 0x50, 0x6f, + 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x03, 0x47, 0x65, 0x74, + 0x12, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, + 0x12, 0x51, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x6f, 0x6f, 0x6c, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, + 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x63, 0x0a, 0x1a, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_pool_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_pool_service_proto_rawDescData = file_nebius_vpc_v1alpha1_pool_service_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_pool_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_pool_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_pool_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_pool_service_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_pool_service_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1alpha1_pool_service_proto_goTypes = []any{ + (*GetPoolRequest)(nil), // 0: nebius.vpc.v1alpha1.GetPoolRequest + (*GetPoolByNameRequest)(nil), // 1: nebius.vpc.v1alpha1.GetPoolByNameRequest + (*ListPoolsRequest)(nil), // 2: nebius.vpc.v1alpha1.ListPoolsRequest + (*ListPoolsResponse)(nil), // 3: nebius.vpc.v1alpha1.ListPoolsResponse + (*Pool)(nil), // 4: nebius.vpc.v1alpha1.Pool +} +var file_nebius_vpc_v1alpha1_pool_service_proto_depIdxs = []int32{ + 4, // 0: nebius.vpc.v1alpha1.ListPoolsResponse.items:type_name -> nebius.vpc.v1alpha1.Pool + 0, // 1: nebius.vpc.v1alpha1.PoolService.Get:input_type -> nebius.vpc.v1alpha1.GetPoolRequest + 1, // 2: nebius.vpc.v1alpha1.PoolService.GetByName:input_type -> nebius.vpc.v1alpha1.GetPoolByNameRequest + 2, // 3: nebius.vpc.v1alpha1.PoolService.List:input_type -> nebius.vpc.v1alpha1.ListPoolsRequest + 4, // 4: nebius.vpc.v1alpha1.PoolService.Get:output_type -> nebius.vpc.v1alpha1.Pool + 4, // 5: nebius.vpc.v1alpha1.PoolService.GetByName:output_type -> nebius.vpc.v1alpha1.Pool + 3, // 6: nebius.vpc.v1alpha1.PoolService.List:output_type -> nebius.vpc.v1alpha1.ListPoolsResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_pool_service_proto_init() } +func file_nebius_vpc_v1alpha1_pool_service_proto_init() { + if File_nebius_vpc_v1alpha1_pool_service_proto != nil { + return + } + file_nebius_vpc_v1alpha1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetPoolRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetPoolByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListPoolsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListPoolsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_pool_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1alpha1_pool_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_pool_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_pool_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_pool_service_proto = out.File + file_nebius_vpc_v1alpha1_pool_service_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_pool_service_proto_goTypes = nil + file_nebius_vpc_v1alpha1_pool_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/pool_service.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/pool_service.sensitive.pb.go new file mode 100644 index 0000000..878b8bd --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/pool_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetPoolRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetPoolRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetPoolByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetPoolByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListPoolsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPoolsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListPoolsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListPoolsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/pool_service_grpc.pb.go b/proto/nebius/vpc/v1alpha1/pool_service_grpc.pb.go new file mode 100644 index 0000000..cc64553 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/pool_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1alpha1/pool_service.proto + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + PoolService_Get_FullMethodName = "/nebius.vpc.v1alpha1.PoolService/Get" + PoolService_GetByName_FullMethodName = "/nebius.vpc.v1alpha1.PoolService/GetByName" + PoolService_List_FullMethodName = "/nebius.vpc.v1alpha1.PoolService/List" +) + +// PoolServiceClient is the client API for PoolService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PoolServiceClient interface { + Get(ctx context.Context, in *GetPoolRequest, opts ...grpc.CallOption) (*Pool, error) + GetByName(ctx context.Context, in *GetPoolByNameRequest, opts ...grpc.CallOption) (*Pool, error) + List(ctx context.Context, in *ListPoolsRequest, opts ...grpc.CallOption) (*ListPoolsResponse, error) +} + +type poolServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPoolServiceClient(cc grpc.ClientConnInterface) PoolServiceClient { + return &poolServiceClient{cc} +} + +func (c *poolServiceClient) Get(ctx context.Context, in *GetPoolRequest, opts ...grpc.CallOption) (*Pool, error) { + out := new(Pool) + err := c.cc.Invoke(ctx, PoolService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *poolServiceClient) GetByName(ctx context.Context, in *GetPoolByNameRequest, opts ...grpc.CallOption) (*Pool, error) { + out := new(Pool) + err := c.cc.Invoke(ctx, PoolService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *poolServiceClient) List(ctx context.Context, in *ListPoolsRequest, opts ...grpc.CallOption) (*ListPoolsResponse, error) { + out := new(ListPoolsResponse) + err := c.cc.Invoke(ctx, PoolService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PoolServiceServer is the server API for PoolService service. +// All implementations should embed UnimplementedPoolServiceServer +// for forward compatibility +type PoolServiceServer interface { + Get(context.Context, *GetPoolRequest) (*Pool, error) + GetByName(context.Context, *GetPoolByNameRequest) (*Pool, error) + List(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error) +} + +// UnimplementedPoolServiceServer should be embedded to have forward compatible implementations. +type UnimplementedPoolServiceServer struct { +} + +func (UnimplementedPoolServiceServer) Get(context.Context, *GetPoolRequest) (*Pool, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedPoolServiceServer) GetByName(context.Context, *GetPoolByNameRequest) (*Pool, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedPoolServiceServer) List(context.Context, *ListPoolsRequest) (*ListPoolsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafePoolServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PoolServiceServer will +// result in compilation errors. +type UnsafePoolServiceServer interface { + mustEmbedUnimplementedPoolServiceServer() +} + +func RegisterPoolServiceServer(s grpc.ServiceRegistrar, srv PoolServiceServer) { + s.RegisterService(&PoolService_ServiceDesc, srv) +} + +func _PoolService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).Get(ctx, req.(*GetPoolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PoolService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoolByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).GetByName(ctx, req.(*GetPoolByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PoolService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPoolsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoolServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PoolService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoolServiceServer).List(ctx, req.(*ListPoolsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PoolService_ServiceDesc is the grpc.ServiceDesc for PoolService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PoolService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1alpha1.PoolService", + HandlerType: (*PoolServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _PoolService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _PoolService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _PoolService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1alpha1/pool_service.proto", +} diff --git a/proto/nebius/vpc/v1alpha1/scope.pb.go b/proto/nebius/vpc/v1alpha1/scope.pb.go new file mode 100644 index 0000000..b60c3e6 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/scope.pb.go @@ -0,0 +1,437 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/scope.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Type of scope. +type ScopeSpec_Type int32 + +const ( + ScopeSpec_SCOPE_TYPE_UNSPECIFIED ScopeSpec_Type = 0 // Default, unspecified scope type. + ScopeSpec_PUBLIC ScopeSpec_Type = 1 // Public scope. + ScopeSpec_PRIVATE ScopeSpec_Type = 2 // Private scope. +) + +// Enum value maps for ScopeSpec_Type. +var ( + ScopeSpec_Type_name = map[int32]string{ + 0: "SCOPE_TYPE_UNSPECIFIED", + 1: "PUBLIC", + 2: "PRIVATE", + } + ScopeSpec_Type_value = map[string]int32{ + "SCOPE_TYPE_UNSPECIFIED": 0, + "PUBLIC": 1, + "PRIVATE": 2, + } +) + +func (x ScopeSpec_Type) Enum() *ScopeSpec_Type { + p := new(ScopeSpec_Type) + *p = x + return p +} + +func (x ScopeSpec_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScopeSpec_Type) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_scope_proto_enumTypes[0].Descriptor() +} + +func (ScopeSpec_Type) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_scope_proto_enumTypes[0] +} + +func (x ScopeSpec_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ScopeSpec_Type.Descriptor instead. +func (ScopeSpec_Type) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP(), []int{1, 0} +} + +// Possible states of the Scope. +type ScopeStatus_State int32 + +const ( + ScopeStatus_STATE_UNSPECIFIED ScopeStatus_State = 0 // Default, unspecified state. + ScopeStatus_CREATING ScopeStatus_State = 1 // Scope is being created. + ScopeStatus_READY ScopeStatus_State = 2 // Scope is ready for use. + ScopeStatus_DELETING ScopeStatus_State = 3 // Scope is being deleted. +) + +// Enum value maps for ScopeStatus_State. +var ( + ScopeStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + ScopeStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x ScopeStatus_State) Enum() *ScopeStatus_State { + p := new(ScopeStatus_State) + *p = x + return p +} + +func (x ScopeStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScopeStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_scope_proto_enumTypes[1].Descriptor() +} + +func (ScopeStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_scope_proto_enumTypes[1] +} + +func (x ScopeStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ScopeStatus_State.Descriptor instead. +func (ScopeStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP(), []int{2, 0} +} + +type Scope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata associated with the Scope. + // `metadata.parent_id` represents the parent IAM container. + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the Scope. + Spec *ScopeSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status information for the Scope. + Status *ScopeStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Scope) Reset() { + *x = Scope{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Scope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scope) ProtoMessage() {} + +func (x *Scope) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scope.ProtoReflect.Descriptor instead. +func (*Scope) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP(), []int{0} +} + +func (x *Scope) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Scope) GetSpec() *ScopeSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Scope) GetStatus() *ScopeStatus { + if x != nil { + return x.Status + } + return nil +} + +type ScopeSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of the Scope (Private or Public). + Type ScopeSpec_Type `protobuf:"varint,1,opt,name=type,proto3,enum=nebius.vpc.v1alpha1.ScopeSpec_Type" json:"type,omitempty"` +} + +func (x *ScopeSpec) Reset() { + *x = ScopeSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScopeSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScopeSpec) ProtoMessage() {} + +func (x *ScopeSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScopeSpec.ProtoReflect.Descriptor instead. +func (*ScopeSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP(), []int{1} +} + +func (x *ScopeSpec) GetType() ScopeSpec_Type { + if x != nil { + return x.Type + } + return ScopeSpec_SCOPE_TYPE_UNSPECIFIED +} + +type ScopeStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the Scope. + State ScopeStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.ScopeStatus_State" json:"state,omitempty"` +} + +func (x *ScopeStatus) Reset() { + *x = ScopeStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScopeStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScopeStatus) ProtoMessage() {} + +func (x *ScopeStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScopeStatus.ProtoReflect.Descriptor instead. +func (*ScopeStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP(), []int{2} +} + +func (x *ScopeStatus) GetState() ScopeStatus_State { + if x != nil { + return x.State + } + return ScopeStatus_STATE_UNSPECIFIED +} + +var File_nebius_vpc_v1alpha1_scope_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_scope_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x01, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x32, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x89, 0x01, 0x0a, + 0x09, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, + 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x5d, 0x0a, + 0x1a, 0x61, 0x69, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, + 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_scope_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_scope_proto_rawDescData = file_nebius_vpc_v1alpha1_scope_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_scope_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_scope_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_scope_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_scope_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_scope_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_scope_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_nebius_vpc_v1alpha1_scope_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_nebius_vpc_v1alpha1_scope_proto_goTypes = []any{ + (ScopeSpec_Type)(0), // 0: nebius.vpc.v1alpha1.ScopeSpec.Type + (ScopeStatus_State)(0), // 1: nebius.vpc.v1alpha1.ScopeStatus.State + (*Scope)(nil), // 2: nebius.vpc.v1alpha1.Scope + (*ScopeSpec)(nil), // 3: nebius.vpc.v1alpha1.ScopeSpec + (*ScopeStatus)(nil), // 4: nebius.vpc.v1alpha1.ScopeStatus + (*v1.ResourceMetadata)(nil), // 5: nebius.common.v1.ResourceMetadata +} +var file_nebius_vpc_v1alpha1_scope_proto_depIdxs = []int32{ + 5, // 0: nebius.vpc.v1alpha1.Scope.metadata:type_name -> nebius.common.v1.ResourceMetadata + 3, // 1: nebius.vpc.v1alpha1.Scope.spec:type_name -> nebius.vpc.v1alpha1.ScopeSpec + 4, // 2: nebius.vpc.v1alpha1.Scope.status:type_name -> nebius.vpc.v1alpha1.ScopeStatus + 0, // 3: nebius.vpc.v1alpha1.ScopeSpec.type:type_name -> nebius.vpc.v1alpha1.ScopeSpec.Type + 1, // 4: nebius.vpc.v1alpha1.ScopeStatus.state:type_name -> nebius.vpc.v1alpha1.ScopeStatus.State + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_scope_proto_init() } +func file_nebius_vpc_v1alpha1_scope_proto_init() { + if File_nebius_vpc_v1alpha1_scope_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_scope_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Scope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_scope_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ScopeSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_scope_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ScopeStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_scope_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_scope_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_scope_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1alpha1_scope_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1alpha1_scope_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_scope_proto = out.File + file_nebius_vpc_v1alpha1_scope_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_scope_proto_goTypes = nil + file_nebius_vpc_v1alpha1_scope_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/scope.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/scope.sensitive.pb.go new file mode 100644 index 0000000..343c1a0 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/scope.sensitive.pb.go @@ -0,0 +1,12 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Scope) Sanitize() // is not generated as no sensitive fields found +// func (x *Scope) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ScopeSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *ScopeSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ScopeStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *ScopeStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/scope_service.pb.go b/proto/nebius/vpc/v1alpha1/scope_service.pb.go new file mode 100644 index 0000000..9f9d5ae --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/scope_service.pb.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/scope_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetScopeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetScopeRequest) Reset() { + *x = GetScopeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetScopeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetScopeRequest) ProtoMessage() {} + +func (x *GetScopeRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetScopeRequest.ProtoReflect.Descriptor instead. +func (*GetScopeRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetScopeRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetScopeByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetScopeByNameRequest) Reset() { + *x = GetScopeByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetScopeByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetScopeByNameRequest) ProtoMessage() {} + +func (x *GetScopeByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetScopeByNameRequest.ProtoReflect.Descriptor instead. +func (*GetScopeByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetScopeByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetScopeByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListScopesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListScopesRequest) Reset() { + *x = ListScopesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListScopesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListScopesRequest) ProtoMessage() {} + +func (x *ListScopesRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListScopesRequest.ProtoReflect.Descriptor instead. +func (*ListScopesRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListScopesRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListScopesRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListScopesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListScopesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListScopesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Scope `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListScopesResponse) Reset() { + *x = ListScopesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListScopesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListScopesResponse) ProtoMessage() {} + +func (x *ListScopesResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListScopesResponse.ProtoReflect.Descriptor instead. +func (*ListScopesResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_scope_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListScopesResponse) GetItems() []*Scope { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListScopesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1alpha1_scope_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_scope_service_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, + 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x6e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x32, 0x85, 0x02, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x47, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x57, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, + 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x64, 0x0a, 0x1a, 0x61, 0x69, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x11, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, + 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_scope_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_scope_service_proto_rawDescData = file_nebius_vpc_v1alpha1_scope_service_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_scope_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_scope_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_scope_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_scope_service_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_scope_service_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nebius_vpc_v1alpha1_scope_service_proto_goTypes = []any{ + (*GetScopeRequest)(nil), // 0: nebius.vpc.v1alpha1.GetScopeRequest + (*GetScopeByNameRequest)(nil), // 1: nebius.vpc.v1alpha1.GetScopeByNameRequest + (*ListScopesRequest)(nil), // 2: nebius.vpc.v1alpha1.ListScopesRequest + (*ListScopesResponse)(nil), // 3: nebius.vpc.v1alpha1.ListScopesResponse + (*Scope)(nil), // 4: nebius.vpc.v1alpha1.Scope +} +var file_nebius_vpc_v1alpha1_scope_service_proto_depIdxs = []int32{ + 4, // 0: nebius.vpc.v1alpha1.ListScopesResponse.items:type_name -> nebius.vpc.v1alpha1.Scope + 0, // 1: nebius.vpc.v1alpha1.ScopeService.Get:input_type -> nebius.vpc.v1alpha1.GetScopeRequest + 1, // 2: nebius.vpc.v1alpha1.ScopeService.GetByName:input_type -> nebius.vpc.v1alpha1.GetScopeByNameRequest + 2, // 3: nebius.vpc.v1alpha1.ScopeService.List:input_type -> nebius.vpc.v1alpha1.ListScopesRequest + 4, // 4: nebius.vpc.v1alpha1.ScopeService.Get:output_type -> nebius.vpc.v1alpha1.Scope + 4, // 5: nebius.vpc.v1alpha1.ScopeService.GetByName:output_type -> nebius.vpc.v1alpha1.Scope + 3, // 6: nebius.vpc.v1alpha1.ScopeService.List:output_type -> nebius.vpc.v1alpha1.ListScopesResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_scope_service_proto_init() } +func file_nebius_vpc_v1alpha1_scope_service_proto_init() { + if File_nebius_vpc_v1alpha1_scope_service_proto != nil { + return + } + file_nebius_vpc_v1alpha1_scope_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetScopeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetScopeByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListScopesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListScopesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_scope_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1alpha1_scope_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_scope_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_scope_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_scope_service_proto = out.File + file_nebius_vpc_v1alpha1_scope_service_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_scope_service_proto_goTypes = nil + file_nebius_vpc_v1alpha1_scope_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/scope_service.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/scope_service.sensitive.pb.go new file mode 100644 index 0000000..bf5fb33 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/scope_service.sensitive.pb.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetScopeRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetScopeRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetScopeByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetScopeByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListScopesRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListScopesRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListScopesResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListScopesResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/scope_service_grpc.pb.go b/proto/nebius/vpc/v1alpha1/scope_service_grpc.pb.go new file mode 100644 index 0000000..cb4aa8f --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/scope_service_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1alpha1/scope_service.proto + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ScopeService_Get_FullMethodName = "/nebius.vpc.v1alpha1.ScopeService/Get" + ScopeService_GetByName_FullMethodName = "/nebius.vpc.v1alpha1.ScopeService/GetByName" + ScopeService_List_FullMethodName = "/nebius.vpc.v1alpha1.ScopeService/List" +) + +// ScopeServiceClient is the client API for ScopeService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ScopeServiceClient interface { + Get(ctx context.Context, in *GetScopeRequest, opts ...grpc.CallOption) (*Scope, error) + GetByName(ctx context.Context, in *GetScopeByNameRequest, opts ...grpc.CallOption) (*Scope, error) + List(ctx context.Context, in *ListScopesRequest, opts ...grpc.CallOption) (*ListScopesResponse, error) +} + +type scopeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewScopeServiceClient(cc grpc.ClientConnInterface) ScopeServiceClient { + return &scopeServiceClient{cc} +} + +func (c *scopeServiceClient) Get(ctx context.Context, in *GetScopeRequest, opts ...grpc.CallOption) (*Scope, error) { + out := new(Scope) + err := c.cc.Invoke(ctx, ScopeService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scopeServiceClient) GetByName(ctx context.Context, in *GetScopeByNameRequest, opts ...grpc.CallOption) (*Scope, error) { + out := new(Scope) + err := c.cc.Invoke(ctx, ScopeService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *scopeServiceClient) List(ctx context.Context, in *ListScopesRequest, opts ...grpc.CallOption) (*ListScopesResponse, error) { + out := new(ListScopesResponse) + err := c.cc.Invoke(ctx, ScopeService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ScopeServiceServer is the server API for ScopeService service. +// All implementations should embed UnimplementedScopeServiceServer +// for forward compatibility +type ScopeServiceServer interface { + Get(context.Context, *GetScopeRequest) (*Scope, error) + GetByName(context.Context, *GetScopeByNameRequest) (*Scope, error) + List(context.Context, *ListScopesRequest) (*ListScopesResponse, error) +} + +// UnimplementedScopeServiceServer should be embedded to have forward compatible implementations. +type UnimplementedScopeServiceServer struct { +} + +func (UnimplementedScopeServiceServer) Get(context.Context, *GetScopeRequest) (*Scope, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedScopeServiceServer) GetByName(context.Context, *GetScopeByNameRequest) (*Scope, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedScopeServiceServer) List(context.Context, *ListScopesRequest) (*ListScopesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} + +// UnsafeScopeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ScopeServiceServer will +// result in compilation errors. +type UnsafeScopeServiceServer interface { + mustEmbedUnimplementedScopeServiceServer() +} + +func RegisterScopeServiceServer(s grpc.ServiceRegistrar, srv ScopeServiceServer) { + s.RegisterService(&ScopeService_ServiceDesc, srv) +} + +func _ScopeService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetScopeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScopeServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ScopeService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScopeServiceServer).Get(ctx, req.(*GetScopeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScopeService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetScopeByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScopeServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ScopeService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScopeServiceServer).GetByName(ctx, req.(*GetScopeByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ScopeService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListScopesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScopeServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ScopeService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScopeServiceServer).List(ctx, req.(*ListScopesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ScopeService_ServiceDesc is the grpc.ServiceDesc for ScopeService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ScopeService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1alpha1.ScopeService", + HandlerType: (*ScopeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _ScopeService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _ScopeService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _ScopeService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1alpha1/scope_service.proto", +} diff --git a/proto/nebius/vpc/v1alpha1/subnet.pb.go b/proto/nebius/vpc/v1alpha1/subnet.pb.go new file mode 100644 index 0000000..31d94d0 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/subnet.pb.go @@ -0,0 +1,716 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/subnet.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of possible states of the subnet. +type SubnetStatus_State int32 + +const ( + SubnetStatus_STATE_UNSPECIFIED SubnetStatus_State = 0 // Default state, unspecified. + SubnetStatus_CREATING SubnetStatus_State = 1 // Subnet is being created. + SubnetStatus_READY SubnetStatus_State = 2 // Subnet is ready for use. + SubnetStatus_DELETING SubnetStatus_State = 3 // Subnet is being deleted. +) + +// Enum value maps for SubnetStatus_State. +var ( + SubnetStatus_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "DELETING", + } + SubnetStatus_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + } +) + +func (x SubnetStatus_State) Enum() *SubnetStatus_State { + p := new(SubnetStatus_State) + *p = x + return p +} + +func (x SubnetStatus_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubnetStatus_State) Descriptor() protoreflect.EnumDescriptor { + return file_nebius_vpc_v1alpha1_subnet_proto_enumTypes[0].Descriptor() +} + +func (SubnetStatus_State) Type() protoreflect.EnumType { + return &file_nebius_vpc_v1alpha1_subnet_proto_enumTypes[0] +} + +func (x SubnetStatus_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubnetStatus_State.Descriptor instead. +func (SubnetStatus_State) EnumDescriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{5, 0} +} + +// Defines a Subnet, a segment of a network used for more granular control and management. +// Subnet uses pools to organize address space. +type Subnet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata for the subnet resource. + // `metadata.parent_id` represents IAM container + Metadata *v1.ResourceMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Specification of the subnet. + Spec *SubnetSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // Status of the subnet. + Status *SubnetStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Subnet) Reset() { + *x = Subnet{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Subnet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subnet) ProtoMessage() {} + +func (x *Subnet) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subnet.ProtoReflect.Descriptor instead. +func (*Subnet) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{0} +} + +func (x *Subnet) GetMetadata() *v1.ResourceMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Subnet) GetSpec() *SubnetSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Subnet) GetStatus() *SubnetStatus { + if x != nil { + return x.Status + } + return nil +} + +type SubnetSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Network ID. + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + // Pool for addresses + Pools []*SubnetPool `protobuf:"bytes,2,rep,name=pools,proto3" json:"pools,omitempty"` + // Enable egress NAT gateway + EnableEgressNat bool `protobuf:"varint,3,opt,name=enable_egress_nat,json=enableEgressNat,proto3" json:"enable_egress_nat,omitempty"` +} + +func (x *SubnetSpec) Reset() { + *x = SubnetSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetSpec) ProtoMessage() {} + +func (x *SubnetSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetSpec.ProtoReflect.Descriptor instead. +func (*SubnetSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{1} +} + +func (x *SubnetSpec) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *SubnetSpec) GetPools() []*SubnetPool { + if x != nil { + return x.Pools + } + return nil +} + +func (x *SubnetSpec) GetEnableEgressNat() bool { + if x != nil { + return x.EnableEgressNat + } + return false +} + +type SubnetPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Pool: + // + // *SubnetPool_Spec + // *SubnetPool_PoolId + Pool isSubnetPool_Pool `protobuf_oneof:"pool"` +} + +func (x *SubnetPool) Reset() { + *x = SubnetPool{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetPool) ProtoMessage() {} + +func (x *SubnetPool) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetPool.ProtoReflect.Descriptor instead. +func (*SubnetPool) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{2} +} + +func (m *SubnetPool) GetPool() isSubnetPool_Pool { + if m != nil { + return m.Pool + } + return nil +} + +func (x *SubnetPool) GetSpec() *SubnetPoolSpec { + if x, ok := x.GetPool().(*SubnetPool_Spec); ok { + return x.Spec + } + return nil +} + +func (x *SubnetPool) GetPoolId() string { + if x, ok := x.GetPool().(*SubnetPool_PoolId); ok { + return x.PoolId + } + return "" +} + +type isSubnetPool_Pool interface { + isSubnetPool_Pool() +} + +type SubnetPool_Spec struct { + Spec *SubnetPoolSpec `protobuf:"bytes,1,opt,name=spec,proto3,oneof"` +} + +type SubnetPool_PoolId struct { + PoolId string `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3,oneof"` +} + +func (*SubnetPool_Spec) isSubnetPool_Pool() {} + +func (*SubnetPool_PoolId) isSubnetPool_Pool() {} + +type SubnetPoolSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version IpVersion `protobuf:"varint,1,opt,name=version,proto3,enum=nebius.vpc.v1alpha1.IpVersion" json:"version,omitempty"` + Cidrs []*SubnetCidr `protobuf:"bytes,2,rep,name=cidrs,proto3" json:"cidrs,omitempty"` +} + +func (x *SubnetPoolSpec) Reset() { + *x = SubnetPoolSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetPoolSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetPoolSpec) ProtoMessage() {} + +func (x *SubnetPoolSpec) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetPoolSpec.ProtoReflect.Descriptor instead. +func (*SubnetPoolSpec) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{3} +} + +func (x *SubnetPoolSpec) GetVersion() IpVersion { + if x != nil { + return x.Version + } + return IpVersion_IP_VERSION_UNSPECIFIED +} + +func (x *SubnetPoolSpec) GetCidrs() []*SubnetCidr { + if x != nil { + return x.Cidrs + } + return nil +} + +type SubnetCidr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CIDR block. + // May be a prefix length (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). + Cidr string `protobuf:"bytes,1,opt,name=cidr,proto3" json:"cidr,omitempty"` + // State of the Cidr. + State PoolCidrState `protobuf:"varint,2,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.PoolCidrState" json:"state,omitempty"` + // Maximum mask length for allocation from this cidr + AllowedMask int64 `protobuf:"varint,3,opt,name=allowed_mask,json=allowedMask,proto3" json:"allowed_mask,omitempty"` +} + +func (x *SubnetCidr) Reset() { + *x = SubnetCidr{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetCidr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetCidr) ProtoMessage() {} + +func (x *SubnetCidr) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetCidr.ProtoReflect.Descriptor instead. +func (*SubnetCidr) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{4} +} + +func (x *SubnetCidr) GetCidr() string { + if x != nil { + return x.Cidr + } + return "" +} + +func (x *SubnetCidr) GetState() PoolCidrState { + if x != nil { + return x.State + } + return PoolCidrState_STATE_UNSPECIFIED +} + +func (x *SubnetCidr) GetAllowedMask() int64 { + if x != nil { + return x.AllowedMask + } + return 0 +} + +type SubnetStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current state of the subnet. + State SubnetStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=nebius.vpc.v1alpha1.SubnetStatus_State" json:"state,omitempty"` + // CIDR blocks. + Ipv4Cidrs []string `protobuf:"bytes,2,rep,name=ipv4_cidrs,json=ipv4Cidrs,proto3" json:"ipv4_cidrs,omitempty"` +} + +func (x *SubnetStatus) Reset() { + *x = SubnetStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubnetStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubnetStatus) ProtoMessage() {} + +func (x *SubnetStatus) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubnetStatus.ProtoReflect.Descriptor instead. +func (*SubnetStatus) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP(), []int{5} +} + +func (x *SubnetStatus) GetState() SubnetStatus_State { + if x != nil { + return x.State + } + return SubnetStatus_STATE_UNSPECIFIED +} + +func (x *SubnetStatus) GetIpv4Cidrs() []string { + if x != nil { + return x.Ipv4Cidrs + } + return nil +} + +var File_nebius_vpc_v1alpha1_subnet_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_subnet_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, + 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x06, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x33, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x25, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, + 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4e, 0x61, + 0x74, 0x22, 0x71, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, + 0x39, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x70, + 0x65, 0x63, 0x48, 0x00, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x19, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, + 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x42, 0x0d, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x05, 0xba, + 0x48, 0x02, 0x08, 0x01, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, + 0x6f, 0x6f, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x40, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, + 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x05, 0x63, 0x69, 0x64, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x43, 0x69, 0x64, 0x72, 0x52, 0x05, 0x63, 0x69, 0x64, 0x72, 0x73, + 0x22, 0xa0, 0x03, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x43, 0x69, 0x64, 0x72, 0x12, + 0x9d, 0x02, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x88, + 0x02, 0xba, 0x48, 0x84, 0x02, 0xba, 0x01, 0xac, 0x01, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x12, 0x2e, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, + 0x43, 0x49, 0x44, 0x52, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x67, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x2f, 0x28, 0x5b, 0x30, 0x2d, + 0x39, 0x5d, 0x7c, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x7c, 0x31, 0x5b, + 0x30, 0x2d, 0x32, 0x5d, 0x5b, 0x30, 0x2d, 0x38, 0x5d, 0x29, 0x24, 0x27, 0x29, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, + 0x74, 0x72, 0x75, 0x65, 0x29, 0xba, 0x01, 0x4e, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x0a, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, + 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x69, 0x64, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x30, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x22, + 0x05, 0x18, 0x80, 0x01, 0x28, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x22, 0xb3, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x63, 0x69, 0x64, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x76, 0x34, 0x43, 0x69, 0x64, + 0x72, 0x73, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x5e, 0x0a, 0x1a, 0x61, 0x69, 0x2e, + 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_subnet_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_subnet_proto_rawDescData = file_nebius_vpc_v1alpha1_subnet_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_subnet_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_subnet_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_subnet_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_subnet_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_subnet_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_subnet_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_nebius_vpc_v1alpha1_subnet_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_nebius_vpc_v1alpha1_subnet_proto_goTypes = []any{ + (SubnetStatus_State)(0), // 0: nebius.vpc.v1alpha1.SubnetStatus.State + (*Subnet)(nil), // 1: nebius.vpc.v1alpha1.Subnet + (*SubnetSpec)(nil), // 2: nebius.vpc.v1alpha1.SubnetSpec + (*SubnetPool)(nil), // 3: nebius.vpc.v1alpha1.SubnetPool + (*SubnetPoolSpec)(nil), // 4: nebius.vpc.v1alpha1.SubnetPoolSpec + (*SubnetCidr)(nil), // 5: nebius.vpc.v1alpha1.SubnetCidr + (*SubnetStatus)(nil), // 6: nebius.vpc.v1alpha1.SubnetStatus + (*v1.ResourceMetadata)(nil), // 7: nebius.common.v1.ResourceMetadata + (IpVersion)(0), // 8: nebius.vpc.v1alpha1.IpVersion + (PoolCidrState)(0), // 9: nebius.vpc.v1alpha1.PoolCidrState +} +var file_nebius_vpc_v1alpha1_subnet_proto_depIdxs = []int32{ + 7, // 0: nebius.vpc.v1alpha1.Subnet.metadata:type_name -> nebius.common.v1.ResourceMetadata + 2, // 1: nebius.vpc.v1alpha1.Subnet.spec:type_name -> nebius.vpc.v1alpha1.SubnetSpec + 6, // 2: nebius.vpc.v1alpha1.Subnet.status:type_name -> nebius.vpc.v1alpha1.SubnetStatus + 3, // 3: nebius.vpc.v1alpha1.SubnetSpec.pools:type_name -> nebius.vpc.v1alpha1.SubnetPool + 4, // 4: nebius.vpc.v1alpha1.SubnetPool.spec:type_name -> nebius.vpc.v1alpha1.SubnetPoolSpec + 8, // 5: nebius.vpc.v1alpha1.SubnetPoolSpec.version:type_name -> nebius.vpc.v1alpha1.IpVersion + 5, // 6: nebius.vpc.v1alpha1.SubnetPoolSpec.cidrs:type_name -> nebius.vpc.v1alpha1.SubnetCidr + 9, // 7: nebius.vpc.v1alpha1.SubnetCidr.state:type_name -> nebius.vpc.v1alpha1.PoolCidrState + 0, // 8: nebius.vpc.v1alpha1.SubnetStatus.state:type_name -> nebius.vpc.v1alpha1.SubnetStatus.State + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_subnet_proto_init() } +func file_nebius_vpc_v1alpha1_subnet_proto_init() { + if File_nebius_vpc_v1alpha1_subnet_proto != nil { + return + } + file_nebius_vpc_v1alpha1_pool_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Subnet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*SubnetSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*SubnetPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*SubnetPoolSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*SubnetCidr); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*SubnetStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_nebius_vpc_v1alpha1_subnet_proto_msgTypes[2].OneofWrappers = []any{ + (*SubnetPool_Spec)(nil), + (*SubnetPool_PoolId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_subnet_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_nebius_vpc_v1alpha1_subnet_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_subnet_proto_depIdxs, + EnumInfos: file_nebius_vpc_v1alpha1_subnet_proto_enumTypes, + MessageInfos: file_nebius_vpc_v1alpha1_subnet_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_subnet_proto = out.File + file_nebius_vpc_v1alpha1_subnet_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_subnet_proto_goTypes = nil + file_nebius_vpc_v1alpha1_subnet_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/subnet.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/subnet.sensitive.pb.go new file mode 100644 index 0000000..72e02a2 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/subnet.sensitive.pb.go @@ -0,0 +1,21 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *Subnet) Sanitize() // is not generated as no sensitive fields found +// func (x *Subnet) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetPool) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetPool) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetPoolSpec) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetPoolSpec) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetCidr) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetCidr) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *SubnetStatus) Sanitize() // is not generated as no sensitive fields found +// func (x *SubnetStatus) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/subnet_service.pb.go b/proto/nebius/vpc/v1alpha1/subnet_service.pb.go new file mode 100644 index 0000000..72545e7 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/subnet_service.pb.go @@ -0,0 +1,529 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: nebius/vpc/v1alpha1/subnet_service.proto + +package v1alpha1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/nebius/gosdk/proto/nebius" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetSubnetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSubnetRequest) Reset() { + *x = GetSubnetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubnetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubnetRequest) ProtoMessage() {} + +func (x *GetSubnetRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubnetRequest.ProtoReflect.Descriptor instead. +func (*GetSubnetRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSubnetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSubnetByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSubnetByNameRequest) Reset() { + *x = GetSubnetByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubnetByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubnetByNameRequest) ProtoMessage() {} + +func (x *GetSubnetByNameRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubnetByNameRequest.ProtoReflect.Descriptor instead. +func (*GetSubnetByNameRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSubnetByNameRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *GetSubnetByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListSubnetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentId string `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListSubnetsRequest) Reset() { + *x = ListSubnetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsRequest) ProtoMessage() {} + +func (x *ListSubnetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsRequest.ProtoReflect.Descriptor instead. +func (*ListSubnetsRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSubnetsRequest) GetParentId() string { + if x != nil { + return x.ParentId + } + return "" +} + +func (x *ListSubnetsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSubnetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListSubnetsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListSubnetsByNetworkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListSubnetsByNetworkRequest) Reset() { + *x = ListSubnetsByNetworkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsByNetworkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsByNetworkRequest) ProtoMessage() {} + +func (x *ListSubnetsByNetworkRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsByNetworkRequest.ProtoReflect.Descriptor instead. +func (*ListSubnetsByNetworkRequest) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListSubnetsByNetworkRequest) GetNetworkId() string { + if x != nil { + return x.NetworkId + } + return "" +} + +func (x *ListSubnetsByNetworkRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSubnetsByNetworkRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListSubnetsByNetworkRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +type ListSubnetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*Subnet `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListSubnetsResponse) Reset() { + *x = ListSubnetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubnetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubnetsResponse) ProtoMessage() {} + +func (x *ListSubnetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubnetsResponse.ProtoReflect.Descriptor instead. +func (*ListSubnetsResponse) Descriptor() ([]byte, []int) { + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListSubnetsResponse) GetItems() []*Subnet { + if x != nil { + return x.Items + } + return nil +} + +func (x *ListSubnetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_nebius_vpc_v1alpha1_subnet_service_proto protoreflect.FileDescriptor + +var file_nebius_vpc_v1alpha1_subnet_service_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6e, 0x65, 0x62, 0x69, + 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, + 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, + 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x59, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, + 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x8d, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0x98, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x42, + 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x70, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x8b, 0x03, 0x0a, + 0x0d, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, + 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x12, 0x59, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x2e, 0x6e, + 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x42, 0x79, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x76, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x9a, 0xb5, 0x18, 0x0c, 0x0a, 0x0a, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x42, 0x65, 0x0a, 0x1a, 0x61, 0x69, + 0x2e, 0x6e, 0x65, 0x62, 0x69, 0x75, 0x73, 0x2e, 0x70, 0x75, 0x62, 0x2e, 0x76, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x65, 0x62, 0x69, 0x75, + 0x73, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, + 0x62, 0x69, 0x75, 0x73, 0x2f, 0x76, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescOnce sync.Once + file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescData = file_nebius_vpc_v1alpha1_subnet_service_proto_rawDesc +) + +func file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescGZIP() []byte { + file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescOnce.Do(func() { + file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescData) + }) + return file_nebius_vpc_v1alpha1_subnet_service_proto_rawDescData +} + +var file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_nebius_vpc_v1alpha1_subnet_service_proto_goTypes = []any{ + (*GetSubnetRequest)(nil), // 0: nebius.vpc.v1alpha1.GetSubnetRequest + (*GetSubnetByNameRequest)(nil), // 1: nebius.vpc.v1alpha1.GetSubnetByNameRequest + (*ListSubnetsRequest)(nil), // 2: nebius.vpc.v1alpha1.ListSubnetsRequest + (*ListSubnetsByNetworkRequest)(nil), // 3: nebius.vpc.v1alpha1.ListSubnetsByNetworkRequest + (*ListSubnetsResponse)(nil), // 4: nebius.vpc.v1alpha1.ListSubnetsResponse + (*Subnet)(nil), // 5: nebius.vpc.v1alpha1.Subnet +} +var file_nebius_vpc_v1alpha1_subnet_service_proto_depIdxs = []int32{ + 5, // 0: nebius.vpc.v1alpha1.ListSubnetsResponse.items:type_name -> nebius.vpc.v1alpha1.Subnet + 0, // 1: nebius.vpc.v1alpha1.SubnetService.Get:input_type -> nebius.vpc.v1alpha1.GetSubnetRequest + 1, // 2: nebius.vpc.v1alpha1.SubnetService.GetByName:input_type -> nebius.vpc.v1alpha1.GetSubnetByNameRequest + 2, // 3: nebius.vpc.v1alpha1.SubnetService.List:input_type -> nebius.vpc.v1alpha1.ListSubnetsRequest + 3, // 4: nebius.vpc.v1alpha1.SubnetService.ListByNetwork:input_type -> nebius.vpc.v1alpha1.ListSubnetsByNetworkRequest + 5, // 5: nebius.vpc.v1alpha1.SubnetService.Get:output_type -> nebius.vpc.v1alpha1.Subnet + 5, // 6: nebius.vpc.v1alpha1.SubnetService.GetByName:output_type -> nebius.vpc.v1alpha1.Subnet + 4, // 7: nebius.vpc.v1alpha1.SubnetService.List:output_type -> nebius.vpc.v1alpha1.ListSubnetsResponse + 4, // 8: nebius.vpc.v1alpha1.SubnetService.ListByNetwork:output_type -> nebius.vpc.v1alpha1.ListSubnetsResponse + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_nebius_vpc_v1alpha1_subnet_service_proto_init() } +func file_nebius_vpc_v1alpha1_subnet_service_proto_init() { + if File_nebius_vpc_v1alpha1_subnet_service_proto != nil { + return + } + file_nebius_vpc_v1alpha1_subnet_proto_init() + if !protoimpl.UnsafeEnabled { + file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetSubnetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetSubnetByNameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsByNetworkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListSubnetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_nebius_vpc_v1alpha1_subnet_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_nebius_vpc_v1alpha1_subnet_service_proto_goTypes, + DependencyIndexes: file_nebius_vpc_v1alpha1_subnet_service_proto_depIdxs, + MessageInfos: file_nebius_vpc_v1alpha1_subnet_service_proto_msgTypes, + }.Build() + File_nebius_vpc_v1alpha1_subnet_service_proto = out.File + file_nebius_vpc_v1alpha1_subnet_service_proto_rawDesc = nil + file_nebius_vpc_v1alpha1_subnet_service_proto_goTypes = nil + file_nebius_vpc_v1alpha1_subnet_service_proto_depIdxs = nil +} diff --git a/proto/nebius/vpc/v1alpha1/subnet_service.sensitive.pb.go b/proto/nebius/vpc/v1alpha1/subnet_service.sensitive.pb.go new file mode 100644 index 0000000..9efd688 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/subnet_service.sensitive.pb.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-sensitive. DO NOT EDIT. + +package v1alpha1 + +// func (x *GetSubnetRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSubnetRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *GetSubnetByNameRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *GetSubnetByNameRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsByNetworkRequest) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsByNetworkRequest) LogValue() slog.Value // is not generated as no sensitive fields found + +// func (x *ListSubnetsResponse) Sanitize() // is not generated as no sensitive fields found +// func (x *ListSubnetsResponse) LogValue() slog.Value // is not generated as no sensitive fields found diff --git a/proto/nebius/vpc/v1alpha1/subnet_service_grpc.pb.go b/proto/nebius/vpc/v1alpha1/subnet_service_grpc.pb.go new file mode 100644 index 0000000..1a31993 --- /dev/null +++ b/proto/nebius/vpc/v1alpha1/subnet_service_grpc.pb.go @@ -0,0 +1,218 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.1 +// source: nebius/vpc/v1alpha1/subnet_service.proto + +package v1alpha1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SubnetService_Get_FullMethodName = "/nebius.vpc.v1alpha1.SubnetService/Get" + SubnetService_GetByName_FullMethodName = "/nebius.vpc.v1alpha1.SubnetService/GetByName" + SubnetService_List_FullMethodName = "/nebius.vpc.v1alpha1.SubnetService/List" + SubnetService_ListByNetwork_FullMethodName = "/nebius.vpc.v1alpha1.SubnetService/ListByNetwork" +) + +// SubnetServiceClient is the client API for SubnetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SubnetServiceClient interface { + Get(ctx context.Context, in *GetSubnetRequest, opts ...grpc.CallOption) (*Subnet, error) + GetByName(ctx context.Context, in *GetSubnetByNameRequest, opts ...grpc.CallOption) (*Subnet, error) + List(ctx context.Context, in *ListSubnetsRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) + ListByNetwork(ctx context.Context, in *ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) +} + +type subnetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSubnetServiceClient(cc grpc.ClientConnInterface) SubnetServiceClient { + return &subnetServiceClient{cc} +} + +func (c *subnetServiceClient) Get(ctx context.Context, in *GetSubnetRequest, opts ...grpc.CallOption) (*Subnet, error) { + out := new(Subnet) + err := c.cc.Invoke(ctx, SubnetService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) GetByName(ctx context.Context, in *GetSubnetByNameRequest, opts ...grpc.CallOption) (*Subnet, error) { + out := new(Subnet) + err := c.cc.Invoke(ctx, SubnetService_GetByName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) List(ctx context.Context, in *ListSubnetsRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) { + out := new(ListSubnetsResponse) + err := c.cc.Invoke(ctx, SubnetService_List_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subnetServiceClient) ListByNetwork(ctx context.Context, in *ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*ListSubnetsResponse, error) { + out := new(ListSubnetsResponse) + err := c.cc.Invoke(ctx, SubnetService_ListByNetwork_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubnetServiceServer is the server API for SubnetService service. +// All implementations should embed UnimplementedSubnetServiceServer +// for forward compatibility +type SubnetServiceServer interface { + Get(context.Context, *GetSubnetRequest) (*Subnet, error) + GetByName(context.Context, *GetSubnetByNameRequest) (*Subnet, error) + List(context.Context, *ListSubnetsRequest) (*ListSubnetsResponse, error) + ListByNetwork(context.Context, *ListSubnetsByNetworkRequest) (*ListSubnetsResponse, error) +} + +// UnimplementedSubnetServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSubnetServiceServer struct { +} + +func (UnimplementedSubnetServiceServer) Get(context.Context, *GetSubnetRequest) (*Subnet, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedSubnetServiceServer) GetByName(context.Context, *GetSubnetByNameRequest) (*Subnet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetByName not implemented") +} +func (UnimplementedSubnetServiceServer) List(context.Context, *ListSubnetsRequest) (*ListSubnetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedSubnetServiceServer) ListByNetwork(context.Context, *ListSubnetsByNetworkRequest) (*ListSubnetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListByNetwork not implemented") +} + +// UnsafeSubnetServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SubnetServiceServer will +// result in compilation errors. +type UnsafeSubnetServiceServer interface { + mustEmbedUnimplementedSubnetServiceServer() +} + +func RegisterSubnetServiceServer(s grpc.ServiceRegistrar, srv SubnetServiceServer) { + s.RegisterService(&SubnetService_ServiceDesc, srv) +} + +func _SubnetService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubnetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).Get(ctx, req.(*GetSubnetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_GetByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubnetByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).GetByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_GetByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).GetByName(ctx, req.(*GetSubnetByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubnetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).List(ctx, req.(*ListSubnetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubnetService_ListByNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubnetsByNetworkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubnetServiceServer).ListByNetwork(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubnetService_ListByNetwork_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubnetServiceServer).ListByNetwork(ctx, req.(*ListSubnetsByNetworkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SubnetService_ServiceDesc is the grpc.ServiceDesc for SubnetService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SubnetService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "nebius.vpc.v1alpha1.SubnetService", + HandlerType: (*SubnetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _SubnetService_Get_Handler, + }, + { + MethodName: "GetByName", + Handler: _SubnetService_GetByName_Handler, + }, + { + MethodName: "List", + Handler: _SubnetService_List_Handler, + }, + { + MethodName: "ListByNetwork", + Handler: _SubnetService_ListByNetwork_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "nebius/vpc/v1alpha1/subnet_service.proto", +} diff --git a/sdk.go b/sdk.go new file mode 100644 index 0000000..7acf128 --- /dev/null +++ b/sdk.go @@ -0,0 +1,271 @@ +package gosdk + +import ( + "context" + "errors" + "fmt" + "log/slog" + "sync/atomic" + "time" + + "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "google.golang.org/grpc" + grpc_creds "google.golang.org/grpc/credentials" + + "github.com/nebius/gosdk/auth" + "github.com/nebius/gosdk/conn" + "github.com/nebius/gosdk/serviceerror" + "github.com/nebius/gosdk/services/nebius" +) + +type SDK struct { + resolver conn.Resolver + dialer conn.Dialer + tokener auth.BearerTokener + inits []func(context.Context, *SDK) error + closes []func() error +} + +// New creates a new [SDK] with provided options. +// By default, it also does IO operations, if necessary. +// If you want to do them later, use [WithExplicitInit] option. +func New(ctx context.Context, opts ...Option) (*SDK, error) { //nolint:funlen + domain := "api.eu.nebius.cloud:443" + + credentials := NoCredentials() + handler := slog.Handler(NoopHandler{}) + explicitInit := false + + customSubstitutions := make(map[string]string) + var logOpts []logging.Option + var traceOpts []otelgrpc.Option + var customDialOpts []grpc.DialOption + var customResolvers []conn.Resolver + var customInits []func(context.Context, *SDK) error + for _, opt := range opts { + switch o := opt.(type) { + case optionCredentials: + credentials = o.creds + case optionLogger: + handler = o.handler + case optionLoggingOptions: + logOpts = append(logOpts, o...) + case optionTracingOptions: + traceOpts = append(traceOpts, o...) + case optionDialOpts: + customDialOpts = append(customDialOpts, o...) + case optionResolvers: + customResolvers = append(customResolvers, o...) + case optionDomain: + domain = string(o) + case optionAddressTemplate: + customSubstitutions[o.find] = o.replace + case optionExplicitInit: + explicitInit = bool(o) + case optionInit: + customInits = append(customInits, o) + } + } + + logger := slog.New(handler) + substitutions := map[string]string{ + "{domain}": domain, + } + for find, replace := range customSubstitutions { + substitutions[find] = replace + } + + var inits []func(context.Context, *SDK) error + var closes []func() error + var tokener auth.BearerTokener + + explicitSelector := false + credsMap := map[auth.Selector]Credentials{ + auth.Select("default"): credentials, + } + switch c := credentials.(type) { //nolint:gocritic // complains about single case in public gosdk + case credsOneOf: + if len(c) == 0 { + return nil, errors.New("credentials map is empty") + } + explicitSelector = true + credsMap = c + } + + auths := make(map[auth.Selector]auth.Authenticator, len(credsMap)) + for selector, creds := range credsMap { + switch c := creds.(type) { + case credsNoCreds: + auths[selector] = nil + case credsAuthenticator: + auths[selector] = c.auth + case credsTokener: + tokener = c.tokener + auths[selector] = auth.NewAuthenticatorFromBearerTokener(tokener) + case credsServiceAccount: + t := auth.NewExchangeableBearerTokener(auth.NewServiceAccountExchangeTokenRequester(c.reader), nil) + inits = append(inits, func(_ context.Context, sdk *SDK) error { + t.SetClient(sdk.Services().IAM().V1().TokenExchange()) + return nil + }) + + //nolint:mnd // 90%, 1s and 1m are recommended values by IAM team + cache := auth.NewCachedServiceTokener(logger, t, 0.9, 1*time.Second, 1.5, 1*time.Minute) + inits = append(inits, initCache(cache)) + tokener = cache + + auths[selector] = auth.NewAuthenticatorFromBearerTokener(tokener) + case credsPropagate: + auths[selector] = auth.NewPropagateAuthorizationHeader() + case credsOneOf: + return nil, errors.New("one of credentials can not be nested") + default: + return nil, fmt.Errorf("unknown credentials type: %T", creds) + } + } + + dialOpts := []grpc.DialOption{} + + dialOpts = append(dialOpts, + grpc.WithChainUnaryInterceptor( + conn.IdempotencyKeyInterceptor, + ), + grpc.WithTransportCredentials(grpc_creds.NewTLS(nil)), // tls enabled by default + ) + + dialOpts = append(dialOpts, customDialOpts...) + + dialOpts = append(dialOpts, + TracingStatsHandler(traceOpts...), + grpc.WithChainUnaryInterceptor( + unaryLoggingInterceptor(logger, logOpts...), + serviceerror.UnaryClientInterceptor, + ), + grpc.WithChainStreamInterceptor( + streamLoggingInterceptor(logger, logOpts...), + serviceerror.StreamClientInterceptor, + ), + ) + + // do not add interceptors if no credentials provided + for _, a := range auths { + if a != nil { + dialOpts = append( + dialOpts, + grpc.WithChainUnaryInterceptor(auth.UnaryClientInterceptor(logger, auths, explicitSelector)), + grpc.WithChainStreamInterceptor(auth.StreamClientInterceptor(logger, auths, explicitSelector)), + ) + break + } + } + + dialer := conn.NewDialer(logger, dialOpts...) + closes = append(closes, dialer.Close) + inits = append(inits, customInits...) + + sdk := &SDK{ + resolver: conn.NewContextResolver( + logger, + conn.NewCachedResolver( + logger, + conn.NewTemplateExpander( + substitutions, + conn.NewResolversChain(append(customResolvers, conn.NewConventionResolver())...), + ), + ), + ), + dialer: dialer, + tokener: tokener, + inits: inits, + closes: closes, + } + + if !explicitInit { + errI := sdk.Init(ctx) + if errI != nil { + return nil, errI + } + } + + return sdk, nil +} + +// Init completes creation of an [SDK]. It does all necessary IO operations. +// You should call it only if [WithExplicitInit] option is used. +func (s *SDK) Init(ctx context.Context) error { + for _, init := range s.inits { + err := init(ctx, s) + if err != nil { + return err + } + } + return nil +} + +func (s *SDK) Services() nebius.Services { + return nebius.New(s) +} + +func (s *SDK) Close() error { + var errs error + for _, c := range s.closes { + err := c() + if err != nil { + errs = errors.Join(errs, err) + } + } + return errs +} + +// BearerToken returns the token used to authorize gRPC requests. +func (s *SDK) BearerToken(ctx context.Context) (auth.BearerToken, error) { + if s.tokener == nil { + return auth.BearerToken{}, errors.New("tokener not initialized") + } + return s.tokener.BearerToken(ctx) +} + +func (s *SDK) Resolve(ctx context.Context, id conn.ServiceID) (conn.Address, error) { + return s.resolver.Resolve(ctx, id) +} + +func (s *SDK) Dial(ctx context.Context, address conn.Address) (grpc.ClientConnInterface, error) { + return s.dialer.Dial(ctx, address) +} + +func initCache(cache *auth.CachedServiceTokener) func(context.Context, *SDK) error { + const wait = 5 * time.Second + return func(ctx context.Context, sdk *SDK) error { + ctx, cancel := context.WithCancel(ctx) + errs := make(chan error, 1) + stopped := atomic.Bool{} + + stopCacheAndWaitResult := func() error { + if !stopped.CompareAndSwap(false, true) { + return nil + } + + cancel() + + select { + case err := <-errs: + if err == context.Canceled { //nolint:errorlint // don't use errors.Is intentionally + return nil + } + return err + case <-time.After(wait): + return errors.New("timed out waiting for cache") + } + } + + // Need to stop cache before closing dialer + sdk.closes = append([]func() error{stopCacheAndWaitResult}, sdk.closes...) + + go func() { + errs <- cache.Run(ctx) + }() + + return nil + } +} diff --git a/serviceerror/bad_request.go b/serviceerror/bad_request.go new file mode 100644 index 0000000..4330c5a --- /dev/null +++ b/serviceerror/bad_request.go @@ -0,0 +1,47 @@ +package serviceerror + +import ( + "fmt" + "strings" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*BadRequest)(nil) +) + +type BadRequest struct { + commonServiceError + badRequest *common.BadRequest +} + +func NewBadRequest(se *common.ServiceError, br *common.BadRequest) *BadRequest { + return &BadRequest{ + commonServiceError: commonServiceError{ + source: se, + }, + badRequest: br, + } +} + +func (e *BadRequest) Violations() []*common.BadRequest_Violation { + return e.badRequest.Violations +} + +func (e *BadRequest) Error() string { + violations := make([]string, 0, len(e.badRequest.Violations)) + for _, violation := range e.badRequest.Violations { + violations = append(violations, fmt.Sprintf( + " %s: %s", + violation.Field, + violation.Message, + )) + } + return fmt.Sprintf( + "Bad Request %s: service %s, violations:\n%s", + e.source.Code, + e.source.Service, + strings.Join(violations, "\n"), + ) +} diff --git a/serviceerror/bad_resource_state.go b/serviceerror/bad_resource_state.go new file mode 100644 index 0000000..4fed0f5 --- /dev/null +++ b/serviceerror/bad_resource_state.go @@ -0,0 +1,43 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*BadResourceState)(nil) +) + +type BadResourceState struct { + commonServiceError + badResouceState *common.BadResourceState +} + +func NewBadResourceState(se *common.ServiceError, br *common.BadResourceState) *BadResourceState { + return &BadResourceState{ + commonServiceError: commonServiceError{ + source: se, + }, + badResouceState: br, + } +} + +func (e *BadResourceState) ResourceID() string { + return e.badResouceState.ResourceId +} + +func (e *BadResourceState) Message() string { + return e.badResouceState.Message +} + +func (e *BadResourceState) Error() string { + return fmt.Sprintf( + "Bad resource state %s:\n service %s:\n resource ID: %s\n message: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + e.Message(), + ) +} diff --git a/serviceerror/interceptor.go b/serviceerror/interceptor.go new file mode 100644 index 0000000..eaef02b --- /dev/null +++ b/serviceerror/interceptor.go @@ -0,0 +1,46 @@ +package serviceerror + +import ( + "context" + + "google.golang.org/grpc" +) + +func UnaryClientInterceptor( + ctx context.Context, + method string, + req, reply any, + cc *grpc.ClientConn, + invoker grpc.UnaryInvoker, + opts ...grpc.CallOption, +) error { + err := invoker(ctx, method, req, reply, cc, opts...) + return FromKnownErrors(err) +} + +func StreamClientInterceptor( + ctx context.Context, + desc *grpc.StreamDesc, + cc *grpc.ClientConn, + method string, + streamer grpc.Streamer, + opts ...grpc.CallOption, +) (grpc.ClientStream, error) { + stream, err := streamer(ctx, desc, cc, method, opts...) + if err != nil { + return nil, FromKnownErrors(err) + } + return wrappedStream{ClientStream: stream}, nil +} + +type wrappedStream struct { + grpc.ClientStream +} + +func (w wrappedStream) SendMsg(m any) error { + return FromKnownErrors(w.ClientStream.SendMsg(m)) +} + +func (w wrappedStream) RecvMsg(m any) error { + return FromKnownErrors(w.ClientStream.RecvMsg(m)) +} diff --git a/serviceerror/internal.go b/serviceerror/internal.go new file mode 100644 index 0000000..be50ca0 --- /dev/null +++ b/serviceerror/internal.go @@ -0,0 +1,43 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*Internal)(nil) +) + +type Internal struct { + commonServiceError + internal *common.InternalError +} + +func NewInternal(se *common.ServiceError, detail *common.InternalError) *Internal { + return &Internal{ + commonServiceError: commonServiceError{ + source: se, + }, + internal: detail, + } +} + +func (e *Internal) RequestID() string { + return e.internal.RequestId +} + +func (e *Internal) TraceID() string { + return e.internal.TraceId +} + +func (e *Internal) Error() string { + return fmt.Sprintf( + "Internal error %s: service %s, request ID: %s, trace ID: %s", + e.source.Code, + e.source.Service, + e.RequestID(), + e.TraceID(), + ) +} diff --git a/serviceerror/not_enough_resources.go b/serviceerror/not_enough_resources.go new file mode 100644 index 0000000..30cd1f1 --- /dev/null +++ b/serviceerror/not_enough_resources.go @@ -0,0 +1,48 @@ +package serviceerror + +import ( + "fmt" + "strings" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*NotEnoughResources)(nil) +) + +type NotEnoughResources struct { + commonServiceError + notEnoughResources *common.NotEnoughResources +} + +func NewNotEnoughResources(se *common.ServiceError, detail *common.NotEnoughResources) *NotEnoughResources { + return &NotEnoughResources{ + commonServiceError: commonServiceError{ + source: se, + }, + notEnoughResources: detail, + } +} + +func (e *NotEnoughResources) Violations() []*common.NotEnoughResources_Violation { + return e.notEnoughResources.Violations +} + +func (e *NotEnoughResources) Error() string { + violations := make([]string, 0, len(e.notEnoughResources.Violations)) + for _, violation := range e.notEnoughResources.Violations { + violations = append(violations, fmt.Sprintf( + " %s (requested %s): %s", + violation.ResourceType, + violation.Requested, + violation.Message, + )) + } + return fmt.Sprintf( + "Not enough resources %s: service %s, violations:\n%s", + e.source.Code, + e.source.Service, + strings.Join(violations, "\n"), + ) +} diff --git a/serviceerror/operation_aborted.go b/serviceerror/operation_aborted.go new file mode 100644 index 0000000..d9b007a --- /dev/null +++ b/serviceerror/operation_aborted.go @@ -0,0 +1,46 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*OperationAborted)(nil) +) + +type OperationAborted struct { + commonServiceError + aborted *common.OperationAborted +} + +func NewOperationAborted(se *common.ServiceError, detail *common.OperationAborted) *OperationAborted { + return &OperationAborted{ + commonServiceError: commonServiceError{ + source: se, + }, + aborted: detail, + } +} + +func (e *OperationAborted) ResourceID() string { + return e.aborted.ResourceId +} +func (e *OperationAborted) AbortedOperationID() string { + return e.aborted.OperationId +} +func (e *OperationAborted) NewOperationID() string { + return e.aborted.AbortedByOperationId +} + +func (e *OperationAborted) Error() string { + return fmt.Sprintf( + "Operation aborted %s: service %s, resource: %s, aborted operation ID: %s, new operation ID: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + e.AbortedOperationID(), + e.NewOperationID(), + ) +} diff --git a/serviceerror/out_of_range.go b/serviceerror/out_of_range.go new file mode 100644 index 0000000..da6b221 --- /dev/null +++ b/serviceerror/out_of_range.go @@ -0,0 +1,42 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*OutOfRange)(nil) +) + +type OutOfRange struct { + commonServiceError + outOfRange *common.OutOfRange +} + +func NewOutOfRange(se *common.ServiceError, detail *common.OutOfRange) *OutOfRange { + return &OutOfRange{ + commonServiceError: commonServiceError{ + source: se, + }, + outOfRange: detail, + } +} + +func (e *OutOfRange) Requested() string { + return e.outOfRange.Requested +} +func (e *OutOfRange) Limit() string { + return e.outOfRange.Limit +} + +func (e *OutOfRange) Error() string { + return fmt.Sprintf( + "Out of range %s: service %s, requested: %s, limit: %s", + e.source.Code, + e.source.Service, + e.Requested(), + e.Limit(), + ) +} diff --git a/serviceerror/permission_denied.go b/serviceerror/permission_denied.go new file mode 100644 index 0000000..7f564ee --- /dev/null +++ b/serviceerror/permission_denied.go @@ -0,0 +1,38 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*PermissionDenied)(nil) +) + +type PermissionDenied struct { + commonServiceError + denied *common.PermissionDenied +} + +func NewPermissionDenied(se *common.ServiceError, detail *common.PermissionDenied) *PermissionDenied { + return &PermissionDenied{ + commonServiceError: commonServiceError{ + source: se, + }, + denied: detail, + } +} + +func (e *PermissionDenied) ResourceID() string { + return e.denied.ResourceId +} + +func (e *PermissionDenied) Error() string { + return fmt.Sprintf( + "Permission denied %s: service %s, resource ID: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + ) +} diff --git a/serviceerror/quota_failure.go b/serviceerror/quota_failure.go new file mode 100644 index 0000000..edd8812 --- /dev/null +++ b/serviceerror/quota_failure.go @@ -0,0 +1,49 @@ +package serviceerror + +import ( + "fmt" + "strings" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*QuotaFailure)(nil) +) + +type QuotaFailure struct { + commonServiceError + failure *common.QuotaFailure +} + +func NewQuotaFailure(se *common.ServiceError, detail *common.QuotaFailure) *QuotaFailure { + return &QuotaFailure{ + commonServiceError: commonServiceError{ + source: se, + }, + failure: detail, + } +} + +func (e *QuotaFailure) Violations() []*common.QuotaFailure_Violation { + return e.failure.Violations +} + +func (e *QuotaFailure) Error() string { + violations := make([]string, 0, len(e.failure.Violations)) + for _, violation := range e.failure.Violations { + violations = append(violations, fmt.Sprintf( + " %s (limit %s, requested %s): %s", + violation.Quota, + violation.Limit, + violation.Requested, + violation.Message, + )) + } + return fmt.Sprintf( + "Quota failure %s: service %s, violations:\n%s", + e.source.Code, + e.source.Service, + strings.Join(violations, "\n"), + ) +} diff --git a/serviceerror/resource_already_exists.go b/serviceerror/resource_already_exists.go new file mode 100644 index 0000000..befd041 --- /dev/null +++ b/serviceerror/resource_already_exists.go @@ -0,0 +1,38 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*ResourceAlreadyExists)(nil) +) + +type ResourceAlreadyExists struct { + commonServiceError + exists *common.ResourceAlreadyExists +} + +func NewResourceAlreadyExists(se *common.ServiceError, detail *common.ResourceAlreadyExists) *ResourceAlreadyExists { + return &ResourceAlreadyExists{ + commonServiceError: commonServiceError{ + source: se, + }, + exists: detail, + } +} + +func (e *ResourceAlreadyExists) ResourceID() string { + return e.exists.ResourceId +} + +func (e *ResourceAlreadyExists) Error() string { + return fmt.Sprintf( + "Resource already exists %s: service %s, resource ID: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + ) +} diff --git a/serviceerror/resource_conflict.go b/serviceerror/resource_conflict.go new file mode 100644 index 0000000..1e6f902 --- /dev/null +++ b/serviceerror/resource_conflict.go @@ -0,0 +1,43 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*ResourceConflict)(nil) +) + +type ResourceConflict struct { + commonServiceError + conflict *common.ResourceConflict +} + +func NewResourceConflict(se *common.ServiceError, detail *common.ResourceConflict) *ResourceConflict { + return &ResourceConflict{ + commonServiceError: commonServiceError{ + source: se, + }, + conflict: detail, + } +} + +func (e *ResourceConflict) ResourceID() string { + return e.conflict.ResourceId +} + +func (e *ResourceConflict) Message() string { + return e.conflict.Message +} + +func (e *ResourceConflict) Error() string { + return fmt.Sprintf( + "Resource conflict %s: service %s, resource ID %s: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + e.Message(), + ) +} diff --git a/serviceerror/resource_not_found.go b/serviceerror/resource_not_found.go new file mode 100644 index 0000000..4bba4e5 --- /dev/null +++ b/serviceerror/resource_not_found.go @@ -0,0 +1,38 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*ResourceNotFound)(nil) +) + +type ResourceNotFound struct { + commonServiceError + notFound *common.ResourceNotFound +} + +func NewResourceNotFound(se *common.ServiceError, detail *common.ResourceNotFound) *ResourceNotFound { + return &ResourceNotFound{ + commonServiceError: commonServiceError{ + source: se, + }, + notFound: detail, + } +} + +func (e *ResourceNotFound) ResourceID() string { + return e.notFound.ResourceId +} + +func (e *ResourceNotFound) Error() string { + return fmt.Sprintf( + "Resource not found %s: service %s, resource ID: %s", + e.source.Code, + e.source.Service, + e.ResourceID(), + ) +} diff --git a/serviceerror/service_error.go b/serviceerror/service_error.go new file mode 100644 index 0000000..b6a94fb --- /dev/null +++ b/serviceerror/service_error.go @@ -0,0 +1,82 @@ +package serviceerror + +import ( + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +type ServiceError interface { + error + Proto() *common.ServiceError + Service() string + Code() string + RetryType() common.ServiceError_RetryType +} + +func ServiceErrorFromAny(detail *anypb.Any) (ServiceError, error) { //nolint:revive // don't want to name it FromAny + serviceError := &common.ServiceError{} + err := anypb.UnmarshalTo( + detail, + serviceError, + proto.UnmarshalOptions{ + DiscardUnknown: true, + }, + ) + if err != nil { + return nil, err + } + switch seDetails := serviceError.Details.(type) { + case *common.ServiceError_BadRequest: + return NewBadRequest(serviceError, seDetails.BadRequest), nil + case *common.ServiceError_BadResourceState: + return NewBadResourceState(serviceError, seDetails.BadResourceState), nil + case *common.ServiceError_ResourceNotFound: + return NewResourceNotFound(serviceError, seDetails.ResourceNotFound), nil + case *common.ServiceError_ResourceAlreadyExists: + return NewResourceAlreadyExists(serviceError, seDetails.ResourceAlreadyExists), nil + case *common.ServiceError_OutOfRange: + return NewOutOfRange(serviceError, seDetails.OutOfRange), nil + case *common.ServiceError_PermissionDenied: + return NewPermissionDenied(serviceError, seDetails.PermissionDenied), nil + case *common.ServiceError_ResourceConflict: + return NewResourceConflict(serviceError, seDetails.ResourceConflict), nil + case *common.ServiceError_OperationAborted: + return NewOperationAborted(serviceError, seDetails.OperationAborted), nil + case *common.ServiceError_TooManyRequests: + return NewTooManyRequests(serviceError, seDetails.TooManyRequests), nil + case *common.ServiceError_QuotaFailure: + return NewQuotaFailure(serviceError, seDetails.QuotaFailure), nil + case *common.ServiceError_InternalError: + return NewInternal(serviceError, seDetails.InternalError), nil + case *common.ServiceError_NotEnoughResources: + return NewNotEnoughResources(serviceError, seDetails.NotEnoughResources), nil + default: + return NewUnknown(serviceError), nil + } +} + +type commonServiceError struct { + source *common.ServiceError +} + +// Code implements ServiceError. +func (e *commonServiceError) Code() string { + return e.source.GetCode() +} + +// Proto implements ServiceError. +func (e *commonServiceError) Proto() *common.ServiceError { + return e.source +} + +// RetryType implements ServiceError. +func (e *commonServiceError) RetryType() common.ServiceError_RetryType { + return e.source.GetRetryType() +} + +// Service implements ServiceError. +func (e *commonServiceError) Service() string { + return e.source.GetService() +} diff --git a/serviceerror/service_error_test.go b/serviceerror/service_error_test.go new file mode 100644 index 0000000..e68a5da --- /dev/null +++ b/serviceerror/service_error_test.go @@ -0,0 +1,34 @@ +package serviceerror_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" + "github.com/nebius/gosdk/serviceerror" +) + +func TestServiceErrorNoUnknowns(t *testing.T) { + t.Parallel() + + seProto := (&common.ServiceError{}).ProtoReflect() + details := seProto.Descriptor().Oneofs().ByName("details") + require.NotNil(t, details) + + for i := range details.Fields().Len() { + field := details.Fields().Get(i) + val := seProto.NewField(field) + seProto.Set(field, val) + myAny := &anypb.Any{} + err := anypb.MarshalFrom(myAny, seProto.Interface(), proto.MarshalOptions{}) + require.NoError(t, err) + se, err := serviceerror.ServiceErrorFromAny(myAny) + require.NoError(t, err) + _, ok := se.(*serviceerror.Unknown) + assert.False(t, ok, "Service error type not implemented", field.Name()) + } +} diff --git a/serviceerror/too_many_requests.go b/serviceerror/too_many_requests.go new file mode 100644 index 0000000..663da95 --- /dev/null +++ b/serviceerror/too_many_requests.go @@ -0,0 +1,38 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*TooManyRequests)(nil) +) + +type TooManyRequests struct { + commonServiceError + violation *common.TooManyRequests +} + +func NewTooManyRequests(se *common.ServiceError, detail *common.TooManyRequests) *TooManyRequests { + return &TooManyRequests{ + commonServiceError: commonServiceError{ + source: se, + }, + violation: detail, + } +} + +func (e *TooManyRequests) Violation() string { + return e.violation.Violation +} + +func (e *TooManyRequests) Error() string { + return fmt.Sprintf( + "Too many requests %s: service %s: %s", + e.source.Code, + e.source.Service, + e.violation.Violation, + ) +} diff --git a/serviceerror/unknown.go b/serviceerror/unknown.go new file mode 100644 index 0000000..aed91e5 --- /dev/null +++ b/serviceerror/unknown.go @@ -0,0 +1,35 @@ +package serviceerror + +import ( + "fmt" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" +) + +var ( + _ ServiceError = (*Unknown)(nil) +) + +type Unknown struct { + commonServiceError +} + +func NewUnknown(se *common.ServiceError) *Unknown { + return &Unknown{ + commonServiceError: commonServiceError{ + source: se, + }, + } +} + +func (e *Unknown) IsUnknown() bool { + return true +} + +func (e *Unknown) Error() string { + return fmt.Sprintf( + "Service %s error %s", + e.source.Service, + e.source.Code, + ) +} diff --git a/serviceerror/wrap.go b/serviceerror/wrap.go new file mode 100644 index 0000000..2a76491 --- /dev/null +++ b/serviceerror/wrap.go @@ -0,0 +1,90 @@ +package serviceerror + +import ( + "errors" + "fmt" + "strings" + + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/anypb" +) + +type WrapError struct { + wrapped error + ServiceErrors []ServiceError +} + +func collectServiceErrors(details []*anypb.Any) []ServiceError { + serviceErrors := make([]ServiceError, 0, len(details)) + for _, detail := range details { + if se, err := ServiceErrorFromAny(detail); err == nil { + serviceErrors = append(serviceErrors, se) + } + } + return serviceErrors +} + +func FromKnownErrors(err error) error { + return FromErrorAndAny(err, nil) +} + +func FromErrorAndAny(err error, details []*anypb.Any) error { + if err == nil { + return nil + } + wrapError := &WrapError{} + if errors.As(err, &wrapError) { + return err + } + var serviceErrors []ServiceError + if stat, ok := status.FromError(err); ok { + serviceErrors = collectServiceErrors(stat.Proto().Details) + } + serviceErrors = append(serviceErrors, collectServiceErrors(details)...) + + if len(serviceErrors) > 0 { + return &WrapError{ + wrapped: err, + ServiceErrors: serviceErrors, + } + } + return err +} + +func (e *WrapError) Error() string { + return e.wrapped.Error() +} + +func (e *WrapError) Cause() string { + errorStrings := make([]string, 0, len(e.ServiceErrors)) + for _, se := range e.ServiceErrors { + errorStrings = append(errorStrings, AddIndent(se.Error(), " ")) + } + if len(errorStrings) > 1 { + return fmt.Sprintf( + "caused by service errors:\n%s", + strings.Join(errorStrings, "\n"), + ) + } + return fmt.Sprintf( + "caused by service error:\n%s", + errorStrings[0], + ) +} + +func (e *WrapError) Unwrap() error { + return e.wrapped +} + +func AddIndent(s, indent string) string { + // Split the string into lines + lines := strings.Split(s, "\n") + + // Prepend the indent to each line + for i, line := range lines { + lines[i] = indent + line + } + + // Join the lines back into a single string + return strings.Join(lines, "\n") +} diff --git a/services/nebius/applications.go b/services/nebius/applications.go new file mode 100644 index 0000000..6dc526d --- /dev/null +++ b/services/nebius/applications.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/applications" + +func (s Services) Applications() applications.Services { + return applications.New(s.sdk) +} diff --git a/services/nebius/applications/sdk.go b/services/nebius/applications/sdk.go new file mode 100644 index 0000000..9f4b77f --- /dev/null +++ b/services/nebius/applications/sdk.go @@ -0,0 +1,15 @@ +package applications + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/applications/v1alpha1.go b/services/nebius/applications/v1alpha1.go new file mode 100644 index 0000000..03a8ba7 --- /dev/null +++ b/services/nebius/applications/v1alpha1.go @@ -0,0 +1,7 @@ +package applications + +import "github.com/nebius/gosdk/services/nebius/applications/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/applications/v1alpha1/k8s_release_service.sdk.go b/services/nebius/applications/v1alpha1/k8s_release_service.sdk.go new file mode 100644 index 0000000..3930544 --- /dev/null +++ b/services/nebius/applications/v1alpha1/k8s_release_service.sdk.go @@ -0,0 +1,153 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/applications/v1alpha1" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[K8SReleaseServiceID] = "deployment-manager.mkt" +} + +func (s Services) K8sRelease() K8SReleaseService { + return NewK8SReleaseService(s.sdk) +} + +const K8SReleaseServiceID conn.ServiceID = "nebius.applications.v1alpha1.K8sReleaseService" + +type K8SReleaseService interface { + Get(context.Context, *v1alpha1.GetK8SReleaseRequest, ...grpc.CallOption) (*v1alpha1.K8SRelease, error) + List(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) (*v1alpha1.ListK8SReleasesResponse, error) + Filter(context.Context, *v1alpha1.ListK8SReleasesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.K8SRelease, error] + Create(context.Context, *v1alpha1.CreateK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1alpha1.DeleteK8SReleaseRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type k8SReleaseService struct { + sdk iface.SDK +} + +func NewK8SReleaseService(sdk iface.SDK) K8SReleaseService { + return k8SReleaseService{ + sdk: sdk, + } +} + +func (s k8SReleaseService) Get(ctx context.Context, request *v1alpha1.GetK8SReleaseRequest, opts ...grpc.CallOption) (*v1alpha1.K8SRelease, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewK8SReleaseServiceClient(con).Get(ctx, request, opts...) +} + +func (s k8SReleaseService) List(ctx context.Context, request *v1alpha1.ListK8SReleasesRequest, opts ...grpc.CallOption) (*v1alpha1.ListK8SReleasesResponse, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewK8SReleaseServiceClient(con).List(ctx, request, opts...) +} + +func (s k8SReleaseService) Filter(ctx context.Context, request *v1alpha1.ListK8SReleasesRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.K8SRelease, error] { + req := proto.Clone(request).(*v1alpha1.ListK8SReleasesRequest) + return func(yield func(*v1alpha1.K8SRelease, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s k8SReleaseService) Create(ctx context.Context, request *v1alpha1.CreateK8SReleaseRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewK8SReleaseServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s k8SReleaseService) Delete(ctx context.Context, request *v1alpha1.DeleteK8SReleaseRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewK8SReleaseServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s k8SReleaseService) GetOperation(ctx context.Context, request *v1.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s k8SReleaseService) ListOperations(ctx context.Context, request *v1.ListOperationsRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, K8SReleaseServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/applications/v1alpha1/sdk.go b/services/nebius/applications/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/applications/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/compute.go b/services/nebius/compute.go new file mode 100644 index 0000000..cc0f931 --- /dev/null +++ b/services/nebius/compute.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/compute" + +func (s Services) Compute() compute.Services { + return compute.New(s.sdk) +} diff --git a/services/nebius/compute/sdk.go b/services/nebius/compute/sdk.go new file mode 100644 index 0000000..9cbe5df --- /dev/null +++ b/services/nebius/compute/sdk.go @@ -0,0 +1,15 @@ +package compute + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/compute/v1.go b/services/nebius/compute/v1.go new file mode 100644 index 0000000..4f486a7 --- /dev/null +++ b/services/nebius/compute/v1.go @@ -0,0 +1,7 @@ +package compute + +import "github.com/nebius/gosdk/services/nebius/compute/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/compute/v1/disk_service.sdk.go b/services/nebius/compute/v1/disk_service.sdk.go new file mode 100644 index 0000000..0012b4d --- /dev/null +++ b/services/nebius/compute/v1/disk_service.sdk.go @@ -0,0 +1,197 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/compute/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Disk() DiskService { + return NewDiskService(s.sdk) +} + +const DiskServiceID conn.ServiceID = "nebius.compute.v1.DiskService" + +type DiskService interface { + Get(context.Context, *v1.GetDiskRequest, ...grpc.CallOption) (*v1.Disk, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Disk, error) + List(context.Context, *v1.ListDisksRequest, ...grpc.CallOption) (*v1.ListDisksResponse, error) + Filter(context.Context, *v1.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v1.Disk, error] + Create(context.Context, *v1.CreateDiskRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateDiskRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteDiskRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperationsByParent(context.Context, *v1.ListOperationsByParentRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type diskService struct { + sdk iface.SDK +} + +func NewDiskService(sdk iface.SDK) DiskService { + return diskService{ + sdk: sdk, + } +} + +func (s diskService) Get(ctx context.Context, request *v1.GetDiskRequest, opts ...grpc.CallOption) (*v1.Disk, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewDiskServiceClient(con).Get(ctx, request, opts...) +} + +func (s diskService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Disk, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewDiskServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s diskService) List(ctx context.Context, request *v1.ListDisksRequest, opts ...grpc.CallOption) (*v1.ListDisksResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewDiskServiceClient(con).List(ctx, request, opts...) +} + +func (s diskService) Filter(ctx context.Context, request *v1.ListDisksRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Disk, error] { + req := proto.Clone(request).(*v1.ListDisksRequest) + return func(yield func(*v1.Disk, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s diskService) Create(ctx context.Context, request *v1.CreateDiskRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewDiskServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s diskService) Update(ctx context.Context, request *v1.UpdateDiskRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewDiskServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s diskService) Delete(ctx context.Context, request *v1.DeleteDiskRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewDiskServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s diskService) ListOperationsByParent(ctx context.Context, request *v1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewDiskServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s diskService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s diskService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1/filesystem_service.sdk.go b/services/nebius/compute/v1/filesystem_service.sdk.go new file mode 100644 index 0000000..994ce77 --- /dev/null +++ b/services/nebius/compute/v1/filesystem_service.sdk.go @@ -0,0 +1,197 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/compute/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Filesystem() FilesystemService { + return NewFilesystemService(s.sdk) +} + +const FilesystemServiceID conn.ServiceID = "nebius.compute.v1.FilesystemService" + +type FilesystemService interface { + Get(context.Context, *v1.GetFilesystemRequest, ...grpc.CallOption) (*v1.Filesystem, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Filesystem, error) + List(context.Context, *v1.ListFilesystemsRequest, ...grpc.CallOption) (*v1.ListFilesystemsResponse, error) + Filter(context.Context, *v1.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v1.Filesystem, error] + Create(context.Context, *v1.CreateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateFilesystemRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteFilesystemRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperationsByParent(context.Context, *v1.ListOperationsByParentRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type filesystemService struct { + sdk iface.SDK +} + +func NewFilesystemService(sdk iface.SDK) FilesystemService { + return filesystemService{ + sdk: sdk, + } +} + +func (s filesystemService) Get(ctx context.Context, request *v1.GetFilesystemRequest, opts ...grpc.CallOption) (*v1.Filesystem, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFilesystemServiceClient(con).Get(ctx, request, opts...) +} + +func (s filesystemService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Filesystem, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFilesystemServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s filesystemService) List(ctx context.Context, request *v1.ListFilesystemsRequest, opts ...grpc.CallOption) (*v1.ListFilesystemsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFilesystemServiceClient(con).List(ctx, request, opts...) +} + +func (s filesystemService) Filter(ctx context.Context, request *v1.ListFilesystemsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Filesystem, error] { + req := proto.Clone(request).(*v1.ListFilesystemsRequest) + return func(yield func(*v1.Filesystem, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s filesystemService) Create(ctx context.Context, request *v1.CreateFilesystemRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFilesystemServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s filesystemService) Update(ctx context.Context, request *v1.UpdateFilesystemRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFilesystemServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s filesystemService) Delete(ctx context.Context, request *v1.DeleteFilesystemRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFilesystemServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s filesystemService) ListOperationsByParent(ctx context.Context, request *v1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFilesystemServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s filesystemService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s filesystemService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1/gpu_cluster_service.sdk.go b/services/nebius/compute/v1/gpu_cluster_service.sdk.go new file mode 100644 index 0000000..654bd49 --- /dev/null +++ b/services/nebius/compute/v1/gpu_cluster_service.sdk.go @@ -0,0 +1,197 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/compute/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) GpuCluster() GpuClusterService { + return NewGpuClusterService(s.sdk) +} + +const GpuClusterServiceID conn.ServiceID = "nebius.compute.v1.GpuClusterService" + +type GpuClusterService interface { + Get(context.Context, *v1.GetGpuClusterRequest, ...grpc.CallOption) (*v1.GpuCluster, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.GpuCluster, error) + List(context.Context, *v1.ListGpuClustersRequest, ...grpc.CallOption) (*v1.ListGpuClustersResponse, error) + Filter(context.Context, *v1.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v1.GpuCluster, error] + Create(context.Context, *v1.CreateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteGpuClusterRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperationsByParent(context.Context, *v1.ListOperationsByParentRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type gpuClusterService struct { + sdk iface.SDK +} + +func NewGpuClusterService(sdk iface.SDK) GpuClusterService { + return gpuClusterService{ + sdk: sdk, + } +} + +func (s gpuClusterService) Get(ctx context.Context, request *v1.GetGpuClusterRequest, opts ...grpc.CallOption) (*v1.GpuCluster, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGpuClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s gpuClusterService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.GpuCluster, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGpuClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s gpuClusterService) List(ctx context.Context, request *v1.ListGpuClustersRequest, opts ...grpc.CallOption) (*v1.ListGpuClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGpuClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s gpuClusterService) Filter(ctx context.Context, request *v1.ListGpuClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1.GpuCluster, error] { + req := proto.Clone(request).(*v1.ListGpuClustersRequest) + return func(yield func(*v1.GpuCluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s gpuClusterService) Create(ctx context.Context, request *v1.CreateGpuClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewGpuClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) Update(ctx context.Context, request *v1.UpdateGpuClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewGpuClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) Delete(ctx context.Context, request *v1.DeleteGpuClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewGpuClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) ListOperationsByParent(ctx context.Context, request *v1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGpuClusterServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s gpuClusterService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s gpuClusterService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1/image_service.sdk.go b/services/nebius/compute/v1/image_service.sdk.go new file mode 100644 index 0000000..4ac9870 --- /dev/null +++ b/services/nebius/compute/v1/image_service.sdk.go @@ -0,0 +1,122 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/compute/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Image() ImageService { + return NewImageService(s.sdk) +} + +const ImageServiceID conn.ServiceID = "nebius.compute.v1.ImageService" + +type ImageService interface { + Get(context.Context, *v1.GetImageRequest, ...grpc.CallOption) (*v1.Image, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Image, error) + GetLatestByFamily(context.Context, *v1.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v1.Image, error) + List(context.Context, *v1.ListImagesRequest, ...grpc.CallOption) (*v1.ListImagesResponse, error) + Filter(context.Context, *v1.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v1.Image, error] + ListOperationsByParent(context.Context, *v1.ListOperationsByParentRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type imageService struct { + sdk iface.SDK +} + +func NewImageService(sdk iface.SDK) ImageService { + return imageService{ + sdk: sdk, + } +} + +func (s imageService) Get(ctx context.Context, request *v1.GetImageRequest, opts ...grpc.CallOption) (*v1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewImageServiceClient(con).Get(ctx, request, opts...) +} + +func (s imageService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewImageServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s imageService) GetLatestByFamily(ctx context.Context, request *v1.GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*v1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewImageServiceClient(con).GetLatestByFamily(ctx, request, opts...) +} + +func (s imageService) List(ctx context.Context, request *v1.ListImagesRequest, opts ...grpc.CallOption) (*v1.ListImagesResponse, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewImageServiceClient(con).List(ctx, request, opts...) +} + +func (s imageService) Filter(ctx context.Context, request *v1.ListImagesRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Image, error] { + req := proto.Clone(request).(*v1.ListImagesRequest) + return func(yield func(*v1.Image, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s imageService) ListOperationsByParent(ctx context.Context, request *v1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewImageServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1/instance_service.sdk.go b/services/nebius/compute/v1/instance_service.sdk.go new file mode 100644 index 0000000..0685473 --- /dev/null +++ b/services/nebius/compute/v1/instance_service.sdk.go @@ -0,0 +1,231 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/compute/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Instance() InstanceService { + return NewInstanceService(s.sdk) +} + +const InstanceServiceID conn.ServiceID = "nebius.compute.v1.InstanceService" + +type InstanceService interface { + Get(context.Context, *v1.GetInstanceRequest, ...grpc.CallOption) (*v1.Instance, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Instance, error) + List(context.Context, *v1.ListInstancesRequest, ...grpc.CallOption) (*v1.ListInstancesResponse, error) + Filter(context.Context, *v1.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v1.Instance, error] + Create(context.Context, *v1.CreateInstanceRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateInstanceRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteInstanceRequest, ...grpc.CallOption) (operations.Operation, error) + Start(context.Context, *v1.StartInstanceRequest, ...grpc.CallOption) (operations.Operation, error) + Stop(context.Context, *v1.StopInstanceRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperationsByParent(context.Context, *v1.ListOperationsByParentRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type instanceService struct { + sdk iface.SDK +} + +func NewInstanceService(sdk iface.SDK) InstanceService { + return instanceService{ + sdk: sdk, + } +} + +func (s instanceService) Get(ctx context.Context, request *v1.GetInstanceRequest, opts ...grpc.CallOption) (*v1.Instance, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInstanceServiceClient(con).Get(ctx, request, opts...) +} + +func (s instanceService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Instance, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInstanceServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s instanceService) List(ctx context.Context, request *v1.ListInstancesRequest, opts ...grpc.CallOption) (*v1.ListInstancesResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInstanceServiceClient(con).List(ctx, request, opts...) +} + +func (s instanceService) Filter(ctx context.Context, request *v1.ListInstancesRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Instance, error] { + req := proto.Clone(request).(*v1.ListInstancesRequest) + return func(yield func(*v1.Instance, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s instanceService) Create(ctx context.Context, request *v1.CreateInstanceRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInstanceServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s instanceService) Update(ctx context.Context, request *v1.UpdateInstanceRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInstanceServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s instanceService) Delete(ctx context.Context, request *v1.DeleteInstanceRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInstanceServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s instanceService) Start(ctx context.Context, request *v1.StartInstanceRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInstanceServiceClient(con).Start(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s instanceService) Stop(ctx context.Context, request *v1.StopInstanceRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInstanceServiceClient(con).Stop(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s instanceService) ListOperationsByParent(ctx context.Context, request *v1.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInstanceServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s instanceService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s instanceService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1/sdk.go b/services/nebius/compute/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/compute/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/compute/v1alpha1.go b/services/nebius/compute/v1alpha1.go new file mode 100644 index 0000000..99241e9 --- /dev/null +++ b/services/nebius/compute/v1alpha1.go @@ -0,0 +1,7 @@ +package compute + +import "github.com/nebius/gosdk/services/nebius/compute/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/compute/v1alpha1/disk_service.sdk.go b/services/nebius/compute/v1alpha1/disk_service.sdk.go new file mode 100644 index 0000000..256c9ea --- /dev/null +++ b/services/nebius/compute/v1alpha1/disk_service.sdk.go @@ -0,0 +1,198 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Disk() DiskService { + return NewDiskService(s.sdk) +} + +const DiskServiceID conn.ServiceID = "nebius.compute.v1alpha1.DiskService" + +type DiskService interface { + Get(context.Context, *v1alpha1.GetDiskRequest, ...grpc.CallOption) (*v1alpha1.Disk, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.Disk, error) + List(context.Context, *v1alpha1.ListDisksRequest, ...grpc.CallOption) (*v1alpha1.ListDisksResponse, error) + Filter(context.Context, *v1alpha1.ListDisksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Disk, error] + Create(context.Context, *v1alpha1.CreateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteDiskRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperationsByParent(context.Context, *v1alpha11.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type diskService struct { + sdk iface.SDK +} + +func NewDiskService(sdk iface.SDK) DiskService { + return diskService{ + sdk: sdk, + } +} + +func (s diskService) Get(ctx context.Context, request *v1alpha1.GetDiskRequest, opts ...grpc.CallOption) (*v1alpha1.Disk, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewDiskServiceClient(con).Get(ctx, request, opts...) +} + +func (s diskService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Disk, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewDiskServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s diskService) List(ctx context.Context, request *v1alpha1.ListDisksRequest, opts ...grpc.CallOption) (*v1alpha1.ListDisksResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewDiskServiceClient(con).List(ctx, request, opts...) +} + +func (s diskService) Filter(ctx context.Context, request *v1alpha1.ListDisksRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Disk, error] { + req := proto.Clone(request).(*v1alpha1.ListDisksRequest) + return func(yield func(*v1alpha1.Disk, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s diskService) Create(ctx context.Context, request *v1alpha1.CreateDiskRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewDiskServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s diskService) Update(ctx context.Context, request *v1alpha1.UpdateDiskRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewDiskServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s diskService) Delete(ctx context.Context, request *v1alpha1.DeleteDiskRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewDiskServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s diskService) ListOperationsByParent(ctx context.Context, request *v1alpha11.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewDiskServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s diskService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s diskService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, DiskServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1alpha1/filesystem_service.sdk.go b/services/nebius/compute/v1alpha1/filesystem_service.sdk.go new file mode 100644 index 0000000..9cea210 --- /dev/null +++ b/services/nebius/compute/v1alpha1/filesystem_service.sdk.go @@ -0,0 +1,198 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Filesystem() FilesystemService { + return NewFilesystemService(s.sdk) +} + +const FilesystemServiceID conn.ServiceID = "nebius.compute.v1alpha1.FilesystemService" + +type FilesystemService interface { + Get(context.Context, *v1alpha1.GetFilesystemRequest, ...grpc.CallOption) (*v1alpha1.Filesystem, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.Filesystem, error) + List(context.Context, *v1alpha1.ListFilesystemsRequest, ...grpc.CallOption) (*v1alpha1.ListFilesystemsResponse, error) + Filter(context.Context, *v1alpha1.ListFilesystemsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Filesystem, error] + Create(context.Context, *v1alpha1.CreateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteFilesystemRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperationsByParent(context.Context, *v1alpha11.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type filesystemService struct { + sdk iface.SDK +} + +func NewFilesystemService(sdk iface.SDK) FilesystemService { + return filesystemService{ + sdk: sdk, + } +} + +func (s filesystemService) Get(ctx context.Context, request *v1alpha1.GetFilesystemRequest, opts ...grpc.CallOption) (*v1alpha1.Filesystem, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewFilesystemServiceClient(con).Get(ctx, request, opts...) +} + +func (s filesystemService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Filesystem, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewFilesystemServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s filesystemService) List(ctx context.Context, request *v1alpha1.ListFilesystemsRequest, opts ...grpc.CallOption) (*v1alpha1.ListFilesystemsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewFilesystemServiceClient(con).List(ctx, request, opts...) +} + +func (s filesystemService) Filter(ctx context.Context, request *v1alpha1.ListFilesystemsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Filesystem, error] { + req := proto.Clone(request).(*v1alpha1.ListFilesystemsRequest) + return func(yield func(*v1alpha1.Filesystem, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s filesystemService) Create(ctx context.Context, request *v1alpha1.CreateFilesystemRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewFilesystemServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s filesystemService) Update(ctx context.Context, request *v1alpha1.UpdateFilesystemRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewFilesystemServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s filesystemService) Delete(ctx context.Context, request *v1alpha1.DeleteFilesystemRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewFilesystemServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s filesystemService) ListOperationsByParent(ctx context.Context, request *v1alpha11.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewFilesystemServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s filesystemService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s filesystemService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FilesystemServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1alpha1/gpu_cluster_service.sdk.go b/services/nebius/compute/v1alpha1/gpu_cluster_service.sdk.go new file mode 100644 index 0000000..f8642ee --- /dev/null +++ b/services/nebius/compute/v1alpha1/gpu_cluster_service.sdk.go @@ -0,0 +1,198 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) GpuCluster() GpuClusterService { + return NewGpuClusterService(s.sdk) +} + +const GpuClusterServiceID conn.ServiceID = "nebius.compute.v1alpha1.GpuClusterService" + +type GpuClusterService interface { + Get(context.Context, *v1alpha1.GetGpuClusterRequest, ...grpc.CallOption) (*v1alpha1.GpuCluster, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.GpuCluster, error) + List(context.Context, *v1alpha1.ListGpuClustersRequest, ...grpc.CallOption) (*v1alpha1.ListGpuClustersResponse, error) + Filter(context.Context, *v1alpha1.ListGpuClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.GpuCluster, error] + Create(context.Context, *v1alpha1.CreateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteGpuClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperationsByParent(context.Context, *v1alpha11.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type gpuClusterService struct { + sdk iface.SDK +} + +func NewGpuClusterService(sdk iface.SDK) GpuClusterService { + return gpuClusterService{ + sdk: sdk, + } +} + +func (s gpuClusterService) Get(ctx context.Context, request *v1alpha1.GetGpuClusterRequest, opts ...grpc.CallOption) (*v1alpha1.GpuCluster, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewGpuClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s gpuClusterService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.GpuCluster, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewGpuClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s gpuClusterService) List(ctx context.Context, request *v1alpha1.ListGpuClustersRequest, opts ...grpc.CallOption) (*v1alpha1.ListGpuClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewGpuClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s gpuClusterService) Filter(ctx context.Context, request *v1alpha1.ListGpuClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.GpuCluster, error] { + req := proto.Clone(request).(*v1alpha1.ListGpuClustersRequest) + return func(yield func(*v1alpha1.GpuCluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s gpuClusterService) Create(ctx context.Context, request *v1alpha1.CreateGpuClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewGpuClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) Update(ctx context.Context, request *v1alpha1.UpdateGpuClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewGpuClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) Delete(ctx context.Context, request *v1alpha1.DeleteGpuClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewGpuClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s gpuClusterService) ListOperationsByParent(ctx context.Context, request *v1alpha11.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewGpuClusterServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s gpuClusterService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s gpuClusterService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, GpuClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1alpha1/image_service.sdk.go b/services/nebius/compute/v1alpha1/image_service.sdk.go new file mode 100644 index 0000000..6f05993 --- /dev/null +++ b/services/nebius/compute/v1alpha1/image_service.sdk.go @@ -0,0 +1,123 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Image() ImageService { + return NewImageService(s.sdk) +} + +const ImageServiceID conn.ServiceID = "nebius.compute.v1alpha1.ImageService" + +type ImageService interface { + Get(context.Context, *v1alpha1.GetImageRequest, ...grpc.CallOption) (*v1alpha1.Image, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.Image, error) + GetLatestByFamily(context.Context, *v1alpha1.GetImageLatestByFamilyRequest, ...grpc.CallOption) (*v1alpha1.Image, error) + List(context.Context, *v1alpha1.ListImagesRequest, ...grpc.CallOption) (*v1alpha1.ListImagesResponse, error) + Filter(context.Context, *v1alpha1.ListImagesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Image, error] + ListOperationsByParent(context.Context, *v1alpha11.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type imageService struct { + sdk iface.SDK +} + +func NewImageService(sdk iface.SDK) ImageService { + return imageService{ + sdk: sdk, + } +} + +func (s imageService) Get(ctx context.Context, request *v1alpha1.GetImageRequest, opts ...grpc.CallOption) (*v1alpha1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewImageServiceClient(con).Get(ctx, request, opts...) +} + +func (s imageService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewImageServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s imageService) GetLatestByFamily(ctx context.Context, request *v1alpha1.GetImageLatestByFamilyRequest, opts ...grpc.CallOption) (*v1alpha1.Image, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewImageServiceClient(con).GetLatestByFamily(ctx, request, opts...) +} + +func (s imageService) List(ctx context.Context, request *v1alpha1.ListImagesRequest, opts ...grpc.CallOption) (*v1alpha1.ListImagesResponse, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewImageServiceClient(con).List(ctx, request, opts...) +} + +func (s imageService) Filter(ctx context.Context, request *v1alpha1.ListImagesRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Image, error] { + req := proto.Clone(request).(*v1alpha1.ListImagesRequest) + return func(yield func(*v1alpha1.Image, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s imageService) ListOperationsByParent(ctx context.Context, request *v1alpha11.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ImageServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewImageServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1alpha1/instance_service.sdk.go b/services/nebius/compute/v1alpha1/instance_service.sdk.go new file mode 100644 index 0000000..ac2c8f8 --- /dev/null +++ b/services/nebius/compute/v1alpha1/instance_service.sdk.go @@ -0,0 +1,232 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/compute/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Instance() InstanceService { + return NewInstanceService(s.sdk) +} + +const InstanceServiceID conn.ServiceID = "nebius.compute.v1alpha1.InstanceService" + +type InstanceService interface { + Get(context.Context, *v1alpha1.GetInstanceRequest, ...grpc.CallOption) (*v1alpha1.Instance, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.Instance, error) + List(context.Context, *v1alpha1.ListInstancesRequest, ...grpc.CallOption) (*v1alpha1.ListInstancesResponse, error) + Filter(context.Context, *v1alpha1.ListInstancesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Instance, error] + Create(context.Context, *v1alpha1.CreateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Start(context.Context, *v1alpha1.StartInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Stop(context.Context, *v1alpha1.StopInstanceRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperationsByParent(context.Context, *v1alpha11.ListOperationsByParentRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type instanceService struct { + sdk iface.SDK +} + +func NewInstanceService(sdk iface.SDK) InstanceService { + return instanceService{ + sdk: sdk, + } +} + +func (s instanceService) Get(ctx context.Context, request *v1alpha1.GetInstanceRequest, opts ...grpc.CallOption) (*v1alpha1.Instance, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewInstanceServiceClient(con).Get(ctx, request, opts...) +} + +func (s instanceService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Instance, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewInstanceServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s instanceService) List(ctx context.Context, request *v1alpha1.ListInstancesRequest, opts ...grpc.CallOption) (*v1alpha1.ListInstancesResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewInstanceServiceClient(con).List(ctx, request, opts...) +} + +func (s instanceService) Filter(ctx context.Context, request *v1alpha1.ListInstancesRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Instance, error] { + req := proto.Clone(request).(*v1alpha1.ListInstancesRequest) + return func(yield func(*v1alpha1.Instance, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s instanceService) Create(ctx context.Context, request *v1alpha1.CreateInstanceRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewInstanceServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s instanceService) Update(ctx context.Context, request *v1alpha1.UpdateInstanceRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewInstanceServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s instanceService) Delete(ctx context.Context, request *v1alpha1.DeleteInstanceRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewInstanceServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s instanceService) Start(ctx context.Context, request *v1alpha1.StartInstanceRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewInstanceServiceClient(con).Start(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s instanceService) Stop(ctx context.Context, request *v1alpha1.StopInstanceRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewInstanceServiceClient(con).Stop(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s instanceService) ListOperationsByParent(ctx context.Context, request *v1alpha11.ListOperationsByParentRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewInstanceServiceClient(con).ListOperationsByParent(ctx, request, opts...) +} + +func (s instanceService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s instanceService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InstanceServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/compute/v1alpha1/sdk.go b/services/nebius/compute/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/compute/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/iam.go b/services/nebius/iam.go new file mode 100644 index 0000000..88274bf --- /dev/null +++ b/services/nebius/iam.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/iam" + +func (s Services) IAM() iam.Services { + return iam.New(s.sdk) +} diff --git a/services/nebius/iam/sdk.go b/services/nebius/iam/sdk.go new file mode 100644 index 0000000..bfdc673 --- /dev/null +++ b/services/nebius/iam/sdk.go @@ -0,0 +1,15 @@ +package iam + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/iam/v1.go b/services/nebius/iam/v1.go new file mode 100644 index 0000000..f3d0422 --- /dev/null +++ b/services/nebius/iam/v1.go @@ -0,0 +1,7 @@ +package iam + +import "github.com/nebius/gosdk/services/nebius/iam/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/iam/v1/access_key_service.sdk.go b/services/nebius/iam/v1/access_key_service.sdk.go new file mode 100644 index 0000000..6e8a021 --- /dev/null +++ b/services/nebius/iam/v1/access_key_service.sdk.go @@ -0,0 +1,248 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[AccessKeyServiceID] = "cpl.iam" +} + +func (s Services) AccessKey() AccessKeyService { + return NewAccessKeyService(s.sdk) +} + +const AccessKeyServiceID conn.ServiceID = "nebius.iam.v1.AccessKeyService" + +type AccessKeyService interface { + Create(context.Context, *v1.CreateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error) + List(context.Context, *v1.ListAccessKeysRequest, ...grpc.CallOption) (*v1.ListAccessKeysResponse, error) + Filter(context.Context, *v1.ListAccessKeysRequest, ...grpc.CallOption) iter.Seq2[*v1.AccessKey, error] + ListByAccount(context.Context, *v1.ListAccessKeysByAccountRequest, ...grpc.CallOption) (*v1.ListAccessKeysResponse, error) + Update(context.Context, *v1.UpdateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error) + GetById(context.Context, *v1.GetAccessKeyByIdRequest, ...grpc.CallOption) (*v1.AccessKey, error) + GetByAwsId(context.Context, *v1.GetAccessKeyByAwsIdRequest, ...grpc.CallOption) (*v1.AccessKey, error) + GetSecretOnce(context.Context, *v1.GetAccessKeySecretOnceRequest, ...grpc.CallOption) (*v1.GetAccessKeySecretOnceResponse, error) + Activate(context.Context, *v1.ActivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Deactivate(context.Context, *v1.DeactivateAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteAccessKeyRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type accessKeyService struct { + sdk iface.SDK +} + +func NewAccessKeyService(sdk iface.SDK) AccessKeyService { + return accessKeyService{ + sdk: sdk, + } +} + +func (s accessKeyService) Create(ctx context.Context, request *v1.CreateAccessKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAccessKeyServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s accessKeyService) List(ctx context.Context, request *v1.ListAccessKeysRequest, opts ...grpc.CallOption) (*v1.ListAccessKeysResponse, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAccessKeyServiceClient(con).List(ctx, request, opts...) +} + +func (s accessKeyService) Filter(ctx context.Context, request *v1.ListAccessKeysRequest, opts ...grpc.CallOption) iter.Seq2[*v1.AccessKey, error] { + req := proto.Clone(request).(*v1.ListAccessKeysRequest) + return func(yield func(*v1.AccessKey, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s accessKeyService) ListByAccount(ctx context.Context, request *v1.ListAccessKeysByAccountRequest, opts ...grpc.CallOption) (*v1.ListAccessKeysResponse, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAccessKeyServiceClient(con).ListByAccount(ctx, request, opts...) +} + +func (s accessKeyService) Update(ctx context.Context, request *v1.UpdateAccessKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAccessKeyServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s accessKeyService) GetById(ctx context.Context, request *v1.GetAccessKeyByIdRequest, opts ...grpc.CallOption) (*v1.AccessKey, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAccessKeyServiceClient(con).GetById(ctx, request, opts...) +} + +func (s accessKeyService) GetByAwsId(ctx context.Context, request *v1.GetAccessKeyByAwsIdRequest, opts ...grpc.CallOption) (*v1.AccessKey, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAccessKeyServiceClient(con).GetByAwsId(ctx, request, opts...) +} + +func (s accessKeyService) GetSecretOnce(ctx context.Context, request *v1.GetAccessKeySecretOnceRequest, opts ...grpc.CallOption) (*v1.GetAccessKeySecretOnceResponse, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAccessKeyServiceClient(con).GetSecretOnce(ctx, request, opts...) +} + +func (s accessKeyService) Activate(ctx context.Context, request *v1.ActivateAccessKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAccessKeyServiceClient(con).Activate(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s accessKeyService) Deactivate(ctx context.Context, request *v1.DeactivateAccessKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAccessKeyServiceClient(con).Deactivate(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s accessKeyService) Delete(ctx context.Context, request *v1.DeleteAccessKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAccessKeyServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s accessKeyService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s accessKeyService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AccessKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/auth_public_key_service.sdk.go b/services/nebius/iam/v1/auth_public_key_service.sdk.go new file mode 100644 index 0000000..d782898 --- /dev/null +++ b/services/nebius/iam/v1/auth_public_key_service.sdk.go @@ -0,0 +1,222 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[AuthPublicKeyServiceID] = "cpl.iam" +} + +func (s Services) AuthPublicKey() AuthPublicKeyService { + return NewAuthPublicKeyService(s.sdk) +} + +const AuthPublicKeyServiceID conn.ServiceID = "nebius.iam.v1.AuthPublicKeyService" + +type AuthPublicKeyService interface { + Create(context.Context, *v1.CreateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetAuthPublicKeyRequest, ...grpc.CallOption) (*v1.AuthPublicKey, error) + List(context.Context, *v1.ListAuthPublicKeyRequest, ...grpc.CallOption) (*v1.ListAuthPublicKeyResponse, error) + Filter(context.Context, *v1.ListAuthPublicKeyRequest, ...grpc.CallOption) iter.Seq2[*v1.AuthPublicKey, error] + ListByAccount(context.Context, *v1.ListAuthPublicKeyByAccountRequest, ...grpc.CallOption) (*v1.ListAuthPublicKeyResponse, error) + Update(context.Context, *v1.UpdateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Activate(context.Context, *v1.ActivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Deactivate(context.Context, *v1.DeactivateAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteAuthPublicKeyRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type authPublicKeyService struct { + sdk iface.SDK +} + +func NewAuthPublicKeyService(sdk iface.SDK) AuthPublicKeyService { + return authPublicKeyService{ + sdk: sdk, + } +} + +func (s authPublicKeyService) Create(ctx context.Context, request *v1.CreateAuthPublicKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAuthPublicKeyServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s authPublicKeyService) Get(ctx context.Context, request *v1.GetAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.AuthPublicKey, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAuthPublicKeyServiceClient(con).Get(ctx, request, opts...) +} + +func (s authPublicKeyService) List(ctx context.Context, request *v1.ListAuthPublicKeyRequest, opts ...grpc.CallOption) (*v1.ListAuthPublicKeyResponse, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAuthPublicKeyServiceClient(con).List(ctx, request, opts...) +} + +func (s authPublicKeyService) Filter(ctx context.Context, request *v1.ListAuthPublicKeyRequest, opts ...grpc.CallOption) iter.Seq2[*v1.AuthPublicKey, error] { + req := proto.Clone(request).(*v1.ListAuthPublicKeyRequest) + return func(yield func(*v1.AuthPublicKey, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s authPublicKeyService) ListByAccount(ctx context.Context, request *v1.ListAuthPublicKeyByAccountRequest, opts ...grpc.CallOption) (*v1.ListAuthPublicKeyResponse, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAuthPublicKeyServiceClient(con).ListByAccount(ctx, request, opts...) +} + +func (s authPublicKeyService) Update(ctx context.Context, request *v1.UpdateAuthPublicKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAuthPublicKeyServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s authPublicKeyService) Activate(ctx context.Context, request *v1.ActivateAuthPublicKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAuthPublicKeyServiceClient(con).Activate(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s authPublicKeyService) Deactivate(ctx context.Context, request *v1.DeactivateAuthPublicKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAuthPublicKeyServiceClient(con).Deactivate(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s authPublicKeyService) Delete(ctx context.Context, request *v1.DeleteAuthPublicKeyRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAuthPublicKeyServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s authPublicKeyService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s authPublicKeyService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AuthPublicKeyServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/federation_certificate_service.sdk.go b/services/nebius/iam/v1/federation_certificate_service.sdk.go new file mode 100644 index 0000000..dcd1c99 --- /dev/null +++ b/services/nebius/iam/v1/federation_certificate_service.sdk.go @@ -0,0 +1,147 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[FederationCertificateServiceID] = "cpl.iam" +} + +func (s Services) FederationCertificate() FederationCertificateService { + return NewFederationCertificateService(s.sdk) +} + +const FederationCertificateServiceID conn.ServiceID = "nebius.iam.v1.FederationCertificateService" + +type FederationCertificateService interface { + Create(context.Context, *v1.CreateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetFederationCertificateRequest, ...grpc.CallOption) (*v1.FederationCertificate, error) + ListByFederation(context.Context, *v1.ListFederationCertificateByFederationRequest, ...grpc.CallOption) (*v1.ListFederationCertificateResponse, error) + Update(context.Context, *v1.UpdateFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteFederationCertificateRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type federationCertificateService struct { + sdk iface.SDK +} + +func NewFederationCertificateService(sdk iface.SDK) FederationCertificateService { + return federationCertificateService{ + sdk: sdk, + } +} + +func (s federationCertificateService) Create(ctx context.Context, request *v1.CreateFederationCertificateRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationCertificateServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationCertificateService) Get(ctx context.Context, request *v1.GetFederationCertificateRequest, opts ...grpc.CallOption) (*v1.FederationCertificate, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFederationCertificateServiceClient(con).Get(ctx, request, opts...) +} + +func (s federationCertificateService) ListByFederation(ctx context.Context, request *v1.ListFederationCertificateByFederationRequest, opts ...grpc.CallOption) (*v1.ListFederationCertificateResponse, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFederationCertificateServiceClient(con).ListByFederation(ctx, request, opts...) +} + +func (s federationCertificateService) Update(ctx context.Context, request *v1.UpdateFederationCertificateRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationCertificateServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationCertificateService) Delete(ctx context.Context, request *v1.DeleteFederationCertificateRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationCertificateServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationCertificateService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s federationCertificateService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FederationCertificateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/federation_service.sdk.go b/services/nebius/iam/v1/federation_service.sdk.go new file mode 100644 index 0000000..84a5210 --- /dev/null +++ b/services/nebius/iam/v1/federation_service.sdk.go @@ -0,0 +1,188 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[FederationServiceID] = "cpl.iam" +} + +func (s Services) Federation() FederationService { + return NewFederationService(s.sdk) +} + +const FederationServiceID conn.ServiceID = "nebius.iam.v1.FederationService" + +type FederationService interface { + Create(context.Context, *v1.CreateFederationRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetFederationRequest, ...grpc.CallOption) (*v1.Federation, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Federation, error) + List(context.Context, *v1.ListFederationsRequest, ...grpc.CallOption) (*v1.ListFederationsResponse, error) + Filter(context.Context, *v1.ListFederationsRequest, ...grpc.CallOption) iter.Seq2[*v1.Federation, error] + Update(context.Context, *v1.UpdateFederationRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteFederationRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type federationService struct { + sdk iface.SDK +} + +func NewFederationService(sdk iface.SDK) FederationService { + return federationService{ + sdk: sdk, + } +} + +func (s federationService) Create(ctx context.Context, request *v1.CreateFederationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationService) Get(ctx context.Context, request *v1.GetFederationRequest, opts ...grpc.CallOption) (*v1.Federation, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFederationServiceClient(con).Get(ctx, request, opts...) +} + +func (s federationService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Federation, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFederationServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s federationService) List(ctx context.Context, request *v1.ListFederationsRequest, opts ...grpc.CallOption) (*v1.ListFederationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewFederationServiceClient(con).List(ctx, request, opts...) +} + +func (s federationService) Filter(ctx context.Context, request *v1.ListFederationsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Federation, error] { + req := proto.Clone(request).(*v1.ListFederationsRequest) + return func(yield func(*v1.Federation, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s federationService) Update(ctx context.Context, request *v1.UpdateFederationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationService) Delete(ctx context.Context, request *v1.DeleteFederationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewFederationServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s federationService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s federationService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, FederationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/group_membership_service.sdk.go b/services/nebius/iam/v1/group_membership_service.sdk.go new file mode 100644 index 0000000..63b8a8b --- /dev/null +++ b/services/nebius/iam/v1/group_membership_service.sdk.go @@ -0,0 +1,138 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[GroupMembershipServiceID] = "cpl.iam" +} + +func (s Services) GroupMembership() GroupMembershipService { + return NewGroupMembershipService(s.sdk) +} + +const GroupMembershipServiceID conn.ServiceID = "nebius.iam.v1.GroupMembershipService" + +type GroupMembershipService interface { + Create(context.Context, *v1.CreateGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetGroupMembershipRequest, ...grpc.CallOption) (*v1.GroupMembership, error) + Delete(context.Context, *v1.DeleteGroupMembershipRequest, ...grpc.CallOption) (operations.Operation, error) + ListMembers(context.Context, *v1.ListGroupMembershipsRequest, ...grpc.CallOption) (*v1.ListGroupMembershipsResponse, error) + ListMemberOf(context.Context, *v1.ListMemberOfRequest, ...grpc.CallOption) (*v1.ListMemberOfResponse, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type groupMembershipService struct { + sdk iface.SDK +} + +func NewGroupMembershipService(sdk iface.SDK) GroupMembershipService { + return groupMembershipService{ + sdk: sdk, + } +} + +func (s groupMembershipService) Create(ctx context.Context, request *v1.CreateGroupMembershipRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewGroupMembershipServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s groupMembershipService) Get(ctx context.Context, request *v1.GetGroupMembershipRequest, opts ...grpc.CallOption) (*v1.GroupMembership, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupMembershipServiceClient(con).Get(ctx, request, opts...) +} + +func (s groupMembershipService) Delete(ctx context.Context, request *v1.DeleteGroupMembershipRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewGroupMembershipServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s groupMembershipService) ListMembers(ctx context.Context, request *v1.ListGroupMembershipsRequest, opts ...grpc.CallOption) (*v1.ListGroupMembershipsResponse, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupMembershipServiceClient(con).ListMembers(ctx, request, opts...) +} + +func (s groupMembershipService) ListMemberOf(ctx context.Context, request *v1.ListMemberOfRequest, opts ...grpc.CallOption) (*v1.ListMemberOfResponse, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupMembershipServiceClient(con).ListMemberOf(ctx, request, opts...) +} + +func (s groupMembershipService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s groupMembershipService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, GroupMembershipServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/group_service.sdk.go b/services/nebius/iam/v1/group_service.sdk.go new file mode 100644 index 0000000..e9aea3b --- /dev/null +++ b/services/nebius/iam/v1/group_service.sdk.go @@ -0,0 +1,99 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[GroupServiceID] = "cpl.iam" +} + +func (s Services) Group() GroupService { + return NewGroupService(s.sdk) +} + +const GroupServiceID conn.ServiceID = "nebius.iam.v1.GroupService" + +type GroupService interface { + Get(context.Context, *v1.GetGroupRequest, ...grpc.CallOption) (*v1.Group, error) + GetByName(context.Context, *v1.GetGroupByNameRequest, ...grpc.CallOption) (*v1.Group, error) + List(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) (*v1.ListGroupsResponse, error) + Filter(context.Context, *v1.ListGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1.Group, error] +} + +type groupService struct { + sdk iface.SDK +} + +func NewGroupService(sdk iface.SDK) GroupService { + return groupService{ + sdk: sdk, + } +} + +func (s groupService) Get(ctx context.Context, request *v1.GetGroupRequest, opts ...grpc.CallOption) (*v1.Group, error) { + address, err := s.sdk.Resolve(ctx, GroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupServiceClient(con).Get(ctx, request, opts...) +} + +func (s groupService) GetByName(ctx context.Context, request *v1.GetGroupByNameRequest, opts ...grpc.CallOption) (*v1.Group, error) { + address, err := s.sdk.Resolve(ctx, GroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s groupService) List(ctx context.Context, request *v1.ListGroupsRequest, opts ...grpc.CallOption) (*v1.ListGroupsResponse, error) { + address, err := s.sdk.Resolve(ctx, GroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewGroupServiceClient(con).List(ctx, request, opts...) +} + +func (s groupService) Filter(ctx context.Context, request *v1.ListGroupsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Group, error] { + req := proto.Clone(request).(*v1.ListGroupsRequest) + return func(yield func(*v1.Group, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/iam/v1/identity_service.sdk.go b/services/nebius/iam/v1/identity_service.sdk.go new file mode 100644 index 0000000..fb5fe5f --- /dev/null +++ b/services/nebius/iam/v1/identity_service.sdk.go @@ -0,0 +1,45 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[IdentityServiceID] = "identity.iam" +} + +func (s Services) Identity() IdentityService { + return NewIdentityService(s.sdk) +} + +const IdentityServiceID conn.ServiceID = "nebius.iam.v1.IdentityService" + +type IdentityService interface { + ExchangeToken(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error) +} + +type identityService struct { + sdk iface.SDK +} + +func NewIdentityService(sdk iface.SDK) IdentityService { + return identityService{ + sdk: sdk, + } +} + +func (s identityService) ExchangeToken(ctx context.Context, request *v1.ExchangeTokenRequest, opts ...grpc.CallOption) (*v1.CreateTokenResponse, error) { + address, err := s.sdk.Resolve(ctx, IdentityServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewIdentityServiceClient(con).ExchangeToken(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/invitation_service.sdk.go b/services/nebius/iam/v1/invitation_service.sdk.go new file mode 100644 index 0000000..9b88c60 --- /dev/null +++ b/services/nebius/iam/v1/invitation_service.sdk.go @@ -0,0 +1,192 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[InvitationServiceID] = "cpl.iam" +} + +func (s Services) Invitation() InvitationService { + return NewInvitationService(s.sdk) +} + +const InvitationServiceID conn.ServiceID = "nebius.iam.v1.InvitationService" + +type InvitationService interface { + Create(context.Context, *v1.CreateInvitationRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetInvitationRequest, ...grpc.CallOption) (*v1.Invitation, error) + List(context.Context, *v1.ListInvitationsRequest, ...grpc.CallOption) (*v1.ListInvitationsResponse, error) + Filter(context.Context, *v1.ListInvitationsRequest, ...grpc.CallOption) iter.Seq2[*v1.Invitation, error] + Delete(context.Context, *v1.DeleteInvitationRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateInvitationRequest, ...grpc.CallOption) (operations.Operation, error) + Resend(context.Context, *v1.ResendInvitationRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type invitationService struct { + sdk iface.SDK +} + +func NewInvitationService(sdk iface.SDK) InvitationService { + return invitationService{ + sdk: sdk, + } +} + +func (s invitationService) Create(ctx context.Context, request *v1.CreateInvitationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInvitationServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s invitationService) Get(ctx context.Context, request *v1.GetInvitationRequest, opts ...grpc.CallOption) (*v1.Invitation, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInvitationServiceClient(con).Get(ctx, request, opts...) +} + +func (s invitationService) List(ctx context.Context, request *v1.ListInvitationsRequest, opts ...grpc.CallOption) (*v1.ListInvitationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewInvitationServiceClient(con).List(ctx, request, opts...) +} + +func (s invitationService) Filter(ctx context.Context, request *v1.ListInvitationsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Invitation, error] { + req := proto.Clone(request).(*v1.ListInvitationsRequest) + return func(yield func(*v1.Invitation, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s invitationService) Delete(ctx context.Context, request *v1.DeleteInvitationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInvitationServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s invitationService) Update(ctx context.Context, request *v1.UpdateInvitationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInvitationServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s invitationService) Resend(ctx context.Context, request *v1.ResendInvitationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewInvitationServiceClient(con).Resend(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s invitationService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s invitationService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, InvitationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/profile_service.sdk.go b/services/nebius/iam/v1/profile_service.sdk.go new file mode 100644 index 0000000..188fe94 --- /dev/null +++ b/services/nebius/iam/v1/profile_service.sdk.go @@ -0,0 +1,45 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ProfileServiceID] = "cpl.iam" +} + +func (s Services) Profile() ProfileService { + return NewProfileService(s.sdk) +} + +const ProfileServiceID conn.ServiceID = "nebius.iam.v1.ProfileService" + +type ProfileService interface { + Get(context.Context, *v1.GetProfileRequest, ...grpc.CallOption) (*v1.GetProfileResponse, error) +} + +type profileService struct { + sdk iface.SDK +} + +func NewProfileService(sdk iface.SDK) ProfileService { + return profileService{ + sdk: sdk, + } +} + +func (s profileService) Get(ctx context.Context, request *v1.GetProfileRequest, opts ...grpc.CallOption) (*v1.GetProfileResponse, error) { + address, err := s.sdk.Resolve(ctx, ProfileServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewProfileServiceClient(con).Get(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/project_service.sdk.go b/services/nebius/iam/v1/project_service.sdk.go new file mode 100644 index 0000000..d05b4c3 --- /dev/null +++ b/services/nebius/iam/v1/project_service.sdk.go @@ -0,0 +1,99 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ProjectServiceID] = "cpl.iam" +} + +func (s Services) Project() ProjectService { + return NewProjectService(s.sdk) +} + +const ProjectServiceID conn.ServiceID = "nebius.iam.v1.ProjectService" + +type ProjectService interface { + Get(context.Context, *v1.GetProjectRequest, ...grpc.CallOption) (*v1.Container, error) + GetByName(context.Context, *v1.GetProjectByNameRequest, ...grpc.CallOption) (*v1.Container, error) + List(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) (*v1.ListProjectsResponse, error) + Filter(context.Context, *v1.ListProjectsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error] +} + +type projectService struct { + sdk iface.SDK +} + +func NewProjectService(sdk iface.SDK) ProjectService { + return projectService{ + sdk: sdk, + } +} + +func (s projectService) Get(ctx context.Context, request *v1.GetProjectRequest, opts ...grpc.CallOption) (*v1.Container, error) { + address, err := s.sdk.Resolve(ctx, ProjectServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewProjectServiceClient(con).Get(ctx, request, opts...) +} + +func (s projectService) GetByName(ctx context.Context, request *v1.GetProjectByNameRequest, opts ...grpc.CallOption) (*v1.Container, error) { + address, err := s.sdk.Resolve(ctx, ProjectServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewProjectServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s projectService) List(ctx context.Context, request *v1.ListProjectsRequest, opts ...grpc.CallOption) (*v1.ListProjectsResponse, error) { + address, err := s.sdk.Resolve(ctx, ProjectServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewProjectServiceClient(con).List(ctx, request, opts...) +} + +func (s projectService) Filter(ctx context.Context, request *v1.ListProjectsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Container, error] { + req := proto.Clone(request).(*v1.ListProjectsRequest) + return func(yield func(*v1.Container, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/iam/v1/sdk.go b/services/nebius/iam/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/iam/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/iam/v1/service_account_service.sdk.go b/services/nebius/iam/v1/service_account_service.sdk.go new file mode 100644 index 0000000..eb4a05e --- /dev/null +++ b/services/nebius/iam/v1/service_account_service.sdk.go @@ -0,0 +1,188 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ServiceAccountServiceID] = "cpl.iam" +} + +func (s Services) ServiceAccount() ServiceAccountService { + return NewServiceAccountService(s.sdk) +} + +const ServiceAccountServiceID conn.ServiceID = "nebius.iam.v1.ServiceAccountService" + +type ServiceAccountService interface { + Create(context.Context, *v1.CreateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error) + Get(context.Context, *v1.GetServiceAccountRequest, ...grpc.CallOption) (*v1.ServiceAccount, error) + GetByName(context.Context, *v1.GetServiceAccountByNameRequest, ...grpc.CallOption) (*v1.ServiceAccount, error) + List(context.Context, *v1.ListServiceAccountRequest, ...grpc.CallOption) (*v1.ListServiceAccountResponse, error) + Filter(context.Context, *v1.ListServiceAccountRequest, ...grpc.CallOption) iter.Seq2[*v1.ServiceAccount, error] + Update(context.Context, *v1.UpdateServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteServiceAccountRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type serviceAccountService struct { + sdk iface.SDK +} + +func NewServiceAccountService(sdk iface.SDK) ServiceAccountService { + return serviceAccountService{ + sdk: sdk, + } +} + +func (s serviceAccountService) Create(ctx context.Context, request *v1.CreateServiceAccountRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewServiceAccountServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s serviceAccountService) Get(ctx context.Context, request *v1.GetServiceAccountRequest, opts ...grpc.CallOption) (*v1.ServiceAccount, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewServiceAccountServiceClient(con).Get(ctx, request, opts...) +} + +func (s serviceAccountService) GetByName(ctx context.Context, request *v1.GetServiceAccountByNameRequest, opts ...grpc.CallOption) (*v1.ServiceAccount, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewServiceAccountServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s serviceAccountService) List(ctx context.Context, request *v1.ListServiceAccountRequest, opts ...grpc.CallOption) (*v1.ListServiceAccountResponse, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewServiceAccountServiceClient(con).List(ctx, request, opts...) +} + +func (s serviceAccountService) Filter(ctx context.Context, request *v1.ListServiceAccountRequest, opts ...grpc.CallOption) iter.Seq2[*v1.ServiceAccount, error] { + req := proto.Clone(request).(*v1.ListServiceAccountRequest) + return func(yield func(*v1.ServiceAccount, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s serviceAccountService) Update(ctx context.Context, request *v1.UpdateServiceAccountRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewServiceAccountServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s serviceAccountService) Delete(ctx context.Context, request *v1.DeleteServiceAccountRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewServiceAccountServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s serviceAccountService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s serviceAccountService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ServiceAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/session_management_service.sdk.go b/services/nebius/iam/v1/session_management_service.sdk.go new file mode 100644 index 0000000..36cfa2c --- /dev/null +++ b/services/nebius/iam/v1/session_management_service.sdk.go @@ -0,0 +1,45 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[SessionManagementServiceID] = "cpl.iam" +} + +func (s Services) SessionManagement() SessionManagementService { + return NewSessionManagementService(s.sdk) +} + +const SessionManagementServiceID conn.ServiceID = "nebius.iam.v1.SessionManagementService" + +type SessionManagementService interface { + Revoke(context.Context, *v1.RevokeSessionRequest, ...grpc.CallOption) (*v1.RevokeSessionResponse, error) +} + +type sessionManagementService struct { + sdk iface.SDK +} + +func NewSessionManagementService(sdk iface.SDK) SessionManagementService { + return sessionManagementService{ + sdk: sdk, + } +} + +func (s sessionManagementService) Revoke(ctx context.Context, request *v1.RevokeSessionRequest, opts ...grpc.CallOption) (*v1.RevokeSessionResponse, error) { + address, err := s.sdk.Resolve(ctx, SessionManagementServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewSessionManagementServiceClient(con).Revoke(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/tenant_service.sdk.go b/services/nebius/iam/v1/tenant_service.sdk.go new file mode 100644 index 0000000..07013b1 --- /dev/null +++ b/services/nebius/iam/v1/tenant_service.sdk.go @@ -0,0 +1,86 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[TenantServiceID] = "cpl.iam" +} + +func (s Services) Tenant() TenantService { + return NewTenantService(s.sdk) +} + +const TenantServiceID conn.ServiceID = "nebius.iam.v1.TenantService" + +type TenantService interface { + Get(context.Context, *v1.GetTenantRequest, ...grpc.CallOption) (*v1.Container, error) + List(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) (*v1.ListTenantsResponse, error) + Filter(context.Context, *v1.ListTenantsRequest, ...grpc.CallOption) iter.Seq2[*v1.Container, error] +} + +type tenantService struct { + sdk iface.SDK +} + +func NewTenantService(sdk iface.SDK) TenantService { + return tenantService{ + sdk: sdk, + } +} + +func (s tenantService) Get(ctx context.Context, request *v1.GetTenantRequest, opts ...grpc.CallOption) (*v1.Container, error) { + address, err := s.sdk.Resolve(ctx, TenantServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantServiceClient(con).Get(ctx, request, opts...) +} + +func (s tenantService) List(ctx context.Context, request *v1.ListTenantsRequest, opts ...grpc.CallOption) (*v1.ListTenantsResponse, error) { + address, err := s.sdk.Resolve(ctx, TenantServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantServiceClient(con).List(ctx, request, opts...) +} + +func (s tenantService) Filter(ctx context.Context, request *v1.ListTenantsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Container, error] { + req := proto.Clone(request).(*v1.ListTenantsRequest) + return func(yield func(*v1.Container, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/iam/v1/tenant_user_account_service.sdk.go b/services/nebius/iam/v1/tenant_user_account_service.sdk.go new file mode 100644 index 0000000..ac517dd --- /dev/null +++ b/services/nebius/iam/v1/tenant_user_account_service.sdk.go @@ -0,0 +1,153 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[TenantUserAccountServiceID] = "cpl.iam" +} + +func (s Services) TenantUserAccount() TenantUserAccountService { + return NewTenantUserAccountService(s.sdk) +} + +const TenantUserAccountServiceID conn.ServiceID = "nebius.iam.v1.TenantUserAccountService" + +type TenantUserAccountService interface { + Get(context.Context, *v1.GetTenantUserAccountRequest, ...grpc.CallOption) (*v1.TenantUserAccount, error) + List(context.Context, *v1.ListTenantUserAccountsRequest, ...grpc.CallOption) (*v1.ListTenantUserAccountsResponse, error) + Filter(context.Context, *v1.ListTenantUserAccountsRequest, ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccount, error] + Block(context.Context, *v1.BlockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error) + Unblock(context.Context, *v1.UnblockTenantUserAccountRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type tenantUserAccountService struct { + sdk iface.SDK +} + +func NewTenantUserAccountService(sdk iface.SDK) TenantUserAccountService { + return tenantUserAccountService{ + sdk: sdk, + } +} + +func (s tenantUserAccountService) Get(ctx context.Context, request *v1.GetTenantUserAccountRequest, opts ...grpc.CallOption) (*v1.TenantUserAccount, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantUserAccountServiceClient(con).Get(ctx, request, opts...) +} + +func (s tenantUserAccountService) List(ctx context.Context, request *v1.ListTenantUserAccountsRequest, opts ...grpc.CallOption) (*v1.ListTenantUserAccountsResponse, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantUserAccountServiceClient(con).List(ctx, request, opts...) +} + +func (s tenantUserAccountService) Filter(ctx context.Context, request *v1.ListTenantUserAccountsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccount, error] { + req := proto.Clone(request).(*v1.ListTenantUserAccountsRequest) + return func(yield func(*v1.TenantUserAccount, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s tenantUserAccountService) Block(ctx context.Context, request *v1.BlockTenantUserAccountRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewTenantUserAccountServiceClient(con).Block(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s tenantUserAccountService) Unblock(ctx context.Context, request *v1.UnblockTenantUserAccountRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewTenantUserAccountServiceClient(con).Unblock(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s tenantUserAccountService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s tenantUserAccountService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/iam/v1/tenant_user_account_with_attributes_service.sdk.go b/services/nebius/iam/v1/tenant_user_account_with_attributes_service.sdk.go new file mode 100644 index 0000000..79151d8 --- /dev/null +++ b/services/nebius/iam/v1/tenant_user_account_with_attributes_service.sdk.go @@ -0,0 +1,86 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[TenantUserAccountWithAttributesServiceID] = "cpl.iam" +} + +func (s Services) TenantUserAccountWithAttributes() TenantUserAccountWithAttributesService { + return NewTenantUserAccountWithAttributesService(s.sdk) +} + +const TenantUserAccountWithAttributesServiceID conn.ServiceID = "nebius.iam.v1.TenantUserAccountWithAttributesService" + +type TenantUserAccountWithAttributesService interface { + Get(context.Context, *v1.GetTenantUserAccountWithAttributesRequest, ...grpc.CallOption) (*v1.TenantUserAccountWithAttributes, error) + List(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) (*v1.ListTenantUserAccountsWithAttributesResponse, error) + Filter(context.Context, *v1.ListTenantUserAccountsWithAttributesRequest, ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccountWithAttributes, error] +} + +type tenantUserAccountWithAttributesService struct { + sdk iface.SDK +} + +func NewTenantUserAccountWithAttributesService(sdk iface.SDK) TenantUserAccountWithAttributesService { + return tenantUserAccountWithAttributesService{ + sdk: sdk, + } +} + +func (s tenantUserAccountWithAttributesService) Get(ctx context.Context, request *v1.GetTenantUserAccountWithAttributesRequest, opts ...grpc.CallOption) (*v1.TenantUserAccountWithAttributes, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountWithAttributesServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantUserAccountWithAttributesServiceClient(con).Get(ctx, request, opts...) +} + +func (s tenantUserAccountWithAttributesService) List(ctx context.Context, request *v1.ListTenantUserAccountsWithAttributesRequest, opts ...grpc.CallOption) (*v1.ListTenantUserAccountsWithAttributesResponse, error) { + address, err := s.sdk.Resolve(ctx, TenantUserAccountWithAttributesServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTenantUserAccountWithAttributesServiceClient(con).List(ctx, request, opts...) +} + +func (s tenantUserAccountWithAttributesService) Filter(ctx context.Context, request *v1.ListTenantUserAccountsWithAttributesRequest, opts ...grpc.CallOption) iter.Seq2[*v1.TenantUserAccountWithAttributes, error] { + req := proto.Clone(request).(*v1.ListTenantUserAccountsWithAttributesRequest) + return func(yield func(*v1.TenantUserAccountWithAttributes, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/iam/v1/token_exchange_service.sdk.go b/services/nebius/iam/v1/token_exchange_service.sdk.go new file mode 100644 index 0000000..ac39c1e --- /dev/null +++ b/services/nebius/iam/v1/token_exchange_service.sdk.go @@ -0,0 +1,45 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + v1 "github.com/nebius/gosdk/proto/nebius/iam/v1" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[TokenExchangeServiceID] = "tokens.iam" +} + +func (s Services) TokenExchange() TokenExchangeService { + return NewTokenExchangeService(s.sdk) +} + +const TokenExchangeServiceID conn.ServiceID = "nebius.iam.v1.TokenExchangeService" + +type TokenExchangeService interface { + Exchange(context.Context, *v1.ExchangeTokenRequest, ...grpc.CallOption) (*v1.CreateTokenResponse, error) +} + +type tokenExchangeService struct { + sdk iface.SDK +} + +func NewTokenExchangeService(sdk iface.SDK) TokenExchangeService { + return tokenExchangeService{ + sdk: sdk, + } +} + +func (s tokenExchangeService) Exchange(ctx context.Context, request *v1.ExchangeTokenRequest, opts ...grpc.CallOption) (*v1.CreateTokenResponse, error) { + address, err := s.sdk.Resolve(ctx, TokenExchangeServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewTokenExchangeServiceClient(con).Exchange(ctx, request, opts...) +} diff --git a/services/nebius/logging.go b/services/nebius/logging.go new file mode 100644 index 0000000..cece159 --- /dev/null +++ b/services/nebius/logging.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/logging" + +func (s Services) Logging() logging.Services { + return logging.New(s.sdk) +} diff --git a/services/nebius/logging/sdk.go b/services/nebius/logging/sdk.go new file mode 100644 index 0000000..17ee866 --- /dev/null +++ b/services/nebius/logging/sdk.go @@ -0,0 +1,15 @@ +package logging + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/logging/v1.go b/services/nebius/logging/v1.go new file mode 100644 index 0000000..8235a20 --- /dev/null +++ b/services/nebius/logging/v1.go @@ -0,0 +1,7 @@ +package logging + +import "github.com/nebius/gosdk/services/nebius/logging/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/logging/v1/agentmanager.go b/services/nebius/logging/v1/agentmanager.go new file mode 100644 index 0000000..1153ed3 --- /dev/null +++ b/services/nebius/logging/v1/agentmanager.go @@ -0,0 +1,7 @@ +package v1 + +import "github.com/nebius/gosdk/services/nebius/logging/v1/agentmanager" + +func (s Services) AgentManager() agentmanager.Services { + return agentmanager.New(s.sdk) +} diff --git a/services/nebius/logging/v1/agentmanager/sdk.go b/services/nebius/logging/v1/agentmanager/sdk.go new file mode 100644 index 0000000..2a56e3c --- /dev/null +++ b/services/nebius/logging/v1/agentmanager/sdk.go @@ -0,0 +1,15 @@ +package agentmanager + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/logging/v1/agentmanager/version_service.sdk.go b/services/nebius/logging/v1/agentmanager/version_service.sdk.go new file mode 100644 index 0000000..c99bf04 --- /dev/null +++ b/services/nebius/logging/v1/agentmanager/version_service.sdk.go @@ -0,0 +1,45 @@ +package agentmanager + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + agentmanager "github.com/nebius/gosdk/proto/nebius/logging/v1/agentmanager" + grpc "google.golang.org/grpc" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[VersionServiceID] = "observability-agent-manager" +} + +func (s Services) Version() VersionService { + return NewVersionService(s.sdk) +} + +const VersionServiceID conn.ServiceID = "nebius.logging.agentmanager.v1.VersionService" + +type VersionService interface { + GetVersion(context.Context, *agentmanager.GetVersionRequest, ...grpc.CallOption) (*agentmanager.GetVersionResponse, error) +} + +type versionService struct { + sdk iface.SDK +} + +func NewVersionService(sdk iface.SDK) VersionService { + return versionService{ + sdk: sdk, + } +} + +func (s versionService) GetVersion(ctx context.Context, request *agentmanager.GetVersionRequest, opts ...grpc.CallOption) (*agentmanager.GetVersionResponse, error) { + address, err := s.sdk.Resolve(ctx, VersionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return agentmanager.NewVersionServiceClient(con).GetVersion(ctx, request, opts...) +} diff --git a/services/nebius/logging/v1/sdk.go b/services/nebius/logging/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/logging/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/mk8s.go b/services/nebius/mk8s.go new file mode 100644 index 0000000..c35e012 --- /dev/null +++ b/services/nebius/mk8s.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/mk8s" + +func (s Services) MK8S() mk8s.Services { + return mk8s.New(s.sdk) +} diff --git a/services/nebius/mk8s/sdk.go b/services/nebius/mk8s/sdk.go new file mode 100644 index 0000000..8c43aa4 --- /dev/null +++ b/services/nebius/mk8s/sdk.go @@ -0,0 +1,15 @@ +package mk8s + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/mk8s/v1.go b/services/nebius/mk8s/v1.go new file mode 100644 index 0000000..8a1ad35 --- /dev/null +++ b/services/nebius/mk8s/v1.go @@ -0,0 +1,7 @@ +package mk8s + +import "github.com/nebius/gosdk/services/nebius/mk8s/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/mk8s/v1/cluster_service.sdk.go b/services/nebius/mk8s/v1/cluster_service.sdk.go new file mode 100644 index 0000000..f2b2999 --- /dev/null +++ b/services/nebius/mk8s/v1/cluster_service.sdk.go @@ -0,0 +1,184 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/mk8s/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Cluster() ClusterService { + return NewClusterService(s.sdk) +} + +const ClusterServiceID conn.ServiceID = "nebius.mk8s.v1.ClusterService" + +type ClusterService interface { + Get(context.Context, *v1.GetClusterRequest, ...grpc.CallOption) (*v1.Cluster, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.Cluster, error) + List(context.Context, *v1.ListClustersRequest, ...grpc.CallOption) (*v1.ListClustersResponse, error) + Filter(context.Context, *v1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1.Cluster, error] + Create(context.Context, *v1.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type clusterService struct { + sdk iface.SDK +} + +func NewClusterService(sdk iface.SDK) ClusterService { + return clusterService{ + sdk: sdk, + } +} + +func (s clusterService) Get(ctx context.Context, request *v1.GetClusterRequest, opts ...grpc.CallOption) (*v1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s clusterService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s clusterService) List(ctx context.Context, request *v1.ListClustersRequest, opts ...grpc.CallOption) (*v1.ListClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s clusterService) Filter(ctx context.Context, request *v1.ListClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Cluster, error] { + req := proto.Clone(request).(*v1.ListClustersRequest) + return func(yield func(*v1.Cluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s clusterService) Create(ctx context.Context, request *v1.CreateClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s clusterService) Update(ctx context.Context, request *v1.UpdateClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s clusterService) Delete(ctx context.Context, request *v1.DeleteClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s clusterService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s clusterService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/mk8s/v1/node_group_service.sdk.go b/services/nebius/mk8s/v1/node_group_service.sdk.go new file mode 100644 index 0000000..d14b26a --- /dev/null +++ b/services/nebius/mk8s/v1/node_group_service.sdk.go @@ -0,0 +1,201 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/mk8s/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) NodeGroup() NodeGroupService { + return NewNodeGroupService(s.sdk) +} + +const NodeGroupServiceID conn.ServiceID = "nebius.mk8s.v1.NodeGroupService" + +type NodeGroupService interface { + Get(context.Context, *v1.GetNodeGroupRequest, ...grpc.CallOption) (*v1.NodeGroup, error) + GetByName(context.Context, *v11.GetByNameRequest, ...grpc.CallOption) (*v1.NodeGroup, error) + List(context.Context, *v1.ListNodeGroupsRequest, ...grpc.CallOption) (*v1.ListNodeGroupsResponse, error) + Filter(context.Context, *v1.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1.NodeGroup, error] + Create(context.Context, *v1.CreateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error) + Upgrade(context.Context, *v1.UpgradeNodeGroupRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type nodeGroupService struct { + sdk iface.SDK +} + +func NewNodeGroupService(sdk iface.SDK) NodeGroupService { + return nodeGroupService{ + sdk: sdk, + } +} + +func (s nodeGroupService) Get(ctx context.Context, request *v1.GetNodeGroupRequest, opts ...grpc.CallOption) (*v1.NodeGroup, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNodeGroupServiceClient(con).Get(ctx, request, opts...) +} + +func (s nodeGroupService) GetByName(ctx context.Context, request *v11.GetByNameRequest, opts ...grpc.CallOption) (*v1.NodeGroup, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNodeGroupServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s nodeGroupService) List(ctx context.Context, request *v1.ListNodeGroupsRequest, opts ...grpc.CallOption) (*v1.ListNodeGroupsResponse, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNodeGroupServiceClient(con).List(ctx, request, opts...) +} + +func (s nodeGroupService) Filter(ctx context.Context, request *v1.ListNodeGroupsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.NodeGroup, error] { + req := proto.Clone(request).(*v1.ListNodeGroupsRequest) + return func(yield func(*v1.NodeGroup, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s nodeGroupService) Create(ctx context.Context, request *v1.CreateNodeGroupRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewNodeGroupServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Update(ctx context.Context, request *v1.UpdateNodeGroupRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewNodeGroupServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Delete(ctx context.Context, request *v1.DeleteNodeGroupRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewNodeGroupServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Upgrade(ctx context.Context, request *v1.UpgradeNodeGroupRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewNodeGroupServiceClient(con).Upgrade(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s nodeGroupService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/mk8s/v1/sdk.go b/services/nebius/mk8s/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/mk8s/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/mk8s/v1alpha1.go b/services/nebius/mk8s/v1alpha1.go new file mode 100644 index 0000000..8f074f4 --- /dev/null +++ b/services/nebius/mk8s/v1alpha1.go @@ -0,0 +1,7 @@ +package mk8s + +import "github.com/nebius/gosdk/services/nebius/mk8s/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/mk8s/v1alpha1/cluster_service.sdk.go b/services/nebius/mk8s/v1alpha1/cluster_service.sdk.go new file mode 100644 index 0000000..50e587d --- /dev/null +++ b/services/nebius/mk8s/v1alpha1/cluster_service.sdk.go @@ -0,0 +1,184 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/mk8s/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Cluster() ClusterService { + return NewClusterService(s.sdk) +} + +const ClusterServiceID conn.ServiceID = "nebius.mk8s.v1alpha1.ClusterService" + +type ClusterService interface { + Get(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + GetByName(context.Context, *v1alpha1.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + List(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) + Filter(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] + Create(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type clusterService struct { + sdk iface.SDK +} + +func NewClusterService(sdk iface.SDK) ClusterService { + return clusterService{ + sdk: sdk, + } +} + +func (s clusterService) Get(ctx context.Context, request *v1alpha1.GetClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s clusterService) GetByName(ctx context.Context, request *v1alpha1.GetClusterByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s clusterService) List(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s clusterService) Filter(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] { + req := proto.Clone(request).(*v1alpha1.ListClustersRequest) + return func(yield func(*v1alpha1.Cluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s clusterService) Create(ctx context.Context, request *v1alpha1.CreateClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) Update(ctx context.Context, request *v1alpha1.UpdateClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) Delete(ctx context.Context, request *v1alpha1.DeleteClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s clusterService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/mk8s/v1alpha1/node_group_service.sdk.go b/services/nebius/mk8s/v1alpha1/node_group_service.sdk.go new file mode 100644 index 0000000..839538f --- /dev/null +++ b/services/nebius/mk8s/v1alpha1/node_group_service.sdk.go @@ -0,0 +1,201 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/mk8s/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) NodeGroup() NodeGroupService { + return NewNodeGroupService(s.sdk) +} + +const NodeGroupServiceID conn.ServiceID = "nebius.mk8s.v1alpha1.NodeGroupService" + +type NodeGroupService interface { + Get(context.Context, *v1alpha1.GetNodeGroupRequest, ...grpc.CallOption) (*v1alpha1.NodeGroup, error) + GetByName(context.Context, *v1alpha1.GetNodeGroupByNameRequest, ...grpc.CallOption) (*v1alpha1.NodeGroup, error) + List(context.Context, *v1alpha1.ListNodeGroupsRequest, ...grpc.CallOption) (*v1alpha1.ListNodeGroupsResponse, error) + Filter(context.Context, *v1alpha1.ListNodeGroupsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.NodeGroup, error] + Create(context.Context, *v1alpha1.CreateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Upgrade(context.Context, *v1alpha1.UpgradeNodeGroupRequest, ...grpc.CallOption) (*alphaops.Operation, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type nodeGroupService struct { + sdk iface.SDK +} + +func NewNodeGroupService(sdk iface.SDK) NodeGroupService { + return nodeGroupService{ + sdk: sdk, + } +} + +func (s nodeGroupService) Get(ctx context.Context, request *v1alpha1.GetNodeGroupRequest, opts ...grpc.CallOption) (*v1alpha1.NodeGroup, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNodeGroupServiceClient(con).Get(ctx, request, opts...) +} + +func (s nodeGroupService) GetByName(ctx context.Context, request *v1alpha1.GetNodeGroupByNameRequest, opts ...grpc.CallOption) (*v1alpha1.NodeGroup, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNodeGroupServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s nodeGroupService) List(ctx context.Context, request *v1alpha1.ListNodeGroupsRequest, opts ...grpc.CallOption) (*v1alpha1.ListNodeGroupsResponse, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNodeGroupServiceClient(con).List(ctx, request, opts...) +} + +func (s nodeGroupService) Filter(ctx context.Context, request *v1alpha1.ListNodeGroupsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.NodeGroup, error] { + req := proto.Clone(request).(*v1alpha1.ListNodeGroupsRequest) + return func(yield func(*v1alpha1.NodeGroup, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s nodeGroupService) Create(ctx context.Context, request *v1alpha1.CreateNodeGroupRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewNodeGroupServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Update(ctx context.Context, request *v1alpha1.UpdateNodeGroupRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewNodeGroupServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Delete(ctx context.Context, request *v1alpha1.DeleteNodeGroupRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewNodeGroupServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) Upgrade(ctx context.Context, request *v1alpha1.UpgradeNodeGroupRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewNodeGroupServiceClient(con).Upgrade(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s nodeGroupService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s nodeGroupService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, NodeGroupServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/mk8s/v1alpha1/sdk.go b/services/nebius/mk8s/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/mk8s/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp.go b/services/nebius/msp.go new file mode 100644 index 0000000..204d212 --- /dev/null +++ b/services/nebius/msp.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/msp" + +func (s Services) MSP() msp.Services { + return msp.New(s.sdk) +} diff --git a/services/nebius/msp/mlflow.go b/services/nebius/msp/mlflow.go new file mode 100644 index 0000000..2c6eb01 --- /dev/null +++ b/services/nebius/msp/mlflow.go @@ -0,0 +1,7 @@ +package msp + +import "github.com/nebius/gosdk/services/nebius/msp/mlflow" + +func (s Services) MLFlow() mlflow.Services { + return mlflow.New(s.sdk) +} diff --git a/services/nebius/msp/mlflow/sdk.go b/services/nebius/msp/mlflow/sdk.go new file mode 100644 index 0000000..765d06e --- /dev/null +++ b/services/nebius/msp/mlflow/sdk.go @@ -0,0 +1,15 @@ +package mlflow + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/mlflow/v1alpha1.go b/services/nebius/msp/mlflow/v1alpha1.go new file mode 100644 index 0000000..91da7ba --- /dev/null +++ b/services/nebius/msp/mlflow/v1alpha1.go @@ -0,0 +1,7 @@ +package mlflow + +import "github.com/nebius/gosdk/services/nebius/msp/mlflow/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/msp/mlflow/v1alpha1/cluster_service.sdk.go b/services/nebius/msp/mlflow/v1alpha1/cluster_service.sdk.go new file mode 100644 index 0000000..5a0e18c --- /dev/null +++ b/services/nebius/msp/mlflow/v1alpha1/cluster_service.sdk.go @@ -0,0 +1,166 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/mlflow/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ClusterServiceID] = "mlflow.msp" +} + +func (s Services) Cluster() ClusterService { + return NewClusterService(s.sdk) +} + +const ClusterServiceID conn.ServiceID = "nebius.msp.mlflow.v1alpha1.ClusterService" + +type ClusterService interface { + Get(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + GetByName(context.Context, *v1alpha1.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + List(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) + Filter(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] + Create(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type clusterService struct { + sdk iface.SDK +} + +func NewClusterService(sdk iface.SDK) ClusterService { + return clusterService{ + sdk: sdk, + } +} + +func (s clusterService) Get(ctx context.Context, request *v1alpha1.GetClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s clusterService) GetByName(ctx context.Context, request *v1alpha1.GetClusterByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s clusterService) List(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s clusterService) Filter(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] { + req := proto.Clone(request).(*v1alpha1.ListClustersRequest) + return func(yield func(*v1alpha1.Cluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s clusterService) Create(ctx context.Context, request *v1alpha1.CreateClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) Delete(ctx context.Context, request *v1alpha1.DeleteClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s clusterService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/msp/mlflow/v1alpha1/sdk.go b/services/nebius/msp/mlflow/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/msp/mlflow/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/postgresql.go b/services/nebius/msp/postgresql.go new file mode 100644 index 0000000..b5ed925 --- /dev/null +++ b/services/nebius/msp/postgresql.go @@ -0,0 +1,7 @@ +package msp + +import "github.com/nebius/gosdk/services/nebius/msp/postgresql" + +func (s Services) PostgreSQL() postgresql.Services { + return postgresql.New(s.sdk) +} diff --git a/services/nebius/msp/postgresql/sdk.go b/services/nebius/msp/postgresql/sdk.go new file mode 100644 index 0000000..4597597 --- /dev/null +++ b/services/nebius/msp/postgresql/sdk.go @@ -0,0 +1,15 @@ +package postgresql + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/postgresql/v1alpha1.go b/services/nebius/msp/postgresql/v1alpha1.go new file mode 100644 index 0000000..4ad2f2d --- /dev/null +++ b/services/nebius/msp/postgresql/v1alpha1.go @@ -0,0 +1,7 @@ +package postgresql + +import "github.com/nebius/gosdk/services/nebius/msp/postgresql/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/msp/postgresql/v1alpha1/cluster_service.sdk.go b/services/nebius/msp/postgresql/v1alpha1/cluster_service.sdk.go new file mode 100644 index 0000000..b70ed3b --- /dev/null +++ b/services/nebius/msp/postgresql/v1alpha1/cluster_service.sdk.go @@ -0,0 +1,189 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/postgresql/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ClusterServiceID] = "postgresql.msp" +} + +func (s Services) Cluster() ClusterService { + return NewClusterService(s.sdk) +} + +const ClusterServiceID conn.ServiceID = "nebius.msp.postgresql.v1alpha1.ClusterService" + +type ClusterService interface { + Get(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + GetByName(context.Context, *v1.GetByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + List(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) + Filter(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] + Create(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateClusterRequest, ...grpc.CallOption) (*alphaops.Operation, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type clusterService struct { + sdk iface.SDK +} + +func NewClusterService(sdk iface.SDK) ClusterService { + return clusterService{ + sdk: sdk, + } +} + +func (s clusterService) Get(ctx context.Context, request *v1alpha1.GetClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s clusterService) GetByName(ctx context.Context, request *v1.GetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s clusterService) List(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s clusterService) Filter(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] { + req := proto.Clone(request).(*v1alpha1.ListClustersRequest) + return func(yield func(*v1alpha1.Cluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetClusters() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s clusterService) Create(ctx context.Context, request *v1alpha1.CreateClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) Delete(ctx context.Context, request *v1alpha1.DeleteClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) Update(ctx context.Context, request *v1alpha1.UpdateClusterRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s clusterService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s clusterService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/msp/postgresql/v1alpha1/sdk.go b/services/nebius/msp/postgresql/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/msp/postgresql/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/sdk.go b/services/nebius/msp/sdk.go new file mode 100644 index 0000000..e2b360f --- /dev/null +++ b/services/nebius/msp/sdk.go @@ -0,0 +1,15 @@ +package msp + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/spark.go b/services/nebius/msp/spark.go new file mode 100644 index 0000000..5c8a239 --- /dev/null +++ b/services/nebius/msp/spark.go @@ -0,0 +1,7 @@ +package msp + +import "github.com/nebius/gosdk/services/nebius/msp/spark" + +func (s Services) Spark() spark.Services { + return spark.New(s.sdk) +} diff --git a/services/nebius/msp/spark/sdk.go b/services/nebius/msp/spark/sdk.go new file mode 100644 index 0000000..0d846f7 --- /dev/null +++ b/services/nebius/msp/spark/sdk.go @@ -0,0 +1,15 @@ +package spark + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/spark/v1alpha1.go b/services/nebius/msp/spark/v1alpha1.go new file mode 100644 index 0000000..34a32f6 --- /dev/null +++ b/services/nebius/msp/spark/v1alpha1.go @@ -0,0 +1,7 @@ +package spark + +import "github.com/nebius/gosdk/services/nebius/msp/spark/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/msp/spark/v1alpha1/cluster_service.sdk.go b/services/nebius/msp/spark/v1alpha1/cluster_service.sdk.go new file mode 100644 index 0000000..97c4f12 --- /dev/null +++ b/services/nebius/msp/spark/v1alpha1/cluster_service.sdk.go @@ -0,0 +1,188 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[ClusterServiceID] = "sp.msp" +} + +func (s Services) Cluster() ClusterService { + return NewClusterService(s.sdk) +} + +const ClusterServiceID conn.ServiceID = "nebius.msp.spark.v1alpha1.ClusterService" + +type ClusterService interface { + Get(context.Context, *v1alpha1.GetClusterRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + GetByName(context.Context, *v1alpha1.GetClusterByNameRequest, ...grpc.CallOption) (*v1alpha1.Cluster, error) + List(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) + Filter(context.Context, *v1alpha1.ListClustersRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] + Create(context.Context, *v1alpha1.CreateClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1alpha1.UpdateClusterRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1alpha1.DeleteClusterRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type clusterService struct { + sdk iface.SDK +} + +func NewClusterService(sdk iface.SDK) ClusterService { + return clusterService{ + sdk: sdk, + } +} + +func (s clusterService) Get(ctx context.Context, request *v1alpha1.GetClusterRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).Get(ctx, request, opts...) +} + +func (s clusterService) GetByName(ctx context.Context, request *v1alpha1.GetClusterByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s clusterService) List(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) (*v1alpha1.ListClustersResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewClusterServiceClient(con).List(ctx, request, opts...) +} + +func (s clusterService) Filter(ctx context.Context, request *v1alpha1.ListClustersRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Cluster, error] { + req := proto.Clone(request).(*v1alpha1.ListClustersRequest) + return func(yield func(*v1alpha1.Cluster, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s clusterService) Create(ctx context.Context, request *v1alpha1.CreateClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s clusterService) Update(ctx context.Context, request *v1alpha1.UpdateClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s clusterService) Delete(ctx context.Context, request *v1alpha1.DeleteClusterRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewClusterServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s clusterService) GetOperation(ctx context.Context, request *v1.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s clusterService) ListOperations(ctx context.Context, request *v1.ListOperationsRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ClusterServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/msp/spark/v1alpha1/job_service.sdk.go b/services/nebius/msp/spark/v1alpha1/job_service.sdk.go new file mode 100644 index 0000000..2b2c11a --- /dev/null +++ b/services/nebius/msp/spark/v1alpha1/job_service.sdk.go @@ -0,0 +1,153 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[JobServiceID] = "sp.msp" +} + +func (s Services) Job() JobService { + return NewJobService(s.sdk) +} + +const JobServiceID conn.ServiceID = "nebius.msp.spark.v1alpha1.JobService" + +type JobService interface { + Get(context.Context, *v1alpha1.GetJobRequest, ...grpc.CallOption) (*v1alpha1.Job, error) + List(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) (*v1alpha1.ListJobsResponse, error) + Filter(context.Context, *v1alpha1.ListJobsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Job, error] + Create(context.Context, *v1alpha1.CreateJobRequest, ...grpc.CallOption) (operations.Operation, error) + Cancel(context.Context, *v1alpha1.CancelJobRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type jobService struct { + sdk iface.SDK +} + +func NewJobService(sdk iface.SDK) JobService { + return jobService{ + sdk: sdk, + } +} + +func (s jobService) Get(ctx context.Context, request *v1alpha1.GetJobRequest, opts ...grpc.CallOption) (*v1alpha1.Job, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewJobServiceClient(con).Get(ctx, request, opts...) +} + +func (s jobService) List(ctx context.Context, request *v1alpha1.ListJobsRequest, opts ...grpc.CallOption) (*v1alpha1.ListJobsResponse, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewJobServiceClient(con).List(ctx, request, opts...) +} + +func (s jobService) Filter(ctx context.Context, request *v1alpha1.ListJobsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Job, error] { + req := proto.Clone(request).(*v1alpha1.ListJobsRequest) + return func(yield func(*v1alpha1.Job, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s jobService) Create(ctx context.Context, request *v1alpha1.CreateJobRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewJobServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s jobService) Cancel(ctx context.Context, request *v1alpha1.CancelJobRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewJobServiceClient(con).Cancel(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s jobService) GetOperation(ctx context.Context, request *v1.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s jobService) ListOperations(ctx context.Context, request *v1.ListOperationsRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, JobServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/msp/spark/v1alpha1/sdk.go b/services/nebius/msp/spark/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/msp/spark/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/spark/v1alpha1/session_service.sdk.go b/services/nebius/msp/spark/v1alpha1/session_service.sdk.go new file mode 100644 index 0000000..8ec2b36 --- /dev/null +++ b/services/nebius/msp/spark/v1alpha1/session_service.sdk.go @@ -0,0 +1,166 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v1 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/msp/spark/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[SessionServiceID] = "sp.msp" +} + +func (s Services) Session() SessionService { + return NewSessionService(s.sdk) +} + +const SessionServiceID conn.ServiceID = "nebius.msp.spark.v1alpha1.SessionService" + +type SessionService interface { + Get(context.Context, *v1alpha1.GetSessionRequest, ...grpc.CallOption) (*v1alpha1.Session, error) + GetByName(context.Context, *v1alpha1.GetSessionByNameRequest, ...grpc.CallOption) (*v1alpha1.Session, error) + List(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) (*v1alpha1.ListSessionsResponse, error) + Filter(context.Context, *v1alpha1.ListSessionsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Session, error] + Create(context.Context, *v1alpha1.CreateSessionRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1alpha1.DeleteSessionRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v1.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v1.ListOperationsRequest, ...grpc.CallOption) (*v1.ListOperationsResponse, error) +} + +type sessionService struct { + sdk iface.SDK +} + +func NewSessionService(sdk iface.SDK) SessionService { + return sessionService{ + sdk: sdk, + } +} + +func (s sessionService) Get(ctx context.Context, request *v1alpha1.GetSessionRequest, opts ...grpc.CallOption) (*v1alpha1.Session, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSessionServiceClient(con).Get(ctx, request, opts...) +} + +func (s sessionService) GetByName(ctx context.Context, request *v1alpha1.GetSessionByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Session, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSessionServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s sessionService) List(ctx context.Context, request *v1alpha1.ListSessionsRequest, opts ...grpc.CallOption) (*v1alpha1.ListSessionsResponse, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSessionServiceClient(con).List(ctx, request, opts...) +} + +func (s sessionService) Filter(ctx context.Context, request *v1alpha1.ListSessionsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Session, error] { + req := proto.Clone(request).(*v1alpha1.ListSessionsRequest) + return func(yield func(*v1alpha1.Session, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s sessionService) Create(ctx context.Context, request *v1alpha1.CreateSessionRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewSessionServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s sessionService) Delete(ctx context.Context, request *v1alpha1.DeleteSessionRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewSessionServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v1.NewOperationServiceClient(con)) +} + +func (s sessionService) GetOperation(ctx context.Context, request *v1.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s sessionService) ListOperations(ctx context.Context, request *v1.ListOperationsRequest, opts ...grpc.CallOption) (*v1.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, SessionServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/msp/v1alpha1.go b/services/nebius/msp/v1alpha1.go new file mode 100644 index 0000000..4a0786e --- /dev/null +++ b/services/nebius/msp/v1alpha1.go @@ -0,0 +1,7 @@ +package msp + +import "github.com/nebius/gosdk/services/nebius/msp/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/msp/v1alpha1/resource.go b/services/nebius/msp/v1alpha1/resource.go new file mode 100644 index 0000000..be605d4 --- /dev/null +++ b/services/nebius/msp/v1alpha1/resource.go @@ -0,0 +1,7 @@ +package v1alpha1 + +import "github.com/nebius/gosdk/services/nebius/msp/v1alpha1/resource" + +func (s Services) Resource() resource.Services { + return resource.New(s.sdk) +} diff --git a/services/nebius/msp/v1alpha1/resource/preset_service.sdk.go b/services/nebius/msp/v1alpha1/resource/preset_service.sdk.go new file mode 100644 index 0000000..70c0b4e --- /dev/null +++ b/services/nebius/msp/v1alpha1/resource/preset_service.sdk.go @@ -0,0 +1,69 @@ +package resource + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Preset() PresetService { + return NewPresetService(s.sdk) +} + +const PresetServiceID conn.ServiceID = "nebius.msp.v1alpha1.resource.PresetService" + +type PresetService interface { + List(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) (*resource.ListPresetsResponse, error) + Filter(context.Context, *resource.ListPresetsRequest, ...grpc.CallOption) iter.Seq2[*resource.Preset, error] +} + +type presetService struct { + sdk iface.SDK +} + +func NewPresetService(sdk iface.SDK) PresetService { + return presetService{ + sdk: sdk, + } +} + +func (s presetService) List(ctx context.Context, request *resource.ListPresetsRequest, opts ...grpc.CallOption) (*resource.ListPresetsResponse, error) { + address, err := s.sdk.Resolve(ctx, PresetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return resource.NewPresetServiceClient(con).List(ctx, request, opts...) +} + +func (s presetService) Filter(ctx context.Context, request *resource.ListPresetsRequest, opts ...grpc.CallOption) iter.Seq2[*resource.Preset, error] { + req := proto.Clone(request).(*resource.ListPresetsRequest) + return func(yield func(*resource.Preset, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/msp/v1alpha1/resource/sdk.go b/services/nebius/msp/v1alpha1/resource/sdk.go new file mode 100644 index 0000000..ba4d4a0 --- /dev/null +++ b/services/nebius/msp/v1alpha1/resource/sdk.go @@ -0,0 +1,15 @@ +package resource + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/msp/v1alpha1/resource/template_service.sdk.go b/services/nebius/msp/v1alpha1/resource/template_service.sdk.go new file mode 100644 index 0000000..2ceb736 --- /dev/null +++ b/services/nebius/msp/v1alpha1/resource/template_service.sdk.go @@ -0,0 +1,69 @@ +package resource + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + resource "github.com/nebius/gosdk/proto/nebius/msp/v1alpha1/resource" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Template() TemplateService { + return NewTemplateService(s.sdk) +} + +const TemplateServiceID conn.ServiceID = "nebius.msp.v1alpha1.resource.TemplateService" + +type TemplateService interface { + List(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) (*resource.ListTemplatesResponse, error) + Filter(context.Context, *resource.ListTemplatesRequest, ...grpc.CallOption) iter.Seq2[*resource.Template, error] +} + +type templateService struct { + sdk iface.SDK +} + +func NewTemplateService(sdk iface.SDK) TemplateService { + return templateService{ + sdk: sdk, + } +} + +func (s templateService) List(ctx context.Context, request *resource.ListTemplatesRequest, opts ...grpc.CallOption) (*resource.ListTemplatesResponse, error) { + address, err := s.sdk.Resolve(ctx, TemplateServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return resource.NewTemplateServiceClient(con).List(ctx, request, opts...) +} + +func (s templateService) Filter(ctx context.Context, request *resource.ListTemplatesRequest, opts ...grpc.CallOption) iter.Seq2[*resource.Template, error] { + req := proto.Clone(request).(*resource.ListTemplatesRequest) + return func(yield func(*resource.Template, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/msp/v1alpha1/sdk.go b/services/nebius/msp/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/msp/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/registry.go b/services/nebius/registry.go new file mode 100644 index 0000000..de0f605 --- /dev/null +++ b/services/nebius/registry.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/registry" + +func (s Services) Registry() registry.Services { + return registry.New(s.sdk) +} diff --git a/services/nebius/registry/sdk.go b/services/nebius/registry/sdk.go new file mode 100644 index 0000000..a2d2444 --- /dev/null +++ b/services/nebius/registry/sdk.go @@ -0,0 +1,15 @@ +package registry + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/registry/v1.go b/services/nebius/registry/v1.go new file mode 100644 index 0000000..52964f3 --- /dev/null +++ b/services/nebius/registry/v1.go @@ -0,0 +1,7 @@ +package registry + +import "github.com/nebius/gosdk/services/nebius/registry/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/registry/v1/artifact_service.sdk.go b/services/nebius/registry/v1/artifact_service.sdk.go new file mode 100644 index 0000000..ea24ef2 --- /dev/null +++ b/services/nebius/registry/v1/artifact_service.sdk.go @@ -0,0 +1,132 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/registry/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Artifact() ArtifactService { + return NewArtifactService(s.sdk) +} + +const ArtifactServiceID conn.ServiceID = "nebius.registry.v1.ArtifactService" + +type ArtifactService interface { + Get(context.Context, *v1.GetArtifactRequest, ...grpc.CallOption) (*v1.Artifact, error) + List(context.Context, *v1.ListArtifactsRequest, ...grpc.CallOption) (*v1.ListArtifactsResponse, error) + Filter(context.Context, *v1.ListArtifactsRequest, ...grpc.CallOption) iter.Seq2[*v1.Artifact, error] + Delete(context.Context, *v1.DeleteArtifactRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type artifactService struct { + sdk iface.SDK +} + +func NewArtifactService(sdk iface.SDK) ArtifactService { + return artifactService{ + sdk: sdk, + } +} + +func (s artifactService) Get(ctx context.Context, request *v1.GetArtifactRequest, opts ...grpc.CallOption) (*v1.Artifact, error) { + address, err := s.sdk.Resolve(ctx, ArtifactServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewArtifactServiceClient(con).Get(ctx, request, opts...) +} + +func (s artifactService) List(ctx context.Context, request *v1.ListArtifactsRequest, opts ...grpc.CallOption) (*v1.ListArtifactsResponse, error) { + address, err := s.sdk.Resolve(ctx, ArtifactServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewArtifactServiceClient(con).List(ctx, request, opts...) +} + +func (s artifactService) Filter(ctx context.Context, request *v1.ListArtifactsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Artifact, error] { + req := proto.Clone(request).(*v1.ListArtifactsRequest) + return func(yield func(*v1.Artifact, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s artifactService) Delete(ctx context.Context, request *v1.DeleteArtifactRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ArtifactServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewArtifactServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s artifactService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, ArtifactServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s artifactService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, ArtifactServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/registry/v1/registry_service.sdk.go b/services/nebius/registry/v1/registry_service.sdk.go new file mode 100644 index 0000000..f6d410a --- /dev/null +++ b/services/nebius/registry/v1/registry_service.sdk.go @@ -0,0 +1,171 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/registry/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Registry() RegistryService { + return NewRegistryService(s.sdk) +} + +const RegistryServiceID conn.ServiceID = "nebius.registry.v1.RegistryService" + +type RegistryService interface { + Get(context.Context, *v1.GetRegistryRequest, ...grpc.CallOption) (*v1.Registry, error) + List(context.Context, *v1.ListRegistriesRequest, ...grpc.CallOption) (*v1.ListRegistriesResponse, error) + Filter(context.Context, *v1.ListRegistriesRequest, ...grpc.CallOption) iter.Seq2[*v1.Registry, error] + Create(context.Context, *v1.CreateRegistryRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateRegistryRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteRegistryRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type registryService struct { + sdk iface.SDK +} + +func NewRegistryService(sdk iface.SDK) RegistryService { + return registryService{ + sdk: sdk, + } +} + +func (s registryService) Get(ctx context.Context, request *v1.GetRegistryRequest, opts ...grpc.CallOption) (*v1.Registry, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewRegistryServiceClient(con).Get(ctx, request, opts...) +} + +func (s registryService) List(ctx context.Context, request *v1.ListRegistriesRequest, opts ...grpc.CallOption) (*v1.ListRegistriesResponse, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewRegistryServiceClient(con).List(ctx, request, opts...) +} + +func (s registryService) Filter(ctx context.Context, request *v1.ListRegistriesRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Registry, error] { + req := proto.Clone(request).(*v1.ListRegistriesRequest) + return func(yield func(*v1.Registry, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s registryService) Create(ctx context.Context, request *v1.CreateRegistryRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewRegistryServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s registryService) Update(ctx context.Context, request *v1.UpdateRegistryRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewRegistryServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s registryService) Delete(ctx context.Context, request *v1.DeleteRegistryRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewRegistryServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s registryService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s registryService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, RegistryServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/registry/v1/sdk.go b/services/nebius/registry/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/registry/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/sdk.go b/services/nebius/sdk.go new file mode 100644 index 0000000..836fbaa --- /dev/null +++ b/services/nebius/sdk.go @@ -0,0 +1,15 @@ +package nebius + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/storage.go b/services/nebius/storage.go new file mode 100644 index 0000000..edfcbf8 --- /dev/null +++ b/services/nebius/storage.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/storage" + +func (s Services) Storage() storage.Services { + return storage.New(s.sdk) +} diff --git a/services/nebius/storage/sdk.go b/services/nebius/storage/sdk.go new file mode 100644 index 0000000..faf8f38 --- /dev/null +++ b/services/nebius/storage/sdk.go @@ -0,0 +1,15 @@ +package storage + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/storage/v1.go b/services/nebius/storage/v1.go new file mode 100644 index 0000000..11b705d --- /dev/null +++ b/services/nebius/storage/v1.go @@ -0,0 +1,7 @@ +package storage + +import "github.com/nebius/gosdk/services/nebius/storage/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/storage/v1/bucket_service.sdk.go b/services/nebius/storage/v1/bucket_service.sdk.go new file mode 100644 index 0000000..89ab4c8 --- /dev/null +++ b/services/nebius/storage/v1/bucket_service.sdk.go @@ -0,0 +1,222 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/storage/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func init() { + conn.ConventionResolverServiceIDToNameMap[BucketServiceID] = "cpl.storage" +} + +func (s Services) Bucket() BucketService { + return NewBucketService(s.sdk) +} + +const BucketServiceID conn.ServiceID = "nebius.storage.v1.BucketService" + +type BucketService interface { + Get(context.Context, *v1.GetBucketRequest, ...grpc.CallOption) (*v1.Bucket, error) + GetByName(context.Context, *v1.GetBucketByNameRequest, ...grpc.CallOption) (*v1.Bucket, error) + List(context.Context, *v1.ListBucketsRequest, ...grpc.CallOption) (*v1.ListBucketsResponse, error) + Filter(context.Context, *v1.ListBucketsRequest, ...grpc.CallOption) iter.Seq2[*v1.Bucket, error] + Create(context.Context, *v1.CreateBucketRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateBucketRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error) + Purge(context.Context, *v1.PurgeBucketRequest, ...grpc.CallOption) (operations.Operation, error) + Undelete(context.Context, *v1.UndeleteBucketRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type bucketService struct { + sdk iface.SDK +} + +func NewBucketService(sdk iface.SDK) BucketService { + return bucketService{ + sdk: sdk, + } +} + +func (s bucketService) Get(ctx context.Context, request *v1.GetBucketRequest, opts ...grpc.CallOption) (*v1.Bucket, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewBucketServiceClient(con).Get(ctx, request, opts...) +} + +func (s bucketService) GetByName(ctx context.Context, request *v1.GetBucketByNameRequest, opts ...grpc.CallOption) (*v1.Bucket, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewBucketServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s bucketService) List(ctx context.Context, request *v1.ListBucketsRequest, opts ...grpc.CallOption) (*v1.ListBucketsResponse, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewBucketServiceClient(con).List(ctx, request, opts...) +} + +func (s bucketService) Filter(ctx context.Context, request *v1.ListBucketsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Bucket, error] { + req := proto.Clone(request).(*v1.ListBucketsRequest) + return func(yield func(*v1.Bucket, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s bucketService) Create(ctx context.Context, request *v1.CreateBucketRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewBucketServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s bucketService) Update(ctx context.Context, request *v1.UpdateBucketRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewBucketServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s bucketService) Delete(ctx context.Context, request *v1.DeleteBucketRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewBucketServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s bucketService) Purge(ctx context.Context, request *v1.PurgeBucketRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewBucketServiceClient(con).Purge(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s bucketService) Undelete(ctx context.Context, request *v1.UndeleteBucketRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewBucketServiceClient(con).Undelete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s bucketService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s bucketService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, BucketServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/storage/v1/sdk.go b/services/nebius/storage/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/storage/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/vpc.go b/services/nebius/vpc.go new file mode 100644 index 0000000..553516a --- /dev/null +++ b/services/nebius/vpc.go @@ -0,0 +1,7 @@ +package nebius + +import "github.com/nebius/gosdk/services/nebius/vpc" + +func (s Services) VPC() vpc.Services { + return vpc.New(s.sdk) +} diff --git a/services/nebius/vpc/sdk.go b/services/nebius/vpc/sdk.go new file mode 100644 index 0000000..27cbca5 --- /dev/null +++ b/services/nebius/vpc/sdk.go @@ -0,0 +1,15 @@ +package vpc + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/vpc/v1.go b/services/nebius/vpc/v1.go new file mode 100644 index 0000000..57b3c03 --- /dev/null +++ b/services/nebius/vpc/v1.go @@ -0,0 +1,7 @@ +package vpc + +import "github.com/nebius/gosdk/services/nebius/vpc/v1" + +func (s Services) V1() v1.Services { + return v1.New(s.sdk) +} diff --git a/services/nebius/vpc/v1/allocation_service.sdk.go b/services/nebius/vpc/v1/allocation_service.sdk.go new file mode 100644 index 0000000..048fc0e --- /dev/null +++ b/services/nebius/vpc/v1/allocation_service.sdk.go @@ -0,0 +1,184 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Allocation() AllocationService { + return NewAllocationService(s.sdk) +} + +const AllocationServiceID conn.ServiceID = "nebius.vpc.v1.AllocationService" + +type AllocationService interface { + Get(context.Context, *v1.GetAllocationRequest, ...grpc.CallOption) (*v1.Allocation, error) + GetByName(context.Context, *v1.GetAllocationByNameRequest, ...grpc.CallOption) (*v1.Allocation, error) + List(context.Context, *v1.ListAllocationsRequest, ...grpc.CallOption) (*v1.ListAllocationsResponse, error) + Filter(context.Context, *v1.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v1.Allocation, error] + Create(context.Context, *v1.CreateAllocationRequest, ...grpc.CallOption) (operations.Operation, error) + Update(context.Context, *v1.UpdateAllocationRequest, ...grpc.CallOption) (operations.Operation, error) + Delete(context.Context, *v1.DeleteAllocationRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type allocationService struct { + sdk iface.SDK +} + +func NewAllocationService(sdk iface.SDK) AllocationService { + return allocationService{ + sdk: sdk, + } +} + +func (s allocationService) Get(ctx context.Context, request *v1.GetAllocationRequest, opts ...grpc.CallOption) (*v1.Allocation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAllocationServiceClient(con).Get(ctx, request, opts...) +} + +func (s allocationService) GetByName(ctx context.Context, request *v1.GetAllocationByNameRequest, opts ...grpc.CallOption) (*v1.Allocation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAllocationServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s allocationService) List(ctx context.Context, request *v1.ListAllocationsRequest, opts ...grpc.CallOption) (*v1.ListAllocationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewAllocationServiceClient(con).List(ctx, request, opts...) +} + +func (s allocationService) Filter(ctx context.Context, request *v1.ListAllocationsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Allocation, error] { + req := proto.Clone(request).(*v1.ListAllocationsRequest) + return func(yield func(*v1.Allocation, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s allocationService) Create(ctx context.Context, request *v1.CreateAllocationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAllocationServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s allocationService) Update(ctx context.Context, request *v1.UpdateAllocationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAllocationServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s allocationService) Delete(ctx context.Context, request *v1.DeleteAllocationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewAllocationServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s allocationService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s allocationService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/vpc/v1/network_service.sdk.go b/services/nebius/vpc/v1/network_service.sdk.go new file mode 100644 index 0000000..2b13dad --- /dev/null +++ b/services/nebius/vpc/v1/network_service.sdk.go @@ -0,0 +1,95 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Network() NetworkService { + return NewNetworkService(s.sdk) +} + +const NetworkServiceID conn.ServiceID = "nebius.vpc.v1.NetworkService" + +type NetworkService interface { + Get(context.Context, *v1.GetNetworkRequest, ...grpc.CallOption) (*v1.Network, error) + GetByName(context.Context, *v1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1.Network, error) + List(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) (*v1.ListNetworksResponse, error) + Filter(context.Context, *v1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1.Network, error] +} + +type networkService struct { + sdk iface.SDK +} + +func NewNetworkService(sdk iface.SDK) NetworkService { + return networkService{ + sdk: sdk, + } +} + +func (s networkService) Get(ctx context.Context, request *v1.GetNetworkRequest, opts ...grpc.CallOption) (*v1.Network, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNetworkServiceClient(con).Get(ctx, request, opts...) +} + +func (s networkService) GetByName(ctx context.Context, request *v1.GetNetworkByNameRequest, opts ...grpc.CallOption) (*v1.Network, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNetworkServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s networkService) List(ctx context.Context, request *v1.ListNetworksRequest, opts ...grpc.CallOption) (*v1.ListNetworksResponse, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewNetworkServiceClient(con).List(ctx, request, opts...) +} + +func (s networkService) Filter(ctx context.Context, request *v1.ListNetworksRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Network, error] { + req := proto.Clone(request).(*v1.ListNetworksRequest) + return func(yield func(*v1.Network, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/vpc/v1/pool_service.sdk.go b/services/nebius/vpc/v1/pool_service.sdk.go new file mode 100644 index 0000000..9bddb4e --- /dev/null +++ b/services/nebius/vpc/v1/pool_service.sdk.go @@ -0,0 +1,150 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + operations "github.com/nebius/gosdk/operations" + v11 "github.com/nebius/gosdk/proto/nebius/common/v1" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Pool() PoolService { + return NewPoolService(s.sdk) +} + +const PoolServiceID conn.ServiceID = "nebius.vpc.v1.PoolService" + +type PoolService interface { + Get(context.Context, *v1.GetPoolRequest, ...grpc.CallOption) (*v1.Pool, error) + GetByName(context.Context, *v1.GetPoolByNameRequest, ...grpc.CallOption) (*v1.Pool, error) + List(context.Context, *v1.ListPoolsRequest, ...grpc.CallOption) (*v1.ListPoolsResponse, error) + Filter(context.Context, *v1.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v1.Pool, error] + Update(context.Context, *v1.UpdatePoolRequest, ...grpc.CallOption) (operations.Operation, error) + GetOperation(context.Context, *v11.GetOperationRequest, ...grpc.CallOption) (operations.Operation, error) + ListOperations(context.Context, *v11.ListOperationsRequest, ...grpc.CallOption) (*v11.ListOperationsResponse, error) +} + +type poolService struct { + sdk iface.SDK +} + +func NewPoolService(sdk iface.SDK) PoolService { + return poolService{ + sdk: sdk, + } +} + +func (s poolService) Get(ctx context.Context, request *v1.GetPoolRequest, opts ...grpc.CallOption) (*v1.Pool, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewPoolServiceClient(con).Get(ctx, request, opts...) +} + +func (s poolService) GetByName(ctx context.Context, request *v1.GetPoolByNameRequest, opts ...grpc.CallOption) (*v1.Pool, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewPoolServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s poolService) List(ctx context.Context, request *v1.ListPoolsRequest, opts ...grpc.CallOption) (*v1.ListPoolsResponse, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewPoolServiceClient(con).List(ctx, request, opts...) +} + +func (s poolService) Filter(ctx context.Context, request *v1.ListPoolsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Pool, error] { + req := proto.Clone(request).(*v1.ListPoolsRequest) + return func(yield func(*v1.Pool, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s poolService) Update(ctx context.Context, request *v1.UpdatePoolRequest, opts ...grpc.CallOption) (operations.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1.NewPoolServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, v11.NewOperationServiceClient(con)) +} + +func (s poolService) GetOperation(ctx context.Context, request *v11.GetOperationRequest, opts ...grpc.CallOption) (operations.Operation, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return operations.New(op, client) +} + +func (s poolService) ListOperations(ctx context.Context, request *v11.ListOperationsRequest, opts ...grpc.CallOption) (*v11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/vpc/v1/sdk.go b/services/nebius/vpc/v1/sdk.go new file mode 100644 index 0000000..e5ade7d --- /dev/null +++ b/services/nebius/vpc/v1/sdk.go @@ -0,0 +1,15 @@ +package v1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/vpc/v1/subnet_service.sdk.go b/services/nebius/vpc/v1/subnet_service.sdk.go new file mode 100644 index 0000000..9ea70a5 --- /dev/null +++ b/services/nebius/vpc/v1/subnet_service.sdk.go @@ -0,0 +1,108 @@ +package v1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1 "github.com/nebius/gosdk/proto/nebius/vpc/v1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Subnet() SubnetService { + return NewSubnetService(s.sdk) +} + +const SubnetServiceID conn.ServiceID = "nebius.vpc.v1.SubnetService" + +type SubnetService interface { + Get(context.Context, *v1.GetSubnetRequest, ...grpc.CallOption) (*v1.Subnet, error) + GetByName(context.Context, *v1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1.Subnet, error) + List(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error) + Filter(context.Context, *v1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1.Subnet, error] + ListByNetwork(context.Context, *v1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1.ListSubnetsResponse, error) +} + +type subnetService struct { + sdk iface.SDK +} + +func NewSubnetService(sdk iface.SDK) SubnetService { + return subnetService{ + sdk: sdk, + } +} + +func (s subnetService) Get(ctx context.Context, request *v1.GetSubnetRequest, opts ...grpc.CallOption) (*v1.Subnet, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewSubnetServiceClient(con).Get(ctx, request, opts...) +} + +func (s subnetService) GetByName(ctx context.Context, request *v1.GetSubnetByNameRequest, opts ...grpc.CallOption) (*v1.Subnet, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewSubnetServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s subnetService) List(ctx context.Context, request *v1.ListSubnetsRequest, opts ...grpc.CallOption) (*v1.ListSubnetsResponse, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewSubnetServiceClient(con).List(ctx, request, opts...) +} + +func (s subnetService) Filter(ctx context.Context, request *v1.ListSubnetsRequest, opts ...grpc.CallOption) iter.Seq2[*v1.Subnet, error] { + req := proto.Clone(request).(*v1.ListSubnetsRequest) + return func(yield func(*v1.Subnet, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s subnetService) ListByNetwork(ctx context.Context, request *v1.ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*v1.ListSubnetsResponse, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1.NewSubnetServiceClient(con).ListByNetwork(ctx, request, opts...) +} diff --git a/services/nebius/vpc/v1alpha1.go b/services/nebius/vpc/v1alpha1.go new file mode 100644 index 0000000..b6ce5ea --- /dev/null +++ b/services/nebius/vpc/v1alpha1.go @@ -0,0 +1,7 @@ +package vpc + +import "github.com/nebius/gosdk/services/nebius/vpc/v1alpha1" + +func (s Services) V1Alpha1() v1alpha1.Services { + return v1alpha1.New(s.sdk) +} diff --git a/services/nebius/vpc/v1alpha1/allocation_service.sdk.go b/services/nebius/vpc/v1alpha1/allocation_service.sdk.go new file mode 100644 index 0000000..480a3f7 --- /dev/null +++ b/services/nebius/vpc/v1alpha1/allocation_service.sdk.go @@ -0,0 +1,184 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + grpcheader "github.com/nebius/gosdk/fieldmask/grpcheader" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + alphaops "github.com/nebius/gosdk/operations/alphaops" + v1alpha11 "github.com/nebius/gosdk/proto/nebius/common/v1alpha1" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Allocation() AllocationService { + return NewAllocationService(s.sdk) +} + +const AllocationServiceID conn.ServiceID = "nebius.vpc.v1alpha1.AllocationService" + +type AllocationService interface { + Get(context.Context, *v1alpha1.GetAllocationRequest, ...grpc.CallOption) (*v1alpha1.Allocation, error) + GetByName(context.Context, *v1alpha1.GetAllocationByNameRequest, ...grpc.CallOption) (*v1alpha1.Allocation, error) + List(context.Context, *v1alpha1.ListAllocationsRequest, ...grpc.CallOption) (*v1alpha1.ListAllocationsResponse, error) + Filter(context.Context, *v1alpha1.ListAllocationsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Allocation, error] + Create(context.Context, *v1alpha1.CreateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Update(context.Context, *v1alpha1.UpdateAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + Delete(context.Context, *v1alpha1.DeleteAllocationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + GetOperation(context.Context, *v1alpha11.GetOperationRequest, ...grpc.CallOption) (*alphaops.Operation, error) + ListOperations(context.Context, *v1alpha11.ListOperationsRequest, ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) +} + +type allocationService struct { + sdk iface.SDK +} + +func NewAllocationService(sdk iface.SDK) AllocationService { + return allocationService{ + sdk: sdk, + } +} + +func (s allocationService) Get(ctx context.Context, request *v1alpha1.GetAllocationRequest, opts ...grpc.CallOption) (*v1alpha1.Allocation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewAllocationServiceClient(con).Get(ctx, request, opts...) +} + +func (s allocationService) GetByName(ctx context.Context, request *v1alpha1.GetAllocationByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Allocation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewAllocationServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s allocationService) List(ctx context.Context, request *v1alpha1.ListAllocationsRequest, opts ...grpc.CallOption) (*v1alpha1.ListAllocationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewAllocationServiceClient(con).List(ctx, request, opts...) +} + +func (s allocationService) Filter(ctx context.Context, request *v1alpha1.ListAllocationsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Allocation, error] { + req := proto.Clone(request).(*v1alpha1.ListAllocationsRequest) + return func(yield func(*v1alpha1.Allocation, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s allocationService) Create(ctx context.Context, request *v1alpha1.CreateAllocationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewAllocationServiceClient(con).Create(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s allocationService) Update(ctx context.Context, request *v1alpha1.UpdateAllocationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + ctx, err := grpcheader.EnsureMessageResetMaskInOutgoingContext(ctx, request) + if err != nil { + return nil, err + } + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewAllocationServiceClient(con).Update(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s allocationService) Delete(ctx context.Context, request *v1alpha1.DeleteAllocationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + op, err := v1alpha1.NewAllocationServiceClient(con).Delete(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, v1alpha11.NewOperationServiceClient(con)) +} + +func (s allocationService) GetOperation(ctx context.Context, request *v1alpha11.GetOperationRequest, opts ...grpc.CallOption) (*alphaops.Operation, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + client := v1alpha11.NewOperationServiceClient(con) + op, err := client.Get(ctx, request, opts...) + if err != nil { + return nil, err + } + return alphaops.Wrap(op, client) +} + +func (s allocationService) ListOperations(ctx context.Context, request *v1alpha11.ListOperationsRequest, opts ...grpc.CallOption) (*v1alpha11.ListOperationsResponse, error) { + address, err := s.sdk.Resolve(ctx, AllocationServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha11.NewOperationServiceClient(con).List(ctx, request, opts...) +} diff --git a/services/nebius/vpc/v1alpha1/network_service.sdk.go b/services/nebius/vpc/v1alpha1/network_service.sdk.go new file mode 100644 index 0000000..40ad05b --- /dev/null +++ b/services/nebius/vpc/v1alpha1/network_service.sdk.go @@ -0,0 +1,95 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Network() NetworkService { + return NewNetworkService(s.sdk) +} + +const NetworkServiceID conn.ServiceID = "nebius.vpc.v1alpha1.NetworkService" + +type NetworkService interface { + Get(context.Context, *v1alpha1.GetNetworkRequest, ...grpc.CallOption) (*v1alpha1.Network, error) + GetByName(context.Context, *v1alpha1.GetNetworkByNameRequest, ...grpc.CallOption) (*v1alpha1.Network, error) + List(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) (*v1alpha1.ListNetworksResponse, error) + Filter(context.Context, *v1alpha1.ListNetworksRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Network, error] +} + +type networkService struct { + sdk iface.SDK +} + +func NewNetworkService(sdk iface.SDK) NetworkService { + return networkService{ + sdk: sdk, + } +} + +func (s networkService) Get(ctx context.Context, request *v1alpha1.GetNetworkRequest, opts ...grpc.CallOption) (*v1alpha1.Network, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNetworkServiceClient(con).Get(ctx, request, opts...) +} + +func (s networkService) GetByName(ctx context.Context, request *v1alpha1.GetNetworkByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Network, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNetworkServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s networkService) List(ctx context.Context, request *v1alpha1.ListNetworksRequest, opts ...grpc.CallOption) (*v1alpha1.ListNetworksResponse, error) { + address, err := s.sdk.Resolve(ctx, NetworkServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewNetworkServiceClient(con).List(ctx, request, opts...) +} + +func (s networkService) Filter(ctx context.Context, request *v1alpha1.ListNetworksRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Network, error] { + req := proto.Clone(request).(*v1alpha1.ListNetworksRequest) + return func(yield func(*v1alpha1.Network, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/vpc/v1alpha1/pool_service.sdk.go b/services/nebius/vpc/v1alpha1/pool_service.sdk.go new file mode 100644 index 0000000..ccd8d93 --- /dev/null +++ b/services/nebius/vpc/v1alpha1/pool_service.sdk.go @@ -0,0 +1,95 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Pool() PoolService { + return NewPoolService(s.sdk) +} + +const PoolServiceID conn.ServiceID = "nebius.vpc.v1alpha1.PoolService" + +type PoolService interface { + Get(context.Context, *v1alpha1.GetPoolRequest, ...grpc.CallOption) (*v1alpha1.Pool, error) + GetByName(context.Context, *v1alpha1.GetPoolByNameRequest, ...grpc.CallOption) (*v1alpha1.Pool, error) + List(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) (*v1alpha1.ListPoolsResponse, error) + Filter(context.Context, *v1alpha1.ListPoolsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Pool, error] +} + +type poolService struct { + sdk iface.SDK +} + +func NewPoolService(sdk iface.SDK) PoolService { + return poolService{ + sdk: sdk, + } +} + +func (s poolService) Get(ctx context.Context, request *v1alpha1.GetPoolRequest, opts ...grpc.CallOption) (*v1alpha1.Pool, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewPoolServiceClient(con).Get(ctx, request, opts...) +} + +func (s poolService) GetByName(ctx context.Context, request *v1alpha1.GetPoolByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Pool, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewPoolServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s poolService) List(ctx context.Context, request *v1alpha1.ListPoolsRequest, opts ...grpc.CallOption) (*v1alpha1.ListPoolsResponse, error) { + address, err := s.sdk.Resolve(ctx, PoolServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewPoolServiceClient(con).List(ctx, request, opts...) +} + +func (s poolService) Filter(ctx context.Context, request *v1alpha1.ListPoolsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Pool, error] { + req := proto.Clone(request).(*v1alpha1.ListPoolsRequest) + return func(yield func(*v1alpha1.Pool, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/vpc/v1alpha1/scope_service.sdk.go b/services/nebius/vpc/v1alpha1/scope_service.sdk.go new file mode 100644 index 0000000..edb2e3e --- /dev/null +++ b/services/nebius/vpc/v1alpha1/scope_service.sdk.go @@ -0,0 +1,95 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Scope() ScopeService { + return NewScopeService(s.sdk) +} + +const ScopeServiceID conn.ServiceID = "nebius.vpc.v1alpha1.ScopeService" + +type ScopeService interface { + Get(context.Context, *v1alpha1.GetScopeRequest, ...grpc.CallOption) (*v1alpha1.Scope, error) + GetByName(context.Context, *v1alpha1.GetScopeByNameRequest, ...grpc.CallOption) (*v1alpha1.Scope, error) + List(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) (*v1alpha1.ListScopesResponse, error) + Filter(context.Context, *v1alpha1.ListScopesRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Scope, error] +} + +type scopeService struct { + sdk iface.SDK +} + +func NewScopeService(sdk iface.SDK) ScopeService { + return scopeService{ + sdk: sdk, + } +} + +func (s scopeService) Get(ctx context.Context, request *v1alpha1.GetScopeRequest, opts ...grpc.CallOption) (*v1alpha1.Scope, error) { + address, err := s.sdk.Resolve(ctx, ScopeServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewScopeServiceClient(con).Get(ctx, request, opts...) +} + +func (s scopeService) GetByName(ctx context.Context, request *v1alpha1.GetScopeByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Scope, error) { + address, err := s.sdk.Resolve(ctx, ScopeServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewScopeServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s scopeService) List(ctx context.Context, request *v1alpha1.ListScopesRequest, opts ...grpc.CallOption) (*v1alpha1.ListScopesResponse, error) { + address, err := s.sdk.Resolve(ctx, ScopeServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewScopeServiceClient(con).List(ctx, request, opts...) +} + +func (s scopeService) Filter(ctx context.Context, request *v1alpha1.ListScopesRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Scope, error] { + req := proto.Clone(request).(*v1alpha1.ListScopesRequest) + return func(yield func(*v1alpha1.Scope, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} diff --git a/services/nebius/vpc/v1alpha1/sdk.go b/services/nebius/vpc/v1alpha1/sdk.go new file mode 100644 index 0000000..f0f68e2 --- /dev/null +++ b/services/nebius/vpc/v1alpha1/sdk.go @@ -0,0 +1,15 @@ +package v1alpha1 + +import ( + "github.com/nebius/gosdk/internal/iface" +) + +type Services struct { + sdk iface.SDK +} + +func New(sdk iface.SDK) Services { + return Services{ + sdk: sdk, + } +} diff --git a/services/nebius/vpc/v1alpha1/subnet_service.sdk.go b/services/nebius/vpc/v1alpha1/subnet_service.sdk.go new file mode 100644 index 0000000..e7a27f3 --- /dev/null +++ b/services/nebius/vpc/v1alpha1/subnet_service.sdk.go @@ -0,0 +1,108 @@ +package v1alpha1 + +import ( + context "context" + conn "github.com/nebius/gosdk/conn" + iface "github.com/nebius/gosdk/internal/iface" + iter "github.com/nebius/gosdk/iter" + v1alpha1 "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func (s Services) Subnet() SubnetService { + return NewSubnetService(s.sdk) +} + +const SubnetServiceID conn.ServiceID = "nebius.vpc.v1alpha1.SubnetService" + +type SubnetService interface { + Get(context.Context, *v1alpha1.GetSubnetRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error) + GetByName(context.Context, *v1alpha1.GetSubnetByNameRequest, ...grpc.CallOption) (*v1alpha1.Subnet, error) + List(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) + Filter(context.Context, *v1alpha1.ListSubnetsRequest, ...grpc.CallOption) iter.Seq2[*v1alpha1.Subnet, error] + ListByNetwork(context.Context, *v1alpha1.ListSubnetsByNetworkRequest, ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) +} + +type subnetService struct { + sdk iface.SDK +} + +func NewSubnetService(sdk iface.SDK) SubnetService { + return subnetService{ + sdk: sdk, + } +} + +func (s subnetService) Get(ctx context.Context, request *v1alpha1.GetSubnetRequest, opts ...grpc.CallOption) (*v1alpha1.Subnet, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSubnetServiceClient(con).Get(ctx, request, opts...) +} + +func (s subnetService) GetByName(ctx context.Context, request *v1alpha1.GetSubnetByNameRequest, opts ...grpc.CallOption) (*v1alpha1.Subnet, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSubnetServiceClient(con).GetByName(ctx, request, opts...) +} + +func (s subnetService) List(ctx context.Context, request *v1alpha1.ListSubnetsRequest, opts ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSubnetServiceClient(con).List(ctx, request, opts...) +} + +func (s subnetService) Filter(ctx context.Context, request *v1alpha1.ListSubnetsRequest, opts ...grpc.CallOption) iter.Seq2[*v1alpha1.Subnet, error] { + req := proto.Clone(request).(*v1alpha1.ListSubnetsRequest) + return func(yield func(*v1alpha1.Subnet, error) bool) { + for { + res, err := s.List(ctx, req, opts...) + if err != nil { + yield(nil, err) + return + } + + for _, item := range res.GetItems() { + if !yield(item, nil) { + return + } + } + + if res.GetNextPageToken() == "" { + return + } + + req.PageToken = res.GetNextPageToken() + } + } +} + +func (s subnetService) ListByNetwork(ctx context.Context, request *v1alpha1.ListSubnetsByNetworkRequest, opts ...grpc.CallOption) (*v1alpha1.ListSubnetsResponse, error) { + address, err := s.sdk.Resolve(ctx, SubnetServiceID) + if err != nil { + return nil, err + } + con, err := s.sdk.Dial(ctx, address) + if err != nil { + return nil, err + } + return v1alpha1.NewSubnetServiceClient(con).ListByNetwork(ctx, request, opts...) +} diff --git a/tests/gosdk_test.go b/tests/gosdk_test.go new file mode 100644 index 0000000..ea69e83 --- /dev/null +++ b/tests/gosdk_test.go @@ -0,0 +1,85 @@ +package tests_test + +import ( + "context" + "net" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "github.com/nebius/gosdk" + "github.com/nebius/gosdk/conn" + commonpb "github.com/nebius/gosdk/proto/nebius/common/v1" + computepb "github.com/nebius/gosdk/proto/nebius/compute/v1" +) + +func TestGoSDK(t *testing.T) { + t.Parallel() + ctx := context.Background() + + server := grpc.NewServer() + computepb.RegisterDiskServiceServer(server, DiskServiceStub{}) + + lis, err := net.Listen("tcp6", "[::1]:0") + require.NoError(t, err) + + serveErr := make(chan error, 1) + go func() { + serveErr <- server.Serve(lis) + }() + t.Cleanup(func() { + server.Stop() + select { + case errX := <-serveErr: + require.NoError(t, errX) + case <-time.After(5 * time.Second): + require.Fail(t, "timeout") + } + }) + + sdk, err := gosdk.New( + ctx, + gosdk.WithResolvers(conn.NewConstantResolver(conn.Address(lis.Addr().String()))), + gosdk.WithDialOptions(grpc.WithTransportCredentials(insecure.NewCredentials())), + ) + require.NoError(t, err) + + t.Cleanup(func() { + errX := sdk.Close() + require.NoError(t, errX) + }) + + diskService := sdk.Services().Compute().V1().Disk() + disk, err := diskService.Get(ctx, &computepb.GetDiskRequest{Id: "disk-id"}) + require.NoError(t, err) + + assert.EqualExportedValues(t, &computepb.Disk{ + Metadata: &commonpb.ResourceMetadata{ + Id: "disk-id", + Name: "disk-name", + }, + Spec: &computepb.DiskSpec{ + Type: computepb.DiskSpec_NETWORK_SSD, + }, + }, disk) +} + +type DiskServiceStub struct { + computepb.UnimplementedDiskServiceServer +} + +func (DiskServiceStub) Get(context.Context, *computepb.GetDiskRequest) (*computepb.Disk, error) { + return &computepb.Disk{ + Metadata: &commonpb.ResourceMetadata{ + Id: "disk-id", + Name: "disk-name", + }, + Spec: &computepb.DiskSpec{ + Type: computepb.DiskSpec_NETWORK_SSD, + }, + }, nil +} diff --git a/tests/proto_validator_test.go b/tests/proto_validator_test.go new file mode 100644 index 0000000..6fe294f --- /dev/null +++ b/tests/proto_validator_test.go @@ -0,0 +1,44 @@ +package tests_test + +import ( + "testing" + + "github.com/bufbuild/protovalidate-go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + common "github.com/nebius/gosdk/proto/nebius/common/v1" + compute "github.com/nebius/gosdk/proto/nebius/compute/v1" +) + +func TestProtoValidator(t *testing.T) { + t.Parallel() + validator, err := protovalidate.New() + require.NoError(t, err) + err = validator.Validate(&compute.Disk{ + Metadata: &common.ResourceMetadata{ + ParentId: "", // required string + ResourceVersion: -123, // >= 0 + }, + Spec: &compute.DiskSpec{ + Size: nil, // required oneof + Type: 0, // required enum + }, + }) + var vErr *protovalidate.ValidationError + require.ErrorAs(t, err, &vErr) + assertViolation(t, vErr, "metadata.parent_id", "required") + assertViolation(t, vErr, "metadata.resource_version", "int64.gte") + assertViolation(t, vErr, "spec.size", "required") + assertViolation(t, vErr, "spec.type", "required") +} + +func assertViolation(t *testing.T, err *protovalidate.ValidationError, field string, expectedConstraint string) { + for _, v := range err.Violations { + if v.GetFieldPath() == field { + assert.Equal(t, expectedConstraint, v.GetConstraintId()) + return + } + } + assert.Fail(t, "violation not found", "field %s", field) +} diff --git a/tests/real_call_test.go b/tests/real_call_test.go new file mode 100644 index 0000000..65ae300 --- /dev/null +++ b/tests/real_call_test.go @@ -0,0 +1,27 @@ +package tests_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/nebius/gosdk" + computepb "github.com/nebius/gosdk/proto/nebius/compute/v1" +) + +func TestRealCall_WithoutCreds(t *testing.T) { + t.Parallel() + ctx := context.Background() + + sdk, err := gosdk.New(ctx) + require.NoError(t, err) + + t.Cleanup(func() { + require.NoError(t, sdk.Close()) + }) + + diskService := sdk.Services().Compute().V1().Disk() + _, err = diskService.List(ctx, &computepb.ListDisksRequest{ParentId: "fake-e00id"}) + require.EqualError(t, err, "rpc error: code = Unauthenticated desc = failed to list disks: authorization failed: failed to extract token from context: no token") +}