-}
diff --git a/flyteidl/clients/go/admin/auth_interceptor.go b/flyteidl/clients/go/admin/auth_interceptor.go
deleted file mode 100644
index b1ede68db..000000000
--- a/flyteidl/clients/go/admin/auth_interceptor.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package admin
-
-import (
- "context"
- "fmt"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/logger"
-
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
-
- "google.golang.org/grpc"
-)
-
-// MaterializeCredentials will attempt to build a TokenSource given the anonymously available information exposed by the server.
-// Once established, it'll invoke PerRPCCredentialsFuture.Store() on perRPCCredentials to populate it with the appropriate values.
-func MaterializeCredentials(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, perRPCCredentials *PerRPCCredentialsFuture) error {
- authMetadataClient, err := InitializeAuthMetadataClient(ctx, cfg)
- if err != nil {
- return fmt.Errorf("failed to initialized Auth Metadata Client. Error: %w", err)
- }
-
- tokenSourceProvider, err := NewTokenSourceProvider(ctx, cfg, tokenCache, authMetadataClient)
- if err != nil {
- return fmt.Errorf("failed to initialized token source provider. Err: %w", err)
- }
-
- authorizationMetadataKey := cfg.AuthorizationHeader
- if len(authorizationMetadataKey) == 0 {
- clientMetadata, err := authMetadataClient.GetPublicClientConfig(ctx, &service.PublicClientAuthConfigRequest{})
- if err != nil {
- return fmt.Errorf("failed to fetch client metadata. Error: %v", err)
- }
- authorizationMetadataKey = clientMetadata.AuthorizationMetadataKey
- }
-
- tokenSource, err := tokenSourceProvider.GetTokenSource(ctx)
- if err != nil {
- return err
- }
-
- wrappedTokenSource := NewCustomHeaderTokenSource(tokenSource, cfg.UseInsecureConnection, authorizationMetadataKey)
- perRPCCredentials.Store(wrappedTokenSource)
- return nil
-}
-
-func shouldAttemptToAuthenticate(errorCode codes.Code) bool {
- return errorCode == codes.Unauthenticated
-}
-
-// NewAuthInterceptor creates a new grpc.UnaryClientInterceptor that forwards the grpc call and inspects the error.
-// It will first invoke the grpc pipeline (to proceed with the request) with no modifications. It's expected for the grpc
-// pipeline to already have a grpc.WithPerRPCCredentials() DialOption. If the perRPCCredentials has already been initialized,
-// it'll take care of refreshing when tokens expire... etc.
-// If the first invocation succeeds (either due to grpc.PerRPCCredentials setting the right tokens or the server not
-// requiring authentication), the interceptor will be no-op.
-// If the first invocation fails with an auth error, this interceptor will then attempt to establish a token source once
-// more. It'll fail hard if it couldn't do so (i.e. it will no longer attempt to send an unauthenticated request). Once
-// a token source has been created, it'll invoke the grpc pipeline again, this time the grpc.PerRPCCredentials should
-// be able to find and acquire a valid AccessToken to annotate the request with.
-func NewAuthInterceptor(cfg *Config, tokenCache cache.TokenCache, credentialsFuture *PerRPCCredentialsFuture) grpc.UnaryClientInterceptor {
- return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
- err := invoker(ctx, method, req, reply, cc, opts...)
- if err != nil {
- logger.Debugf(ctx, "Request failed due to [%v]. If it's an unauthenticated error, we will attempt to establish an authenticated context.", err)
-
- if st, ok := status.FromError(err); ok {
- // If the error we receive from executing the request expects
- if shouldAttemptToAuthenticate(st.Code()) {
- logger.Debugf(ctx, "Request failed due to [%v]. Attempting to establish an authenticated connection and trying again.", st.Code())
- newErr := MaterializeCredentials(ctx, cfg, tokenCache, credentialsFuture)
- if newErr != nil {
- return fmt.Errorf("authentication error! Original Error: %v, Auth Error: %w", err, newErr)
- }
-
- return invoker(ctx, method, req, reply, cc, opts...)
- }
- }
- }
-
- return err
- }
-}
diff --git a/flyteidl/clients/go/admin/auth_interceptor_test.go b/flyteidl/clients/go/admin/auth_interceptor_test.go
deleted file mode 100644
index d5e07a713..000000000
--- a/flyteidl/clients/go/admin/auth_interceptor_test.go
+++ /dev/null
@@ -1,283 +0,0 @@
-package admin
-
-import (
- "context"
- "errors"
- "fmt"
- "io"
- "net"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strings"
- "sync"
- "testing"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
- "k8s.io/apimachinery/pkg/util/rand"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache/mocks"
- adminMocks "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/config"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-// authMetadataServer is a fake AuthMetadataServer that takes in an AuthMetadataServer implementation (usually one
-// initialized through mockery) and starts a local server that uses it to respond to grpc requests.
-type authMetadataServer struct {
- s *httptest.Server
- t testing.TB
- port int
- grpcServer *grpc.Server
- netListener net.Listener
- impl service.AuthMetadataServiceServer
- lck *sync.RWMutex
-}
-
-func (s authMetadataServer) GetOAuth2Metadata(ctx context.Context, in *service.OAuth2MetadataRequest) (*service.OAuth2MetadataResponse, error) {
- return s.impl.GetOAuth2Metadata(ctx, in)
-}
-
-func (s authMetadataServer) GetPublicClientConfig(ctx context.Context, in *service.PublicClientAuthConfigRequest) (*service.PublicClientAuthConfigResponse, error) {
- return s.impl.GetPublicClientConfig(ctx, in)
-}
-
-func (s authMetadataServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- var issuer string
- switch r.URL.Path {
- case "/.well-known/oauth-authorization-server":
- w.Header().Set("Content-Type", "application/json")
- _, err := io.WriteString(w, strings.ReplaceAll(`{
- "issuer": "https://dev-14186422.okta.com",
- "authorization_endpoint": "https://example.com/auth",
- "token_endpoint": "https://example.com/token",
- "jwks_uri": "https://example.com/keys",
- "id_token_signing_alg_values_supported": ["RS256"]
- }`, "ISSUER", issuer))
- if !assert.NoError(s.t, err) {
- s.t.FailNow()
- }
-
- return
- }
-
- http.NotFound(w, r)
-}
-
-func (s *authMetadataServer) Start(_ context.Context) error {
- s.lck.Lock()
- defer s.lck.Unlock()
-
- /***** Set up the server serving channelz service. *****/
- lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", s.port))
- if err != nil {
- return fmt.Errorf("failed to listen on port [%v]: %w", s.port, err)
- }
-
- grpcS := grpc.NewServer()
- service.RegisterAuthMetadataServiceServer(grpcS, s)
- go func() {
- _ = grpcS.Serve(lis)
- //assert.NoError(s.t, err)
- }()
-
- s.grpcServer = grpcS
- s.netListener = lis
-
- s.s = httptest.NewServer(s)
-
- return nil
-}
-
-func (s *authMetadataServer) Close() {
- s.lck.RLock()
- defer s.lck.RUnlock()
-
- s.grpcServer.Stop()
- s.s.Close()
-}
-
-func newAuthMetadataServer(t testing.TB, port int, impl service.AuthMetadataServiceServer) *authMetadataServer {
- return &authMetadataServer{
- port: port,
- t: t,
- impl: impl,
- lck: &sync.RWMutex{},
- }
-}
-
-func Test_newAuthInterceptor(t *testing.T) {
- t.Run("Other Error", func(t *testing.T) {
- f := NewPerRPCCredentialsFuture()
- interceptor := NewAuthInterceptor(&Config{}, &mocks.TokenCache{}, f)
- otherError := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error {
- return status.New(codes.Canceled, "").Err()
- }
-
- assert.Error(t, interceptor(context.Background(), "POST", nil, nil, nil, otherError))
- })
-
- t.Run("Unauthenticated first time, succeed the second time", func(t *testing.T) {
- assert.NoError(t, logger.SetConfig(&logger.Config{
- Level: logger.DebugLevel,
- }))
-
- port := rand.IntnRange(10000, 60000)
- m := &adminMocks.AuthMetadataServiceServer{}
- m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(&service.OAuth2MetadataResponse{
- AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", port),
- TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", port),
- JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", port),
- }, nil)
- m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(&service.PublicClientAuthConfigResponse{
- Scopes: []string{"all"},
- }, nil)
- s := newAuthMetadataServer(t, port, m)
- ctx := context.Background()
- assert.NoError(t, s.Start(ctx))
- defer s.Close()
-
- u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port))
- assert.NoError(t, err)
-
- f := NewPerRPCCredentialsFuture()
- interceptor := NewAuthInterceptor(&Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- }, &mocks.TokenCache{}, f)
- unauthenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error {
- return status.New(codes.Unauthenticated, "").Err()
- }
-
- err = interceptor(ctx, "POST", nil, nil, nil, unauthenticated)
- assert.Error(t, err)
- assert.Truef(t, f.IsInitialized(), "PerRPCCredentialFuture should be initialized")
- assert.False(t, f.Get().RequireTransportSecurity(), "Insecure should be true leading to RequireTLS false")
- })
-
- t.Run("Already authenticated", func(t *testing.T) {
- assert.NoError(t, logger.SetConfig(&logger.Config{
- Level: logger.DebugLevel,
- }))
-
- port := rand.IntnRange(10000, 60000)
- m := &adminMocks.AuthMetadataServiceServer{}
- s := newAuthMetadataServer(t, port, m)
- ctx := context.Background()
- assert.NoError(t, s.Start(ctx))
- defer s.Close()
-
- u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port))
- assert.NoError(t, err)
-
- f := NewPerRPCCredentialsFuture()
- interceptor := NewAuthInterceptor(&Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- }, &mocks.TokenCache{}, f)
- authenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error {
- return nil
- }
-
- err = interceptor(ctx, "POST", nil, nil, nil, authenticated)
- assert.NoError(t, err)
- assert.Falsef(t, f.IsInitialized(), "PerRPCCredentialFuture should not need to be initialized")
- })
-
- t.Run("Other error, doesn't authenticate", func(t *testing.T) {
- assert.NoError(t, logger.SetConfig(&logger.Config{
- Level: logger.DebugLevel,
- }))
-
- port := rand.IntnRange(10000, 60000)
- m := &adminMocks.AuthMetadataServiceServer{}
- m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(&service.OAuth2MetadataResponse{
- AuthorizationEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/authorize", port),
- TokenEndpoint: fmt.Sprintf("http://localhost:%d/oauth2/token", port),
- JwksUri: fmt.Sprintf("http://localhost:%d/oauth2/jwks", port),
- }, nil)
- m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(&service.PublicClientAuthConfigResponse{
- Scopes: []string{"all"},
- }, nil)
-
- s := newAuthMetadataServer(t, port, m)
- ctx := context.Background()
- assert.NoError(t, s.Start(ctx))
- defer s.Close()
-
- u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port))
- assert.NoError(t, err)
-
- f := NewPerRPCCredentialsFuture()
- interceptor := NewAuthInterceptor(&Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- }, &mocks.TokenCache{}, f)
- unauthenticated := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error {
- return status.New(codes.Aborted, "").Err()
- }
-
- err = interceptor(ctx, "POST", nil, nil, nil, unauthenticated)
- assert.Error(t, err)
- assert.Falsef(t, f.IsInitialized(), "PerRPCCredentialFuture should not be initialized")
- })
-}
-
-func TestMaterializeCredentials(t *testing.T) {
- port := rand.IntnRange(10000, 60000)
- t.Run("No oauth2 metadata endpoint or Public client config lookup", func(t *testing.T) {
- m := &adminMocks.AuthMetadataServiceServer{}
- m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata"))
- m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get public client config"))
- s := newAuthMetadataServer(t, port, m)
- ctx := context.Background()
- assert.NoError(t, s.Start(ctx))
- defer s.Close()
-
- u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port))
- assert.NoError(t, err)
-
- f := NewPerRPCCredentialsFuture()
- err = MaterializeCredentials(ctx, &Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", port),
- Scopes: []string{"all"},
- Audience: "http://localhost:30081",
- AuthorizationHeader: "authorization",
- }, &mocks.TokenCache{}, f)
- assert.NoError(t, err)
- })
- t.Run("Failed to fetch client metadata", func(t *testing.T) {
- m := &adminMocks.AuthMetadataServiceServer{}
- m.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata"))
- failedPublicClientConfigLookup := errors.New("expected err")
- m.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, failedPublicClientConfigLookup)
- s := newAuthMetadataServer(t, port, m)
- ctx := context.Background()
- assert.NoError(t, s.Start(ctx))
- defer s.Close()
-
- u, err := url.Parse(fmt.Sprintf("dns:///localhost:%d", port))
- assert.NoError(t, err)
-
- f := NewPerRPCCredentialsFuture()
- err = MaterializeCredentials(ctx, &Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- TokenURL: fmt.Sprintf("http://localhost:%d/api/v1/token", port),
- Scopes: []string{"all"},
- }, &mocks.TokenCache{}, f)
- assert.EqualError(t, err, "failed to fetch client metadata. Error: rpc error: code = Unknown desc = expected err")
- })
-}
diff --git a/flyteidl/clients/go/admin/authtype_enumer.go b/flyteidl/clients/go/admin/authtype_enumer.go
deleted file mode 100644
index 33a816637..000000000
--- a/flyteidl/clients/go/admin/authtype_enumer.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Code generated by "enumer --type=AuthType -json -yaml -trimprefix=AuthType"; DO NOT EDIT.
-
-package admin
-
-import (
- "encoding/json"
- "fmt"
-)
-
-const _AuthTypeName = "ClientSecretPkceExternalCommandDeviceFlow"
-
-var _AuthTypeIndex = [...]uint8{0, 12, 16, 31, 41}
-
-func (i AuthType) String() string {
- if i >= AuthType(len(_AuthTypeIndex)-1) {
- return fmt.Sprintf("AuthType(%d)", i)
- }
- return _AuthTypeName[_AuthTypeIndex[i]:_AuthTypeIndex[i+1]]
-}
-
-var _AuthTypeValues = []AuthType{0, 1, 2, 3}
-
-var _AuthTypeNameToValueMap = map[string]AuthType{
- _AuthTypeName[0:12]: 0,
- _AuthTypeName[12:16]: 1,
- _AuthTypeName[16:31]: 2,
- _AuthTypeName[31:41]: 3,
-}
-
-// AuthTypeString retrieves an enum value from the enum constants string name.
-// Throws an error if the param is not part of the enum.
-func AuthTypeString(s string) (AuthType, error) {
- if val, ok := _AuthTypeNameToValueMap[s]; ok {
- return val, nil
- }
- return 0, fmt.Errorf("%s does not belong to AuthType values", s)
-}
-
-// AuthTypeValues returns all values of the enum
-func AuthTypeValues() []AuthType {
- return _AuthTypeValues
-}
-
-// IsAAuthType returns "true" if the value is listed in the enum definition. "false" otherwise
-func (i AuthType) IsAAuthType() bool {
- for _, v := range _AuthTypeValues {
- if i == v {
- return true
- }
- }
- return false
-}
-
-// MarshalJSON implements the json.Marshaler interface for AuthType
-func (i AuthType) MarshalJSON() ([]byte, error) {
- return json.Marshal(i.String())
-}
-
-// UnmarshalJSON implements the json.Unmarshaler interface for AuthType
-func (i *AuthType) UnmarshalJSON(data []byte) error {
- var s string
- if err := json.Unmarshal(data, &s); err != nil {
- return fmt.Errorf("AuthType should be a string, got %s", data)
- }
-
- var err error
- *i, err = AuthTypeString(s)
- return err
-}
-
-// MarshalYAML implements a YAML Marshaler for AuthType
-func (i AuthType) MarshalYAML() (interface{}, error) {
- return i.String(), nil
-}
-
-// UnmarshalYAML implements a YAML Unmarshaler for AuthType
-func (i *AuthType) UnmarshalYAML(unmarshal func(interface{}) error) error {
- var s string
- if err := unmarshal(&s); err != nil {
- return err
- }
-
- var err error
- *i, err = AuthTypeString(s)
- return err
-}
diff --git a/flyteidl/clients/go/admin/cache/mocks/token_cache.go b/flyteidl/clients/go/admin/cache/mocks/token_cache.go
deleted file mode 100644
index 0af58b381..000000000
--- a/flyteidl/clients/go/admin/cache/mocks/token_cache.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- mock "github.com/stretchr/testify/mock"
- oauth2 "golang.org/x/oauth2"
-)
-
-// TokenCache is an autogenerated mock type for the TokenCache type
-type TokenCache struct {
- mock.Mock
-}
-
-type TokenCache_GetToken struct {
- *mock.Call
-}
-
-func (_m TokenCache_GetToken) Return(_a0 *oauth2.Token, _a1 error) *TokenCache_GetToken {
- return &TokenCache_GetToken{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *TokenCache) OnGetToken() *TokenCache_GetToken {
- c_call := _m.On("GetToken")
- return &TokenCache_GetToken{Call: c_call}
-}
-
-func (_m *TokenCache) OnGetTokenMatch(matchers ...interface{}) *TokenCache_GetToken {
- c_call := _m.On("GetToken", matchers...)
- return &TokenCache_GetToken{Call: c_call}
-}
-
-// GetToken provides a mock function with given fields:
-func (_m *TokenCache) GetToken() (*oauth2.Token, error) {
- ret := _m.Called()
-
- var r0 *oauth2.Token
- if rf, ok := ret.Get(0).(func() *oauth2.Token); ok {
- r0 = rf()
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*oauth2.Token)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type TokenCache_SaveToken struct {
- *mock.Call
-}
-
-func (_m TokenCache_SaveToken) Return(_a0 error) *TokenCache_SaveToken {
- return &TokenCache_SaveToken{Call: _m.Call.Return(_a0)}
-}
-
-func (_m *TokenCache) OnSaveToken(token *oauth2.Token) *TokenCache_SaveToken {
- c_call := _m.On("SaveToken", token)
- return &TokenCache_SaveToken{Call: c_call}
-}
-
-func (_m *TokenCache) OnSaveTokenMatch(matchers ...interface{}) *TokenCache_SaveToken {
- c_call := _m.On("SaveToken", matchers...)
- return &TokenCache_SaveToken{Call: c_call}
-}
-
-// SaveToken provides a mock function with given fields: token
-func (_m *TokenCache) SaveToken(token *oauth2.Token) error {
- ret := _m.Called(token)
-
- var r0 error
- if rf, ok := ret.Get(0).(func(*oauth2.Token) error); ok {
- r0 = rf(token)
- } else {
- r0 = ret.Error(0)
- }
-
- return r0
-}
diff --git a/flyteidl/clients/go/admin/cache/token_cache.go b/flyteidl/clients/go/admin/cache/token_cache.go
deleted file mode 100644
index e4e2b7e17..000000000
--- a/flyteidl/clients/go/admin/cache/token_cache.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package cache
-
-import "golang.org/x/oauth2"
-
-//go:generate mockery -all -case=underscore
-
-// TokenCache defines the interface needed to cache and retrieve oauth tokens.
-type TokenCache interface {
- // SaveToken saves the token securely to cache.
- SaveToken(token *oauth2.Token) error
-
- // Retrieves the token from the cache.
- GetToken() (*oauth2.Token, error)
-}
diff --git a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go b/flyteidl/clients/go/admin/cache/token_cache_inmemory.go
deleted file mode 100644
index 9c6223fc0..000000000
--- a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package cache
-
-import (
- "fmt"
-
- "golang.org/x/oauth2"
-)
-
-type TokenCacheInMemoryProvider struct {
- token *oauth2.Token
-}
-
-func (t *TokenCacheInMemoryProvider) SaveToken(token *oauth2.Token) error {
- t.token = token
- return nil
-}
-
-func (t TokenCacheInMemoryProvider) GetToken() (*oauth2.Token, error) {
- if t.token == nil {
- return nil, fmt.Errorf("cannot find token in cache")
- }
-
- return t.token, nil
-}
diff --git a/flyteidl/clients/go/admin/cert_loader.go b/flyteidl/clients/go/admin/cert_loader.go
deleted file mode 100644
index 2c17c60ee..000000000
--- a/flyteidl/clients/go/admin/cert_loader.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package admin
-
-import (
- "fmt"
- "io/ioutil"
-
- "crypto/x509"
-)
-
-// readCACerts from the passed in file at certLoc and return certpool.
-func readCACerts(certLoc string) (*x509.CertPool, error) {
- rootPEM, err := ioutil.ReadFile(certLoc)
- if err != nil {
- return nil, fmt.Errorf("unable to read from %v file due to %v", certLoc, err)
- }
- rootCertPool := x509.NewCertPool()
- ok := rootCertPool.AppendCertsFromPEM(rootPEM)
- if !ok {
- return nil, fmt.Errorf("failed to parse root certificate file %v due to %v", certLoc, err)
- }
- return rootCertPool, err
-}
diff --git a/flyteidl/clients/go/admin/cert_loader_test.go b/flyteidl/clients/go/admin/cert_loader_test.go
deleted file mode 100644
index ea0ff19c2..000000000
--- a/flyteidl/clients/go/admin/cert_loader_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package admin
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestReadCACerts(t *testing.T) {
-
- t.Run("legal", func(t *testing.T) {
- x509Pool, err := readCACerts("testdata/root.pem")
- assert.NoError(t, err)
- assert.NotNil(t, x509Pool)
- })
-
- t.Run("illegal", func(t *testing.T) {
- x509Pool, err := readCACerts("testdata/invalid-root.pem")
- assert.NotNil(t, err)
- assert.Nil(t, x509Pool)
- })
-
- t.Run("non-existent", func(t *testing.T) {
- x509Pool, err := readCACerts("testdata/non-existent.pem")
- assert.NotNil(t, err)
- assert.Nil(t, x509Pool)
- })
-}
diff --git a/flyteidl/clients/go/admin/client.go b/flyteidl/clients/go/admin/client.go
deleted file mode 100644
index 830c86fe8..000000000
--- a/flyteidl/clients/go/admin/client.go
+++ /dev/null
@@ -1,223 +0,0 @@
-package admin
-
-import (
- "context"
- "crypto/tls"
- "crypto/x509"
- "errors"
- "fmt"
-
- grpcRetry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
- grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials"
- "google.golang.org/grpc/health/grpc_health_v1"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-// IDE "Go Generate File". This will create a mocks/AdminServiceClient.go file
-//go:generate mockery -dir ../../../gen/pb-go/flyteidl/service -name AdminServiceClient -output ../admin/mocks
-
-// Clientset contains the clients exposed to communicate with various admin services.
-type Clientset struct {
- adminServiceClient service.AdminServiceClient
- authMetadataServiceClient service.AuthMetadataServiceClient
- healthServiceClient grpc_health_v1.HealthClient
- identityServiceClient service.IdentityServiceClient
- dataProxyServiceClient service.DataProxyServiceClient
- signalServiceClient service.SignalServiceClient
-}
-
-// AdminClient retrieves the AdminServiceClient
-func (c Clientset) AdminClient() service.AdminServiceClient {
- return c.adminServiceClient
-}
-
-// AuthMetadataClient retrieves the AuthMetadataServiceClient
-func (c Clientset) AuthMetadataClient() service.AuthMetadataServiceClient {
- return c.authMetadataServiceClient
-}
-
-// HealthServiceClient retrieves the grpc_health_v1.HealthClient
-func (c Clientset) HealthServiceClient() grpc_health_v1.HealthClient {
- return c.healthServiceClient
-}
-
-func (c Clientset) IdentityClient() service.IdentityServiceClient {
- return c.identityServiceClient
-}
-
-func (c Clientset) DataProxyClient() service.DataProxyServiceClient {
- return c.dataProxyServiceClient
-}
-
-func (c Clientset) SignalServiceClient() service.SignalServiceClient {
- return c.signalServiceClient
-}
-
-func NewAdminClient(ctx context.Context, conn *grpc.ClientConn) service.AdminServiceClient {
- logger.Infof(ctx, "Initialized Admin client")
- return service.NewAdminServiceClient(conn)
-}
-
-func GetAdditionalAdminClientConfigOptions(cfg *Config) []grpc.DialOption {
- opts := make([]grpc.DialOption, 0, 2)
- backoffConfig := grpc.BackoffConfig{
- MaxDelay: cfg.MaxBackoffDelay.Duration,
- }
-
- opts = append(opts, grpc.WithBackoffConfig(backoffConfig))
-
- timeoutDialOption := grpcRetry.WithPerRetryTimeout(cfg.PerRetryTimeout.Duration)
- maxRetriesOption := grpcRetry.WithMax(uint(cfg.MaxRetries))
- retryInterceptor := grpcRetry.UnaryClientInterceptor(timeoutDialOption, maxRetriesOption)
-
- // We only make unary calls in this client, no streaming calls. We can add a streaming interceptor if admin
- // ever has those endpoints
- opts = append(opts, grpc.WithChainUnaryInterceptor(grpcPrometheus.UnaryClientInterceptor, retryInterceptor))
-
- return opts
-}
-
-// This retrieves a DialOption that contains a source for generating JWTs for authentication with Flyte Admin. If
-// the token endpoint is set in the config, that will be used, otherwise it'll attempt to make a metadata call.
-func getAuthenticationDialOption(ctx context.Context, cfg *Config, tokenSourceProvider TokenSourceProvider,
- authClient service.AuthMetadataServiceClient) (grpc.DialOption, error) {
- if tokenSourceProvider == nil {
- return nil, errors.New("can't create authenticated channel without a TokenSourceProvider")
- }
-
- authorizationMetadataKey := cfg.AuthorizationHeader
- if len(authorizationMetadataKey) == 0 {
- clientMetadata, err := authClient.GetPublicClientConfig(ctx, &service.PublicClientAuthConfigRequest{})
- if err != nil {
- return nil, fmt.Errorf("failed to fetch client metadata. Error: %v", err)
- }
- authorizationMetadataKey = clientMetadata.AuthorizationMetadataKey
- }
-
- tokenSource, err := tokenSourceProvider.GetTokenSource(ctx)
- if err != nil {
- return nil, err
- }
-
- wrappedTokenSource := NewCustomHeaderTokenSource(tokenSource, cfg.UseInsecureConnection, authorizationMetadataKey)
- return grpc.WithPerRPCCredentials(wrappedTokenSource), nil
-}
-
-// InitializeAuthMetadataClient creates a new anonymously Auth Metadata Service client.
-func InitializeAuthMetadataClient(ctx context.Context, cfg *Config) (client service.AuthMetadataServiceClient, err error) {
- // Create an unauthenticated connection to fetch AuthMetadata
- authMetadataConnection, err := NewAdminConnection(ctx, cfg)
- if err != nil {
- return nil, fmt.Errorf("failed to initialized admin connection. Error: %w", err)
- }
-
- return service.NewAuthMetadataServiceClient(authMetadataConnection), nil
-}
-
-func NewAdminConnection(ctx context.Context, cfg *Config, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
- if opts == nil {
- // Initialize opts list to the potential number of options we will add. Initialization optimizes memory
- // allocation.
- opts = make([]grpc.DialOption, 0, 5)
- }
-
- if cfg.UseInsecureConnection {
- opts = append(opts, grpc.WithInsecure())
- } else {
- var creds credentials.TransportCredentials
- var caCerts *x509.CertPool
- var err error
- tlsConfig := &tls.Config{} //nolint
- // Use the cacerts passed in from the config parameter
- if len(cfg.CACertFilePath) > 0 {
- caCerts, err = readCACerts(cfg.CACertFilePath)
- if err != nil {
- return nil, err
- }
- }
- if cfg.InsecureSkipVerify {
- logger.Warnf(ctx, "using insecureSkipVerify. Server's certificate chain and host name wont be verified. Caution : shouldn't be used for production usecases")
- tlsConfig.InsecureSkipVerify = true
- creds = credentials.NewTLS(tlsConfig)
- } else {
- creds = credentials.NewClientTLSFromCert(caCerts, "")
- }
- opts = append(opts, grpc.WithTransportCredentials(creds))
- }
-
- opts = append(opts, GetAdditionalAdminClientConfigOptions(cfg)...)
-
- return grpc.Dial(cfg.Endpoint.String(), opts...)
-}
-
-// InitializeAdminClient creates an AdminClient with a shared Admin connection for the process
-// Deprecated: Please use initializeClients instead.
-func InitializeAdminClient(ctx context.Context, cfg *Config, opts ...grpc.DialOption) service.AdminServiceClient {
- set, err := initializeClients(ctx, cfg, nil, opts...)
- if err != nil {
- logger.Panicf(ctx, "Failed to initialized client. Error: %v", err)
- return nil
- }
-
- return set.AdminClient()
-}
-
-// initializeClients creates an AdminClient, AuthServiceClient and IdentityServiceClient with a shared Admin connection
-// for the process. Note that if called with different cfg/dialoptions, it will not refresh the connection.
-func initializeClients(ctx context.Context, cfg *Config, tokenCache cache.TokenCache, opts ...grpc.DialOption) (*Clientset, error) {
- credentialsFuture := NewPerRPCCredentialsFuture()
- opts = append(opts,
- grpc.WithChainUnaryInterceptor(NewAuthInterceptor(cfg, tokenCache, credentialsFuture)),
- grpc.WithPerRPCCredentials(credentialsFuture))
-
- if cfg.DefaultServiceConfig != "" {
- opts = append(opts, grpc.WithDefaultServiceConfig(cfg.DefaultServiceConfig))
- }
-
- adminConnection, err := NewAdminConnection(ctx, cfg, opts...)
- if err != nil {
- logger.Panicf(ctx, "failed to initialized Admin connection. Err: %s", err.Error())
- }
-
- var cs Clientset
- cs.adminServiceClient = NewAdminClient(ctx, adminConnection)
- cs.authMetadataServiceClient = service.NewAuthMetadataServiceClient(adminConnection)
- cs.identityServiceClient = service.NewIdentityServiceClient(adminConnection)
- cs.healthServiceClient = grpc_health_v1.NewHealthClient(adminConnection)
- cs.dataProxyServiceClient = service.NewDataProxyServiceClient(adminConnection)
- cs.signalServiceClient = service.NewSignalServiceClient(adminConnection)
-
- return &cs, nil
-}
-
-// Deprecated: Please use NewClientsetBuilder() instead.
-func InitializeAdminClientFromConfig(ctx context.Context, tokenCache cache.TokenCache, opts ...grpc.DialOption) (service.AdminServiceClient, error) {
- clientSet, err := initializeClients(ctx, GetConfig(ctx), tokenCache, opts...)
- if err != nil {
- return nil, err
- }
-
- return clientSet.AdminClient(), nil
-}
-
-func InitializeMockAdminClient() service.AdminServiceClient {
- logger.Infof(context.TODO(), "Initialized Mock Admin client")
- return &mocks.AdminServiceClient{}
-}
-
-func InitializeMockClientset() *Clientset {
- logger.Infof(context.TODO(), "Initialized Mock Clientset")
- return &Clientset{
- adminServiceClient: &mocks.AdminServiceClient{},
- authMetadataServiceClient: &mocks.AuthMetadataServiceClient{},
- identityServiceClient: &mocks.IdentityServiceClient{},
- dataProxyServiceClient: &mocks.DataProxyServiceClient{},
- healthServiceClient: grpc_health_v1.NewHealthClient(nil),
- }
-}
diff --git a/flyteidl/clients/go/admin/client_builder.go b/flyteidl/clients/go/admin/client_builder.go
deleted file mode 100644
index a16480739..000000000
--- a/flyteidl/clients/go/admin/client_builder.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package admin
-
-import (
- "context"
-
- "google.golang.org/grpc"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
-)
-
-// ClientsetBuilder is used to build the clientset. This allows custom token cache implementations to be plugged in.
-type ClientsetBuilder struct {
- config *Config
- tokenCache cache.TokenCache
- opts []grpc.DialOption
-}
-
-// ClientSetBuilder is constructor function to be used by the clients in interacting with the builder
-func ClientSetBuilder() *ClientsetBuilder {
- return &ClientsetBuilder{}
-}
-
-// WithConfig provides the admin config to be used for constructing the clientset
-func (cb *ClientsetBuilder) WithConfig(config *Config) *ClientsetBuilder {
- cb.config = config
- return cb
-}
-
-// WithTokenCache allows pluggable token cache implemetations. eg; flytectl uses keyring as tokenCache
-func (cb *ClientsetBuilder) WithTokenCache(tokenCache cache.TokenCache) *ClientsetBuilder {
- cb.tokenCache = tokenCache
- return cb
-}
-
-func (cb *ClientsetBuilder) WithDialOptions(opts ...grpc.DialOption) *ClientsetBuilder {
- cb.opts = opts
- return cb
-}
-
-// Build the clientset using the current state of the ClientsetBuilder
-func (cb *ClientsetBuilder) Build(ctx context.Context) (*Clientset, error) {
- if cb.tokenCache == nil {
- cb.tokenCache = &cache.TokenCacheInMemoryProvider{}
- }
-
- if cb.config == nil {
- cb.config = GetConfig(ctx)
- }
-
- return initializeClients(ctx, cb.config, cb.tokenCache, cb.opts...)
-}
-
-func NewClientsetBuilder() *ClientsetBuilder {
- return &ClientsetBuilder{}
-}
diff --git a/flyteidl/clients/go/admin/client_builder_test.go b/flyteidl/clients/go/admin/client_builder_test.go
deleted file mode 100644
index 1067579b4..000000000
--- a/flyteidl/clients/go/admin/client_builder_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package admin
-
-import (
- "context"
- "reflect"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
-)
-
-func TestClientsetBuilder_Build(t *testing.T) {
- cb := NewClientsetBuilder().WithConfig(&Config{
- UseInsecureConnection: true,
- }).WithTokenCache(&cache.TokenCacheInMemoryProvider{})
- _, err := cb.Build(context.Background())
- assert.NoError(t, err)
- assert.True(t, reflect.TypeOf(cb.tokenCache) == reflect.TypeOf(&cache.TokenCacheInMemoryProvider{}))
-}
diff --git a/flyteidl/clients/go/admin/client_test.go b/flyteidl/clients/go/admin/client_test.go
deleted file mode 100644
index 017f4e8ff..000000000
--- a/flyteidl/clients/go/admin/client_test.go
+++ /dev/null
@@ -1,360 +0,0 @@
-package admin
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "os"
- "testing"
- "time"
-
- "github.com/jinzhu/copier"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
- "golang.org/x/oauth2"
- _ "google.golang.org/grpc/balancer/roundrobin" //nolint
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- cachemocks "github.com/flyteorg/flyteidl/clients/go/admin/cache/mocks"
- "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
- "github.com/flyteorg/flyteidl/clients/go/admin/pkce"
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/config"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-func TestInitializeAndGetAdminClient(t *testing.T) {
-
- ctx := context.TODO()
- t.Run("legal", func(t *testing.T) {
- u, err := url.Parse("http://localhost:8089")
- assert.NoError(t, err)
- assert.NotNil(t, InitializeAdminClient(ctx, &Config{
- Endpoint: config.URL{URL: *u},
- }))
- })
-}
-
-func TestInitializeMockClientset(t *testing.T) {
- c := InitializeMockClientset()
- assert.NotNil(t, c)
- assert.NotNil(t, c.adminServiceClient)
- assert.NotNil(t, c.authMetadataServiceClient)
-}
-
-func TestInitializeMockAdminClient(t *testing.T) {
- c := InitializeMockAdminClient()
- assert.NotNil(t, c)
-}
-
-func TestGetAdditionalAdminClientConfigOptions(t *testing.T) {
- u, _ := url.Parse("localhost:8089")
- adminServiceConfig := &Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- PerRetryTimeout: config.Duration{Duration: 1 * time.Second},
- }
-
- assert.NoError(t, SetConfig(adminServiceConfig))
-
- ctx := context.Background()
- t.Run("legal", func(t *testing.T) {
- u, err := url.Parse("http://localhost:8089")
- assert.NoError(t, err)
- clientSet, err := ClientSetBuilder().WithConfig(&Config{Endpoint: config.URL{URL: *u}}).Build(ctx)
- assert.NoError(t, err)
- assert.NotNil(t, clientSet)
- assert.NotNil(t, clientSet.AdminClient())
- assert.NotNil(t, clientSet.AuthMetadataClient())
- assert.NotNil(t, clientSet.IdentityClient())
- assert.NotNil(t, clientSet.HealthServiceClient())
- })
-
- t.Run("legal-from-config", func(t *testing.T) {
- clientSet, err := initializeClients(ctx, &Config{InsecureSkipVerify: true}, nil)
- assert.NoError(t, err)
- assert.NotNil(t, clientSet)
- assert.NotNil(t, clientSet.AuthMetadataClient())
- assert.NotNil(t, clientSet.AdminClient())
- assert.NotNil(t, clientSet.HealthServiceClient())
- })
- t.Run("legal-from-config-with-cacerts", func(t *testing.T) {
- clientSet, err := initializeClients(ctx, &Config{CACertFilePath: "testdata/root.pem"}, nil)
- assert.NoError(t, err)
- assert.NotNil(t, clientSet)
- assert.NotNil(t, clientSet.AuthMetadataClient())
- assert.NotNil(t, clientSet.AdminClient())
- })
- t.Run("legal-from-config-with-invalid-cacerts", func(t *testing.T) {
- defer func() {
- if r := recover(); r == nil {
- t.Errorf("The code did not panic")
- }
- }()
- newAdminServiceConfig := &Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: false,
- CACertFilePath: "testdata/non-existent.pem",
- PerRetryTimeout: config.Duration{Duration: 1 * time.Second},
- }
-
- assert.NoError(t, SetConfig(newAdminServiceConfig))
- clientSet, err := initializeClients(ctx, newAdminServiceConfig, nil)
- assert.NotNil(t, err)
- assert.Nil(t, clientSet)
- })
-}
-
-func TestGetAuthenticationDialOptionClientSecret(t *testing.T) {
- ctx := context.Background()
-
- u, _ := url.Parse("localhost:8089")
- adminServiceConfig := &Config{
- ClientSecretLocation: "testdata/secret_key",
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- PerRetryTimeout: config.Duration{Duration: 1 * time.Second},
- }
- t.Run("legal", func(t *testing.T) {
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "http://localhost:8089/token",
- ScopesSupported: []string{"code", "all"},
- }
- clientMetatadata := &service.PublicClientAuthConfigResponse{
- AuthorizationMetadataKey: "flyte_authorization",
- }
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
- dialOption, err := getAuthenticationDialOption(ctx, adminServiceConfig, nil, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
- t.Run("legal-no-external-calls", func(t *testing.T) {
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata"))
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get public client config"))
- var adminCfg Config
- err := copier.Copy(&adminCfg, adminServiceConfig)
- assert.NoError(t, err)
- adminCfg.TokenURL = "http://localhost:1000/api/v1/token"
- adminCfg.Scopes = []string{"all"}
- adminCfg.AuthorizationHeader = "authorization"
- dialOption, err := getAuthenticationDialOption(ctx, &adminCfg, nil, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
- t.Run("error during oauth2Metatdata", func(t *testing.T) {
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed"))
- dialOption, err := getAuthenticationDialOption(ctx, adminServiceConfig, nil, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
- t.Run("error during public client config", func(t *testing.T) {
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(nil, errors.New("unexpected call to get oauth2 metadata"))
- failedPublicClientConfigLookup := errors.New("expected err")
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, failedPublicClientConfigLookup)
- var adminCfg Config
- err := copier.Copy(&adminCfg, adminServiceConfig)
- assert.NoError(t, err)
- adminCfg.TokenURL = "http://localhost:1000/api/v1/token"
- adminCfg.Scopes = []string{"all"}
- tokenProvider := ClientCredentialsTokenSourceProvider{}
- dialOption, err := getAuthenticationDialOption(ctx, &adminCfg, tokenProvider, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.EqualError(t, err, "failed to fetch client metadata. Error: expected err")
- })
- t.Run("error during flyte client", func(t *testing.T) {
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "/token",
- ScopesSupported: []string{"code", "all"},
- }
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed"))
- dialOption, err := getAuthenticationDialOption(ctx, adminServiceConfig, nil, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
- incorrectSecretLocConfig := &Config{
- ClientSecretLocation: "testdata/secret_key_invalid",
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypeClientSecret,
- PerRetryTimeout: config.Duration{Duration: 1 * time.Second},
- }
- t.Run("incorrect client secret loc", func(t *testing.T) {
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "http://localhost:8089/token",
- ScopesSupported: []string{"code", "all"},
- }
- clientMetatadata := &service.PublicClientAuthConfigResponse{
- AuthorizationMetadataKey: "flyte_authorization",
- }
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
- dialOption, err := getAuthenticationDialOption(ctx, incorrectSecretLocConfig, nil, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
-}
-
-func TestGetAuthenticationDialOptionPkce(t *testing.T) {
- ctx := context.Background()
-
- u, _ := url.Parse("localhost:8089")
- adminServiceConfig := &Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: true,
- AuthType: AuthTypePkce,
- PerRetryTimeout: config.Duration{Duration: 1 * time.Second},
- }
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "http://localhost:8089/token",
- ScopesSupported: []string{"code", "all"},
- }
- clientMetatadata := &service.PublicClientAuthConfigResponse{
- AuthorizationMetadataKey: "flyte_authorization",
- RedirectUri: "http://localhost:54545/callback",
- }
- http.DefaultServeMux = http.NewServeMux()
- plan, _ := os.ReadFile("tokenorchestrator/testdata/token.json")
- var tokenData oauth2.Token
- err := json.Unmarshal(plan, &tokenData)
- assert.NoError(t, err)
- tokenData.Expiry = time.Now().Add(time.Minute)
- t.Run("cache hit", func(t *testing.T) {
- mockTokenCache := new(cachemocks.TokenCache)
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockTokenCache.OnGetTokenMatch().Return(&tokenData, nil)
- mockTokenCache.OnSaveTokenMatch(mock.Anything).Return(nil)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
- tokenSourceProvider, err := NewTokenSourceProvider(ctx, adminServiceConfig, mockTokenCache, mockAuthClient)
- assert.Nil(t, err)
- dialOption, err := getAuthenticationDialOption(ctx, adminServiceConfig, tokenSourceProvider, mockAuthClient)
- assert.NotNil(t, dialOption)
- assert.Nil(t, err)
- })
- tokenData.Expiry = time.Now().Add(-time.Minute)
- t.Run("cache miss auth failure", func(t *testing.T) {
- mockTokenCache := new(cachemocks.TokenCache)
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockTokenCache.OnGetTokenMatch().Return(&tokenData, nil)
- mockTokenCache.OnSaveTokenMatch(mock.Anything).Return(nil)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
- tokenSourceProvider, err := NewTokenSourceProvider(ctx, adminServiceConfig, mockTokenCache, mockAuthClient)
- assert.Nil(t, err)
- dialOption, err := getAuthenticationDialOption(ctx, adminServiceConfig, tokenSourceProvider, mockAuthClient)
- assert.Nil(t, dialOption)
- assert.NotNil(t, err)
- })
-}
-
-func Test_getPkceAuthTokenSource(t *testing.T) {
- ctx := context.Background()
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "http://localhost:8089/token",
- ScopesSupported: []string{"code", "all"},
- }
-
- clientMetatadata := &service.PublicClientAuthConfigResponse{
- AuthorizationMetadataKey: "flyte_authorization",
- RedirectUri: "http://localhost:54546/callback",
- }
-
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
-
- t.Run("cached token expired", func(t *testing.T) {
- plan, _ := ioutil.ReadFile("tokenorchestrator/testdata/token.json")
- var tokenData oauth2.Token
- err := json.Unmarshal(plan, &tokenData)
- assert.NoError(t, err)
-
- // populate the cache
- tokenCache := &cache.TokenCacheInMemoryProvider{}
- assert.NoError(t, tokenCache.SaveToken(&tokenData))
-
- baseOrchestrator := tokenorchestrator.BaseTokenOrchestrator{
- ClientConfig: &oauth.Config{
- Config: &oauth2.Config{
- RedirectURL: "http://localhost:8089/redirect",
- Scopes: []string{"code", "all"},
- },
- },
- TokenCache: tokenCache,
- }
-
- orchestrator, err := pkce.NewTokenOrchestrator(baseOrchestrator, pkce.Config{})
- assert.NoError(t, err)
-
- http.DefaultServeMux = http.NewServeMux()
- dialOption, err := GetPKCEAuthTokenSource(ctx, orchestrator)
- assert.Nil(t, dialOption)
- assert.Error(t, err)
- })
-}
-
-func TestGetDefaultServiceConfig(t *testing.T) {
- u, _ := url.Parse("localhost:8089")
- adminServiceConfig := &Config{
- Endpoint: config.URL{URL: *u},
- DefaultServiceConfig: `{"loadBalancingConfig": [{"round_robin":{}}]}`,
- }
-
- assert.NoError(t, SetConfig(adminServiceConfig))
-
- ctx := context.Background()
- t.Run("legal", func(t *testing.T) {
- u, err := url.Parse("http://localhost:8089")
- assert.NoError(t, err)
- clientSet, err := ClientSetBuilder().WithConfig(&Config{Endpoint: config.URL{URL: *u}, DefaultServiceConfig: `{"loadBalancingConfig": [{"round_robin":{}}]}`}).Build(ctx)
- assert.NoError(t, err)
- assert.NotNil(t, clientSet)
- assert.NotNil(t, clientSet.AdminClient())
- assert.NotNil(t, clientSet.AuthMetadataClient())
- assert.NotNil(t, clientSet.IdentityClient())
- assert.NotNil(t, clientSet.HealthServiceClient())
- })
- t.Run("illegal default service config", func(t *testing.T) {
- defer func() {
- if r := recover(); r == nil {
- t.Errorf("The code did not panic")
- }
- }()
-
- u, err := url.Parse("http://localhost:8089")
- assert.NoError(t, err)
- clientSet, err := ClientSetBuilder().WithConfig(&Config{Endpoint: config.URL{URL: *u}, DefaultServiceConfig: `{"loadBalancingConfig": [{"foo":{}}]}`}).Build(ctx)
- assert.Error(t, err)
- assert.Nil(t, clientSet)
- })
-}
-
-func ExampleClientSetBuilder() {
- ctx := context.Background()
- // Create a client set that initializes the connection with flyte admin and sets up Auth (if needed).
- // See AuthType for a list of supported authentication types.
- clientSet, err := NewClientsetBuilder().WithConfig(GetConfig(ctx)).Build(ctx)
- if err != nil {
- logger.Fatalf(ctx, "failed to initialized clientSet from config. Error: %v", err)
- }
-
- // Access and use the desired client:
- _ = clientSet.AdminClient()
- _ = clientSet.AuthMetadataClient()
- _ = clientSet.IdentityClient()
-}
diff --git a/flyteidl/clients/go/admin/config.go b/flyteidl/clients/go/admin/config.go
deleted file mode 100644
index dd0652606..000000000
--- a/flyteidl/clients/go/admin/config.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Initializes an Admin Client that exposes all implemented services by FlyteAdmin server. The library supports different
-// authentication flows (see AuthType). It initializes the grpc connection once and reuses it. A grpc load balancing policy
-// can be configured as well.
-package admin
-
-import (
- "context"
- "path/filepath"
- "time"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/deviceflow"
- "github.com/flyteorg/flyteidl/clients/go/admin/pkce"
- "github.com/flyteorg/flytestdlib/config"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-//go:generate pflags Config --default-var=defaultConfig
-
-const (
- configSectionKey = "admin"
- DefaultClientID = "flytepropeller"
-)
-
-var DefaultClientSecretLocation = filepath.Join(string(filepath.Separator), "etc", "secrets", "client_secret")
-
-//go:generate enumer --type=AuthType -json -yaml -trimprefix=AuthType
-type AuthType uint8
-
-const (
- // AuthTypeClientSecret Chooses Client Secret OAuth2 protocol (ref: https://tools.ietf.org/html/rfc6749#section-4.4)
- AuthTypeClientSecret AuthType = iota
- // AuthTypePkce Chooses Proof Key Code Exchange OAuth2 extension protocol (ref: https://tools.ietf.org/html/rfc7636)
- AuthTypePkce
- // AuthTypeExternalCommand Chooses an external authentication process
- AuthTypeExternalCommand
- // AuthTypeDeviceFlow Uses device flow to authenticate in a constrained environment with no access to browser
- AuthTypeDeviceFlow
-)
-
-type Config struct {
- Endpoint config.URL `json:"endpoint" pflag:",For admin types, specify where the uri of the service is located."`
- UseInsecureConnection bool `json:"insecure" pflag:",Use insecure connection."`
- InsecureSkipVerify bool `json:"insecureSkipVerify" pflag:",InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases'"`
- CACertFilePath string `json:"caCertFilePath" pflag:",Use specified certificate file to verify the admin server peer."`
- MaxBackoffDelay config.Duration `json:"maxBackoffDelay" pflag:",Max delay for grpc backoff"`
- PerRetryTimeout config.Duration `json:"perRetryTimeout" pflag:",gRPC per retry timeout"`
- MaxRetries int `json:"maxRetries" pflag:",Max number of gRPC retries"`
- AuthType AuthType `json:"authType" pflag:",Type of OAuth2 flow used for communicating with admin.ClientSecret,Pkce,ExternalCommand are valid values"`
- TokenRefreshWindow config.Duration `json:"tokenRefreshWindow" pflag:",Max duration between token refresh attempt and token expiry."`
- // Deprecated: settings will be discovered dynamically
- DeprecatedUseAuth bool `json:"useAuth" pflag:",Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information."`
- ClientID string `json:"clientId" pflag:",Client ID"`
- ClientSecretLocation string `json:"clientSecretLocation" pflag:",File containing the client secret"`
- ClientSecretEnvVar string `json:"clientSecretEnvVar" pflag:",Environment variable containing the client secret"`
- Scopes []string `json:"scopes" pflag:",List of scopes to request"`
- UseAudienceFromAdmin bool `json:"useAudienceFromAdmin" pflag:",Use Audience configured from admins public endpoint config."`
- Audience string `json:"audience" pflag:",Audience to use when initiating OAuth2 authorization requests."`
-
- // There are two ways to get the token URL. If the authorization server url is provided, the client will try to use RFC 8414 to
- // try to get the token URL. Or it can be specified directly through TokenURL config.
- // Deprecated: This will now be discovered through admin's anonymously accessible metadata.
- DeprecatedAuthorizationServerURL string `json:"authorizationServerUrl" pflag:",This is the URL to your IdP's authorization server. It'll default to Endpoint"`
- // If not provided, it'll be discovered through admin's anonymously accessible metadata endpoint.
- TokenURL string `json:"tokenUrl" pflag:",OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided."`
-
- // See the implementation of the 'grpcAuthorizationHeader' option in Flyte Admin for more information. But
- // basically we want to be able to use a different string to pass the token from this client to the the Admin service
- // because things might be running in a service mesh (like Envoy) that already uses the default 'authorization' header
- AuthorizationHeader string `json:"authorizationHeader" pflag:",Custom metadata header to pass JWT"`
-
- PkceConfig pkce.Config `json:"pkceConfig" pflag:",Config for Pkce authentication flow."`
-
- DeviceFlowConfig deviceflow.Config `json:"deviceFlowConfig" pflag:",Config for Device authentication flow."`
-
- Command []string `json:"command" pflag:",Command for external authentication token generation"`
-
- // Set the gRPC service config formatted as a json string https://github.com/grpc/grpc/blob/master/doc/service_config.md
- // eg. {"loadBalancingConfig": [{"round_robin":{}}], "methodConfig": [{"name":[{"service": "foo", "method": "bar"}, {"service": "baz"}], "timeout": "1.000000001s"}]}
- // find the full schema here https://github.com/grpc/grpc-proto/blob/master/grpc/service_config/service_config.proto#L625
- // Note that required packages may need to be preloaded to support certain service config. For example "google.golang.org/grpc/balancer/roundrobin" should be preloaded to have round-robin policy supported.
- DefaultServiceConfig string `json:"defaultServiceConfig" pdflag:",Set the default service config for the admin gRPC client"`
-}
-
-var (
- defaultConfig = Config{
- MaxBackoffDelay: config.Duration{Duration: 8 * time.Second},
- PerRetryTimeout: config.Duration{Duration: 15 * time.Second},
- MaxRetries: 4,
- ClientID: DefaultClientID,
- AuthType: AuthTypeClientSecret,
- ClientSecretLocation: DefaultClientSecretLocation,
- PkceConfig: pkce.Config{
- TokenRefreshGracePeriod: config.Duration{Duration: 5 * time.Minute},
- BrowserSessionTimeout: config.Duration{Duration: 2 * time.Minute},
- },
- DeviceFlowConfig: deviceflow.Config{
- TokenRefreshGracePeriod: config.Duration{Duration: 5 * time.Minute},
- Timeout: config.Duration{Duration: 10 * time.Minute},
- PollInterval: config.Duration{Duration: 5 * time.Second},
- },
- TokenRefreshWindow: config.Duration{Duration: 0},
- }
-
- configSection = config.MustRegisterSectionWithUpdates(configSectionKey, &defaultConfig, func(ctx context.Context, newValue config.Config) {
- if newValue.(*Config).MaxRetries < 0 {
- logger.Panicf(ctx, "Admin configuration given with negative gRPC retry value.")
- }
- })
-)
-
-func GetConfig(ctx context.Context) *Config {
- if c, ok := configSection.GetConfig().(*Config); ok {
- return c
- }
-
- logger.Warnf(ctx, "Failed to retrieve config section [%v].", configSectionKey)
- return nil
-}
-
-func SetConfig(cfg *Config) error {
- return configSection.SetConfig(cfg)
-}
diff --git a/flyteidl/clients/go/admin/config_flags.go b/flyteidl/clients/go/admin/config_flags.go
deleted file mode 100755
index 53a6a4421..000000000
--- a/flyteidl/clients/go/admin/config_flags.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Code generated by go generate; DO NOT EDIT.
-// This file was generated by robots.
-
-package admin
-
-import (
- "encoding/json"
- "reflect"
-
- "fmt"
-
- "github.com/spf13/pflag"
-)
-
-// If v is a pointer, it will get its element value or the zero value of the element type.
-// If v is not a pointer, it will return it as is.
-func (Config) elemValueOrNil(v interface{}) interface{} {
- if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr {
- if reflect.ValueOf(v).IsNil() {
- return reflect.Zero(t.Elem()).Interface()
- } else {
- return reflect.ValueOf(v).Interface()
- }
- } else if v == nil {
- return reflect.Zero(t).Interface()
- }
-
- return v
-}
-
-func (Config) mustJsonMarshal(v interface{}) string {
- raw, err := json.Marshal(v)
- if err != nil {
- panic(err)
- }
-
- return string(raw)
-}
-
-func (Config) mustMarshalJSON(v json.Marshaler) string {
- raw, err := v.MarshalJSON()
- if err != nil {
- panic(err)
- }
-
- return string(raw)
-}
-
-// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the
-// flags is json-name.json-sub-name... etc.
-func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet {
- cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError)
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "endpoint"), defaultConfig.Endpoint.String(), "For admin types, specify where the uri of the service is located.")
- cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "insecure"), defaultConfig.UseInsecureConnection, "Use insecure connection.")
- cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "insecureSkipVerify"), defaultConfig.InsecureSkipVerify, "InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases'")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "caCertFilePath"), defaultConfig.CACertFilePath, "Use specified certificate file to verify the admin server peer.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "maxBackoffDelay"), defaultConfig.MaxBackoffDelay.String(), "Max delay for grpc backoff")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "perRetryTimeout"), defaultConfig.PerRetryTimeout.String(), "gRPC per retry timeout")
- cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "maxRetries"), defaultConfig.MaxRetries, "Max number of gRPC retries")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "authType"), defaultConfig.AuthType.String(), "Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "tokenRefreshWindow"), defaultConfig.TokenRefreshWindow.String(), "Max duration between token refresh attempt and token expiry.")
- cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "useAuth"), defaultConfig.DeprecatedUseAuth, "Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "clientId"), defaultConfig.ClientID, "Client ID")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "clientSecretLocation"), defaultConfig.ClientSecretLocation, "File containing the client secret")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "clientSecretEnvVar"), defaultConfig.ClientSecretEnvVar, "Environment variable containing the client secret")
- cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "scopes"), defaultConfig.Scopes, "List of scopes to request")
- cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "useAudienceFromAdmin"), defaultConfig.UseAudienceFromAdmin, "Use Audience configured from admins public endpoint config.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "audience"), defaultConfig.Audience, "Audience to use when initiating OAuth2 authorization requests.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "authorizationServerUrl"), defaultConfig.DeprecatedAuthorizationServerURL, "This is the URL to your IdP's authorization server. It'll default to Endpoint")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "tokenUrl"), defaultConfig.TokenURL, "OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "authorizationHeader"), defaultConfig.AuthorizationHeader, "Custom metadata header to pass JWT")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "pkceConfig.timeout"), defaultConfig.PkceConfig.BrowserSessionTimeout.String(), "Amount of time the browser session would be active for authentication from client app.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "pkceConfig.refreshTime"), defaultConfig.PkceConfig.TokenRefreshGracePeriod.String(), "grace period from the token expiry after which it would refresh the token.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "deviceFlowConfig.refreshTime"), defaultConfig.DeviceFlowConfig.TokenRefreshGracePeriod.String(), "grace period from the token expiry after which it would refresh the token.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "deviceFlowConfig.timeout"), defaultConfig.DeviceFlowConfig.Timeout.String(), "amount of time the device flow should complete or else it will be cancelled.")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "deviceFlowConfig.pollInterval"), defaultConfig.DeviceFlowConfig.PollInterval.String(), "amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval'")
- cmdFlags.StringSlice(fmt.Sprintf("%v%v", prefix, "command"), defaultConfig.Command, "Command for external authentication token generation")
- cmdFlags.String(fmt.Sprintf("%v%v", prefix, "defaultServiceConfig"), defaultConfig.DefaultServiceConfig, "")
- return cmdFlags
-}
diff --git a/flyteidl/clients/go/admin/config_flags_test.go b/flyteidl/clients/go/admin/config_flags_test.go
deleted file mode 100755
index bdcec55f6..000000000
--- a/flyteidl/clients/go/admin/config_flags_test.go
+++ /dev/null
@@ -1,466 +0,0 @@
-// Code generated by go generate; DO NOT EDIT.
-// This file was generated by robots.
-
-package admin
-
-import (
- "encoding/json"
- "fmt"
- "reflect"
- "strings"
- "testing"
-
- "github.com/mitchellh/mapstructure"
- "github.com/stretchr/testify/assert"
-)
-
-var dereferencableKindsConfig = map[reflect.Kind]struct{}{
- reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {},
-}
-
-// Checks if t is a kind that can be dereferenced to get its underlying type.
-func canGetElementConfig(t reflect.Kind) bool {
- _, exists := dereferencableKindsConfig[t]
- return exists
-}
-
-// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the
-// object. Otherwise, it'll just pass on the original data.
-func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) {
- unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
- if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) ||
- (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) {
-
- raw, err := json.Marshal(data)
- if err != nil {
- fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err)
- return data, nil
- }
-
- res := reflect.New(to).Interface()
- err = json.Unmarshal(raw, &res)
- if err != nil {
- fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err)
- return data, nil
- }
-
- return res, nil
- }
-
- return data, nil
-}
-
-func decode_Config(input, result interface{}) error {
- config := &mapstructure.DecoderConfig{
- TagName: "json",
- WeaklyTypedInput: true,
- Result: result,
- DecodeHook: mapstructure.ComposeDecodeHookFunc(
- mapstructure.StringToTimeDurationHookFunc(),
- mapstructure.StringToSliceHookFunc(","),
- jsonUnmarshalerHookConfig,
- ),
- }
-
- decoder, err := mapstructure.NewDecoder(config)
- if err != nil {
- return err
- }
-
- return decoder.Decode(input)
-}
-
-func join_Config(arr interface{}, sep string) string {
- listValue := reflect.ValueOf(arr)
- strs := make([]string, 0, listValue.Len())
- for i := 0; i < listValue.Len(); i++ {
- strs = append(strs, fmt.Sprintf("%v", listValue.Index(i)))
- }
-
- return strings.Join(strs, sep)
-}
-
-func testDecodeJson_Config(t *testing.T, val, result interface{}) {
- assert.NoError(t, decode_Config(val, result))
-}
-
-func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) {
- assert.NoError(t, decode_Config(vStringSlice, result))
-}
-
-func TestConfig_GetPFlagSet(t *testing.T) {
- val := Config{}
- cmdFlags := val.GetPFlagSet("")
- assert.True(t, cmdFlags.HasFlags())
-}
-
-func TestConfig_SetFlags(t *testing.T) {
- actual := Config{}
- cmdFlags := actual.GetPFlagSet("")
- assert.True(t, cmdFlags.HasFlags())
-
- t.Run("Test_endpoint", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.Endpoint.String()
-
- cmdFlags.Set("endpoint", testValue)
- if vString, err := cmdFlags.GetString("endpoint"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Endpoint)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_insecure", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("insecure", testValue)
- if vBool, err := cmdFlags.GetBool("insecure"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.UseInsecureConnection)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_insecureSkipVerify", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("insecureSkipVerify", testValue)
- if vBool, err := cmdFlags.GetBool("insecureSkipVerify"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.InsecureSkipVerify)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_caCertFilePath", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("caCertFilePath", testValue)
- if vString, err := cmdFlags.GetString("caCertFilePath"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.CACertFilePath)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_maxBackoffDelay", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.MaxBackoffDelay.String()
-
- cmdFlags.Set("maxBackoffDelay", testValue)
- if vString, err := cmdFlags.GetString("maxBackoffDelay"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.MaxBackoffDelay)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_perRetryTimeout", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.PerRetryTimeout.String()
-
- cmdFlags.Set("perRetryTimeout", testValue)
- if vString, err := cmdFlags.GetString("perRetryTimeout"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.PerRetryTimeout)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_maxRetries", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("maxRetries", testValue)
- if vInt, err := cmdFlags.GetInt("maxRetries"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.MaxRetries)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_authType", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("authType", testValue)
- if vString, err := cmdFlags.GetString("authType"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.AuthType)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_tokenRefreshWindow", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.TokenRefreshWindow.String()
-
- cmdFlags.Set("tokenRefreshWindow", testValue)
- if vString, err := cmdFlags.GetString("tokenRefreshWindow"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.TokenRefreshWindow)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_useAuth", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("useAuth", testValue)
- if vBool, err := cmdFlags.GetBool("useAuth"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.DeprecatedUseAuth)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_clientId", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("clientId", testValue)
- if vString, err := cmdFlags.GetString("clientId"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ClientID)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_clientSecretLocation", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("clientSecretLocation", testValue)
- if vString, err := cmdFlags.GetString("clientSecretLocation"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ClientSecretLocation)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_clientSecretEnvVar", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("clientSecretEnvVar", testValue)
- if vString, err := cmdFlags.GetString("clientSecretEnvVar"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ClientSecretEnvVar)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_scopes", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := join_Config(defaultConfig.Scopes, ",")
-
- cmdFlags.Set("scopes", testValue)
- if vStringSlice, err := cmdFlags.GetStringSlice("scopes"); err == nil {
- testDecodeRaw_Config(t, join_Config(vStringSlice, ","), &actual.Scopes)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_useAudienceFromAdmin", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("useAudienceFromAdmin", testValue)
- if vBool, err := cmdFlags.GetBool("useAudienceFromAdmin"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.UseAudienceFromAdmin)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_audience", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("audience", testValue)
- if vString, err := cmdFlags.GetString("audience"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Audience)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_authorizationServerUrl", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("authorizationServerUrl", testValue)
- if vString, err := cmdFlags.GetString("authorizationServerUrl"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DeprecatedAuthorizationServerURL)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_tokenUrl", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("tokenUrl", testValue)
- if vString, err := cmdFlags.GetString("tokenUrl"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.TokenURL)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_authorizationHeader", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("authorizationHeader", testValue)
- if vString, err := cmdFlags.GetString("authorizationHeader"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.AuthorizationHeader)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_pkceConfig.timeout", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.PkceConfig.BrowserSessionTimeout.String()
-
- cmdFlags.Set("pkceConfig.timeout", testValue)
- if vString, err := cmdFlags.GetString("pkceConfig.timeout"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.PkceConfig.BrowserSessionTimeout)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_pkceConfig.refreshTime", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.PkceConfig.TokenRefreshGracePeriod.String()
-
- cmdFlags.Set("pkceConfig.refreshTime", testValue)
- if vString, err := cmdFlags.GetString("pkceConfig.refreshTime"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.PkceConfig.TokenRefreshGracePeriod)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_deviceFlowConfig.refreshTime", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.DeviceFlowConfig.TokenRefreshGracePeriod.String()
-
- cmdFlags.Set("deviceFlowConfig.refreshTime", testValue)
- if vString, err := cmdFlags.GetString("deviceFlowConfig.refreshTime"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DeviceFlowConfig.TokenRefreshGracePeriod)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_deviceFlowConfig.timeout", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.DeviceFlowConfig.Timeout.String()
-
- cmdFlags.Set("deviceFlowConfig.timeout", testValue)
- if vString, err := cmdFlags.GetString("deviceFlowConfig.timeout"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DeviceFlowConfig.Timeout)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_deviceFlowConfig.pollInterval", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := defaultConfig.DeviceFlowConfig.PollInterval.String()
-
- cmdFlags.Set("deviceFlowConfig.pollInterval", testValue)
- if vString, err := cmdFlags.GetString("deviceFlowConfig.pollInterval"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DeviceFlowConfig.PollInterval)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_command", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := join_Config(defaultConfig.Command, ",")
-
- cmdFlags.Set("command", testValue)
- if vStringSlice, err := cmdFlags.GetStringSlice("command"); err == nil {
- testDecodeRaw_Config(t, join_Config(vStringSlice, ","), &actual.Command)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
- t.Run("Test_defaultServiceConfig", func(t *testing.T) {
-
- t.Run("Override", func(t *testing.T) {
- testValue := "1"
-
- cmdFlags.Set("defaultServiceConfig", testValue)
- if vString, err := cmdFlags.GetString("defaultServiceConfig"); err == nil {
- testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DefaultServiceConfig)
-
- } else {
- assert.FailNow(t, err.Error())
- }
- })
- })
-}
diff --git a/flyteidl/clients/go/admin/deviceflow/config.go b/flyteidl/clients/go/admin/deviceflow/config.go
deleted file mode 100644
index 4699cd699..000000000
--- a/flyteidl/clients/go/admin/deviceflow/config.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package deviceflow
-
-import "github.com/flyteorg/flytestdlib/config"
-
-// Config defines settings used for Device orchestration flow.
-type Config struct {
- TokenRefreshGracePeriod config.Duration `json:"refreshTime" pflag:",grace period from the token expiry after which it would refresh the token."`
- Timeout config.Duration `json:"timeout" pflag:",amount of time the device flow should complete or else it will be cancelled."`
- PollInterval config.Duration `json:"pollInterval" pflag:",amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval'"`
-}
diff --git a/flyteidl/clients/go/admin/deviceflow/payload.go b/flyteidl/clients/go/admin/deviceflow/payload.go
deleted file mode 100644
index 656e1a88d..000000000
--- a/flyteidl/clients/go/admin/deviceflow/payload.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package deviceflow
-
-import "golang.org/x/oauth2"
-
-// DeviceAuthorizationRequest sent to authorization server directly from the client app
-type DeviceAuthorizationRequest struct {
- // ClientID is the client identifier issued to the client during the registration process of OAuth app with the authorization server
- ClientID string `json:"client_id"`
- // Scope is the scope parameter of the access request
- Scope string `json:"scope"`
- // Audience defines at which endpoints the token can be used.
- Audience string `json:"audience"`
-}
-
-// DeviceAuthorizationResponse contains the information that the end user would use to authorize the app requesting the
-// resource access.
-type DeviceAuthorizationResponse struct {
- // DeviceCode unique device code generated by the authorization server.
- DeviceCode string `json:"device_code"`
- // UserCode unique code generated for the user to enter on another device
- UserCode string `json:"user_code"`
- // VerificationURI url endpoint of the authorization server which host the device and app verification
- VerificationURI string `json:"verification_uri"`
- // VerificationURIComplete url endpoint of the authorization server which host the device and app verification along with user code
- VerificationURIComplete string `json:"verification_uri_complete"`
- // ExpiresIn lifetime in seconds of the "device_code" and "user_code"
- ExpiresIn int64 `json:"expires_in"`
- // Interval minimum amount of time in secs the client app should wait between polling requests to the token endpoint.
- Interval int64 `json:"interval"`
-}
-
-type DeviceAccessTokenRequest struct {
- // ClientID is the client identifier issued to the client during the registration process of OAuth app with the authorization server
- ClientID string `json:"client_id"`
- // DeviceCode unique device code generated by the authorization server.
- DeviceCode string `json:"device_code"`
- // Value MUST be set to "urn:ietf:params:oauth:grant-type:device_code"
- GrantType string `json:"grant_type"`
-}
-
-type DeviceAccessTokenResponse struct {
- oauth2.Token
- Error string `json:"error"`
-}
diff --git a/flyteidl/clients/go/admin/deviceflow/token_orchestrator.go b/flyteidl/clients/go/admin/deviceflow/token_orchestrator.go
deleted file mode 100644
index c187d586d..000000000
--- a/flyteidl/clients/go/admin/deviceflow/token_orchestrator.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package deviceflow
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strings"
- "time"
-
- "golang.org/x/net/context/ctxhttp"
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-const (
- audience = "audience"
- clientID = "client_id"
- deviceCode = "device_code"
- grantType = "grant_type"
- scope = "scope"
- grantTypeValue = "urn:ietf:params:oauth:grant-type:device_code"
-)
-
-const (
- errSlowDown = "slow_down"
- errAuthPending = "authorization_pending"
-)
-
-// OAuthTokenOrError containing the token
-type OAuthTokenOrError struct {
- *oauth2.Token
- Error string `json:"error,omitempty"`
-}
-
-// TokenOrchestrator implements the main logic to initiate device authorization flow
-type TokenOrchestrator struct {
- Config Config
- tokenorchestrator.BaseTokenOrchestrator
-}
-
-// StartDeviceAuthorization will initiate the OAuth2 device authorization flow.
-func (t TokenOrchestrator) StartDeviceAuthorization(ctx context.Context, dareq DeviceAuthorizationRequest) (*DeviceAuthorizationResponse, error) {
- v := url.Values{clientID: {dareq.ClientID}, scope: {dareq.Scope}, audience: {dareq.Audience}}
- httpReq, err := http.NewRequest("POST", t.ClientConfig.DeviceEndpoint, strings.NewReader(v.Encode()))
- if err != nil {
- return nil, err
- }
- httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
-
- logger.Debugf(ctx, "Sending the following request to start device authorization %v with body %v", httpReq.URL, v.Encode())
-
- httpResp, err := ctxhttp.Do(ctx, nil, httpReq)
- if err != nil {
- return nil, err
- }
-
- body, err := io.ReadAll(io.LimitReader(httpResp.Body, 1<<20))
- httpResp.Body.Close()
- if err != nil {
- return nil, fmt.Errorf("device authorization request failed due to %v", err)
- }
-
- if httpResp.StatusCode != http.StatusOK {
- return nil, &oauth2.RetrieveError{
- Response: httpResp,
- Body: body,
- }
- }
-
- daresp := &DeviceAuthorizationResponse{}
- err = json.Unmarshal(body, &daresp)
- if err != nil {
- return nil, err
- }
-
- if len(daresp.VerificationURIComplete) > 0 {
- fmt.Printf("Please open the browser at the url %v containing verification code\n", daresp.VerificationURIComplete)
- } else {
- fmt.Printf("Please open the browser at the url %v and enter following verification code %v\n", daresp.VerificationURI, daresp.UserCode)
- }
- return daresp, nil
-}
-
-// PollTokenEndpoint polls the token endpoint until the user authorizes/ denies the app or an error occurs other than slow_down or authorization_pending
-func (t TokenOrchestrator) PollTokenEndpoint(ctx context.Context, tokReq DeviceAccessTokenRequest, pollInterval time.Duration) (*oauth2.Token, error) {
- v := url.Values{
- clientID: {tokReq.ClientID},
- grantType: {grantTypeValue},
- deviceCode: {tokReq.DeviceCode},
- }
-
- for {
- httpReq, err := http.NewRequest("POST", t.ClientConfig.Endpoint.TokenURL, strings.NewReader(v.Encode()))
- if err != nil {
- return nil, err
- }
- httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
-
- logger.Debugf(ctx, "Sending the following request to fetch the token %v with body %v", httpReq.URL, v.Encode())
-
- httpResp, err := ctxhttp.Do(ctx, nil, httpReq)
- if err != nil {
- return nil, err
- }
-
- body, err := io.ReadAll(io.LimitReader(httpResp.Body, 1<<20))
- httpResp.Body.Close()
- if err != nil {
- return nil, err
- }
-
- // We cannot check the status code since 400 is returned in case of errAuthPending and errSlowDown in which
- // case the polling has to still continue
- var tokResp DeviceAccessTokenResponse
- err = json.Unmarshal(body, &tokResp)
- if err != nil {
- return nil, err
- }
-
- // Unmarshalled response if it contains an error then check if we need to increase the polling interval
- if len(tokResp.Error) > 0 {
- if tokResp.Error == errSlowDown || tokResp.Error == errAuthPending {
- pollInterval = pollInterval * 2
-
- } else {
- return nil, fmt.Errorf("oauth error : %v", tokResp.Error)
- }
- } else {
- // Got the auth token in the response and save it in the cache
- err = t.TokenCache.SaveToken(&tokResp.Token)
- // Saving into the cache is only considered to be a warning in this case.
- if err != nil {
- logger.Warnf(ctx, "failed to save token in the token cache. Error: %w", err)
- }
- return &tokResp.Token, nil
- }
- fmt.Printf("Waiting for %v secs\n", pollInterval.Seconds())
- time.Sleep(pollInterval)
- }
-}
-
-// FetchTokenFromAuthFlow starts a webserver to listen to redirect callback from the authorization server at the end
-// of the flow. It then launches the browser to authenticate the user.
-func (t TokenOrchestrator) FetchTokenFromAuthFlow(ctx context.Context) (*oauth2.Token, error) {
- ctx, cancelNow := context.WithTimeout(ctx, t.Config.Timeout.Duration)
- defer cancelNow()
-
- var scopes string
- if len(t.ClientConfig.Scopes) > 0 {
- scopes = strings.Join(t.ClientConfig.Scopes, " ")
- }
- daReq := DeviceAuthorizationRequest{ClientID: t.ClientConfig.ClientID, Scope: scopes, Audience: t.ClientConfig.Audience}
- daResp, err := t.StartDeviceAuthorization(ctx, daReq)
- if err != nil {
- return nil, err
- }
-
- pollInterval := t.Config.PollInterval.Duration // default value of 5 sec poll interval if the authorization response doesn't have interval set
- if daResp.Interval > 0 {
- pollInterval = time.Duration(daResp.Interval) * time.Second
- }
-
- tokReq := DeviceAccessTokenRequest{ClientID: t.ClientConfig.ClientID, DeviceCode: daResp.DeviceCode, GrantType: grantType}
- return t.PollTokenEndpoint(ctx, tokReq, pollInterval)
-}
-
-// NewDeviceFlowTokenOrchestrator creates a new TokenOrchestrator that implements the main logic to start device authorization flow and fetch device code and then poll on the token endpoint until the device authorization is approved/denied by the user
-func NewDeviceFlowTokenOrchestrator(baseOrchestrator tokenorchestrator.BaseTokenOrchestrator, cfg Config) (TokenOrchestrator, error) {
- return TokenOrchestrator{
- BaseTokenOrchestrator: baseOrchestrator,
- Config: cfg,
- }, nil
-}
diff --git a/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go b/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go
deleted file mode 100644
index 7f6debdfd..000000000
--- a/flyteidl/clients/go/admin/deviceflow/token_orchestrator_test.go
+++ /dev/null
@@ -1,125 +0,0 @@
-package deviceflow
-
-import (
- "context"
- "io"
- "net/http"
- "net/http/httptest"
- "net/url"
- "strings"
- "testing"
- "time"
-
- "k8s.io/apimachinery/pkg/util/json"
-
- "github.com/flyteorg/flytestdlib/config"
-
- "github.com/stretchr/testify/assert"
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
-)
-
-func TestFetchFromAuthFlow(t *testing.T) {
- ctx := context.Background()
- t.Run("fetch from auth flow", func(t *testing.T) {
- tokenCache := &cache.TokenCacheInMemoryProvider{}
- orchestrator, err := NewDeviceFlowTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{
- ClientConfig: &oauth.Config{
- Config: &oauth2.Config{
- RedirectURL: "http://localhost:8089/redirect",
- Scopes: []string{"code", "all"},
- },
- DeviceEndpoint: "http://dummyDeviceEndpoint",
- },
- TokenCache: tokenCache,
- }, Config{})
- assert.NoError(t, err)
- refreshedToken, err := orchestrator.FetchTokenFromAuthFlow(ctx)
- assert.Nil(t, refreshedToken)
- assert.NotNil(t, err)
- })
-
- t.Run("fetch from auth flow", func(t *testing.T) {
- fakeServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- body, err := io.ReadAll(r.Body)
- assert.Nil(t, err)
- isDeviceReq := strings.Contains(string(body), scope)
- isTokReq := strings.Contains(string(body), deviceCode) && strings.Contains(string(body), grantType) && strings.Contains(string(body), clientID)
-
- if isDeviceReq {
- for _, urlParm := range strings.Split(string(body), "&") {
- paramKeyValue := strings.Split(urlParm, "=")
- switch paramKeyValue[0] {
- case audience:
- assert.Equal(t, "abcd", paramKeyValue[1])
- case clientID:
- assert.Equal(t, clientID, paramKeyValue[1])
- }
- }
- dar := DeviceAuthorizationResponse{
- DeviceCode: "e1db31fe-3b23-4fce-b759-82bf8ea323d6",
- UserCode: "RPBQZNRX",
- VerificationURI: "https://oauth-server/activate",
- VerificationURIComplete: "https://oauth-server/activate?user_code=RPBQZNRX",
- Interval: 5,
- }
- darBytes, err := json.Marshal(dar)
- assert.Nil(t, err)
- _, err = w.Write(darBytes)
- assert.Nil(t, err)
- return
- } else if isTokReq {
- for _, urlParm := range strings.Split(string(body), "&") {
- paramKeyValue := strings.Split(urlParm, "=")
- switch paramKeyValue[0] {
- case grantType:
- assert.Equal(t, url.QueryEscape(grantTypeValue), paramKeyValue[1])
- case deviceCode:
- assert.Equal(t, "e1db31fe-3b23-4fce-b759-82bf8ea323d6", paramKeyValue[1])
- case clientID:
- assert.Equal(t, clientID, paramKeyValue[1])
- }
- }
- dar := DeviceAccessTokenResponse{
- Token: oauth2.Token{
- AccessToken: "access_token",
- },
- }
- darBytes, err := json.Marshal(dar)
- assert.Nil(t, err)
- _, err = w.Write(darBytes)
- assert.Nil(t, err)
- return
- }
- t.Fatal("unknown request")
- }))
- defer fakeServer.Close()
-
- tokenCache := &cache.TokenCacheInMemoryProvider{}
- orchestrator, err := NewDeviceFlowTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{
- ClientConfig: &oauth.Config{
- Config: &oauth2.Config{
- ClientID: clientID,
- RedirectURL: "http://localhost:8089/redirect",
- Scopes: []string{"code", "all"},
- Endpoint: oauth2.Endpoint{
- TokenURL: fakeServer.URL,
- },
- },
- DeviceEndpoint: fakeServer.URL,
- Audience: "abcd",
- },
- TokenCache: tokenCache,
- }, Config{
- Timeout: config.Duration{Duration: 1 * time.Minute},
- })
- assert.NoError(t, err)
- authToken, err := orchestrator.FetchTokenFromAuthFlow(ctx)
- assert.Nil(t, err)
- assert.NotNil(t, authToken)
- assert.Equal(t, "access_token", authToken.AccessToken)
- })
-}
diff --git a/flyteidl/clients/go/admin/externalprocess/command_executor.go b/flyteidl/clients/go/admin/externalprocess/command_executor.go
deleted file mode 100644
index 5c2c687ae..000000000
--- a/flyteidl/clients/go/admin/externalprocess/command_executor.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package externalprocess
-
-import "os/exec"
-
-func Execute(command []string) ([]byte, error) {
- cmd := exec.Command(command[0], command[1:]...) //nolint
- return cmd.Output()
-}
diff --git a/flyteidl/clients/go/admin/integration_test.go b/flyteidl/clients/go/admin/integration_test.go
deleted file mode 100644
index 366f086f2..000000000
--- a/flyteidl/clients/go/admin/integration_test.go
+++ /dev/null
@@ -1,76 +0,0 @@
-//go:build integration
-// +build integration
-
-package admin
-
-import (
- "context"
- "fmt"
- "net/url"
- "testing"
- "time"
-
- "google.golang.org/grpc"
-
- "golang.org/x/oauth2/clientcredentials"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
- "github.com/flyteorg/flytestdlib/config"
- "github.com/stretchr/testify/assert"
-)
-
-func TestLiveAdminClient(t *testing.T) {
- ctx := context.Background()
-
- u, err := url.Parse("dns:///flyte.lyft.net")
- assert.NoError(t, err)
- client := InitializeAdminClient(ctx, Config{
- Endpoint: config.URL{URL: *u},
- UseInsecureConnection: false,
- UseAuth: true,
- ClientID: "0oacmtueinpXk72Af1t7",
- ClientSecretLocation: "/Users/username/.ssh/admin/propeller_secret",
- DeprecatedAuthorizationServerURL: "https://lyft.okta.com/oauth2/ausc5wmjw96cRKvTd1t7",
- Scopes: []string{"svc"},
- AuthorizationHeader: "Flyte-Authorization",
- })
-
- resp, err := client.ListProjects(ctx, &admin.ProjectListRequest{})
- if err != nil {
- fmt.Printf("Error %v\n", err)
- }
- assert.NoError(t, err)
- fmt.Printf("Response: %v\n", resp)
-}
-
-func TestGetDialOption(t *testing.T) {
- ctx := context.Background()
-
- cfg := Config{
- DeprecatedAuthorizationServerURL: "https://lyft.okta.com/oauth2/ausc5wmjw96cRKvTd1t7",
- }
-
- dialOption, err := getAuthenticationDialOption(ctx, cfg, []grpc.DialOption{})
- assert.NoError(t, err)
- assert.NotNil(t, dialOption)
-}
-
-func TestDirectTokenRetrieval(t *testing.T) {
- ctx := context.Background()
- ccConfig := clientcredentials.Config{
- ClientID: "client-id",
- ClientSecret: "my-secret",
- TokenURL: "https://your.idp.com/authserver/v1/token",
- Scopes: []string{"svc"},
- }
-
- tSource := ccConfig.TokenSource(ctx)
-
- for i := 0; i < 100; i++ {
- fmt.Printf("Iteration %d -- ", i)
- token, err := tSource.Token()
- assert.NoError(t, err)
- fmt.Printf("Got token %s\n", token)
- time.Sleep(30 * time.Second)
- }
-}
diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go b/flyteidl/clients/go/admin/mocks/AdminServiceClient.go
deleted file mode 100644
index 2a6b65b64..000000000
--- a/flyteidl/clients/go/admin/mocks/AdminServiceClient.go
+++ /dev/null
@@ -1,2562 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-)
-
-// AdminServiceClient is an autogenerated mock type for the AdminServiceClient type
-type AdminServiceClient struct {
- mock.Mock
-}
-
-type AdminServiceClient_CreateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceClient_CreateExecution {
- return &AdminServiceClient_CreateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateExecution(ctx context.Context, in *admin.ExecutionCreateRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateExecution {
- c_call := _m.On("CreateExecution", ctx, in, opts)
- return &AdminServiceClient_CreateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateExecutionMatch(matchers ...interface{}) *AdminServiceClient_CreateExecution {
- c_call := _m.On("CreateExecution", matchers...)
- return &AdminServiceClient_CreateExecution{Call: c_call}
-}
-
-// CreateExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateExecution(ctx context.Context, in *admin.ExecutionCreateRequest, opts ...grpc.CallOption) (*admin.ExecutionCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionCreateRequest, ...grpc.CallOption) *admin.ExecutionCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateLaunchPlan) Return(_a0 *admin.LaunchPlanCreateResponse, _a1 error) *AdminServiceClient_CreateLaunchPlan {
- return &AdminServiceClient_CreateLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateLaunchPlan(ctx context.Context, in *admin.LaunchPlanCreateRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateLaunchPlan {
- c_call := _m.On("CreateLaunchPlan", ctx, in, opts)
- return &AdminServiceClient_CreateLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateLaunchPlanMatch(matchers ...interface{}) *AdminServiceClient_CreateLaunchPlan {
- c_call := _m.On("CreateLaunchPlan", matchers...)
- return &AdminServiceClient_CreateLaunchPlan{Call: c_call}
-}
-
-// CreateLaunchPlan provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateLaunchPlan(ctx context.Context, in *admin.LaunchPlanCreateRequest, opts ...grpc.CallOption) (*admin.LaunchPlanCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlanCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.LaunchPlanCreateRequest, ...grpc.CallOption) *admin.LaunchPlanCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.LaunchPlanCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateNodeEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateNodeEvent) Return(_a0 *admin.NodeExecutionEventResponse, _a1 error) *AdminServiceClient_CreateNodeEvent {
- return &AdminServiceClient_CreateNodeEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateNodeEvent(ctx context.Context, in *admin.NodeExecutionEventRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateNodeEvent {
- c_call := _m.On("CreateNodeEvent", ctx, in, opts)
- return &AdminServiceClient_CreateNodeEvent{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateNodeEventMatch(matchers ...interface{}) *AdminServiceClient_CreateNodeEvent {
- c_call := _m.On("CreateNodeEvent", matchers...)
- return &AdminServiceClient_CreateNodeEvent{Call: c_call}
-}
-
-// CreateNodeEvent provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateNodeEvent(ctx context.Context, in *admin.NodeExecutionEventRequest, opts ...grpc.CallOption) (*admin.NodeExecutionEventResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NodeExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionEventRequest, ...grpc.CallOption) *admin.NodeExecutionEventResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionEventRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateTask) Return(_a0 *admin.TaskCreateResponse, _a1 error) *AdminServiceClient_CreateTask {
- return &AdminServiceClient_CreateTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateTask(ctx context.Context, in *admin.TaskCreateRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateTask {
- c_call := _m.On("CreateTask", ctx, in, opts)
- return &AdminServiceClient_CreateTask{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateTaskMatch(matchers ...interface{}) *AdminServiceClient_CreateTask {
- c_call := _m.On("CreateTask", matchers...)
- return &AdminServiceClient_CreateTask{Call: c_call}
-}
-
-// CreateTask provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateTask(ctx context.Context, in *admin.TaskCreateRequest, opts ...grpc.CallOption) (*admin.TaskCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskCreateRequest, ...grpc.CallOption) *admin.TaskCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateTaskEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateTaskEvent) Return(_a0 *admin.TaskExecutionEventResponse, _a1 error) *AdminServiceClient_CreateTaskEvent {
- return &AdminServiceClient_CreateTaskEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateTaskEvent(ctx context.Context, in *admin.TaskExecutionEventRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateTaskEvent {
- c_call := _m.On("CreateTaskEvent", ctx, in, opts)
- return &AdminServiceClient_CreateTaskEvent{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateTaskEventMatch(matchers ...interface{}) *AdminServiceClient_CreateTaskEvent {
- c_call := _m.On("CreateTaskEvent", matchers...)
- return &AdminServiceClient_CreateTaskEvent{Call: c_call}
-}
-
-// CreateTaskEvent provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateTaskEvent(ctx context.Context, in *admin.TaskExecutionEventRequest, opts ...grpc.CallOption) (*admin.TaskExecutionEventResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionEventRequest, ...grpc.CallOption) *admin.TaskExecutionEventResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionEventRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateWorkflow struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateWorkflow) Return(_a0 *admin.WorkflowCreateResponse, _a1 error) *AdminServiceClient_CreateWorkflow {
- return &AdminServiceClient_CreateWorkflow{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateWorkflow(ctx context.Context, in *admin.WorkflowCreateRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateWorkflow {
- c_call := _m.On("CreateWorkflow", ctx, in, opts)
- return &AdminServiceClient_CreateWorkflow{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateWorkflowMatch(matchers ...interface{}) *AdminServiceClient_CreateWorkflow {
- c_call := _m.On("CreateWorkflow", matchers...)
- return &AdminServiceClient_CreateWorkflow{Call: c_call}
-}
-
-// CreateWorkflow provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateWorkflow(ctx context.Context, in *admin.WorkflowCreateRequest, opts ...grpc.CallOption) (*admin.WorkflowCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowCreateRequest, ...grpc.CallOption) *admin.WorkflowCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_CreateWorkflowEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_CreateWorkflowEvent) Return(_a0 *admin.WorkflowExecutionEventResponse, _a1 error) *AdminServiceClient_CreateWorkflowEvent {
- return &AdminServiceClient_CreateWorkflowEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnCreateWorkflowEvent(ctx context.Context, in *admin.WorkflowExecutionEventRequest, opts ...grpc.CallOption) *AdminServiceClient_CreateWorkflowEvent {
- c_call := _m.On("CreateWorkflowEvent", ctx, in, opts)
- return &AdminServiceClient_CreateWorkflowEvent{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnCreateWorkflowEventMatch(matchers ...interface{}) *AdminServiceClient_CreateWorkflowEvent {
- c_call := _m.On("CreateWorkflowEvent", matchers...)
- return &AdminServiceClient_CreateWorkflowEvent{Call: c_call}
-}
-
-// CreateWorkflowEvent provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) CreateWorkflowEvent(ctx context.Context, in *admin.WorkflowExecutionEventRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionEventResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionEventRequest, ...grpc.CallOption) *admin.WorkflowExecutionEventResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionEventRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_DeleteProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_DeleteProjectAttributes) Return(_a0 *admin.ProjectAttributesDeleteResponse, _a1 error) *AdminServiceClient_DeleteProjectAttributes {
- return &AdminServiceClient_DeleteProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnDeleteProjectAttributes(ctx context.Context, in *admin.ProjectAttributesDeleteRequest, opts ...grpc.CallOption) *AdminServiceClient_DeleteProjectAttributes {
- c_call := _m.On("DeleteProjectAttributes", ctx, in, opts)
- return &AdminServiceClient_DeleteProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnDeleteProjectAttributesMatch(matchers ...interface{}) *AdminServiceClient_DeleteProjectAttributes {
- c_call := _m.On("DeleteProjectAttributes", matchers...)
- return &AdminServiceClient_DeleteProjectAttributes{Call: c_call}
-}
-
-// DeleteProjectAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) DeleteProjectAttributes(ctx context.Context, in *admin.ProjectAttributesDeleteRequest, opts ...grpc.CallOption) (*admin.ProjectAttributesDeleteResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesDeleteRequest, ...grpc.CallOption) *admin.ProjectAttributesDeleteResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesDeleteRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_DeleteProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_DeleteProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesDeleteResponse, _a1 error) *AdminServiceClient_DeleteProjectDomainAttributes {
- return &AdminServiceClient_DeleteProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnDeleteProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesDeleteRequest, opts ...grpc.CallOption) *AdminServiceClient_DeleteProjectDomainAttributes {
- c_call := _m.On("DeleteProjectDomainAttributes", ctx, in, opts)
- return &AdminServiceClient_DeleteProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnDeleteProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceClient_DeleteProjectDomainAttributes {
- c_call := _m.On("DeleteProjectDomainAttributes", matchers...)
- return &AdminServiceClient_DeleteProjectDomainAttributes{Call: c_call}
-}
-
-// DeleteProjectDomainAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) DeleteProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesDeleteRequest, opts ...grpc.CallOption) (*admin.ProjectDomainAttributesDeleteResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectDomainAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesDeleteRequest, ...grpc.CallOption) *admin.ProjectDomainAttributesDeleteResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesDeleteRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_DeleteWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_DeleteWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesDeleteResponse, _a1 error) *AdminServiceClient_DeleteWorkflowAttributes {
- return &AdminServiceClient_DeleteWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnDeleteWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesDeleteRequest, opts ...grpc.CallOption) *AdminServiceClient_DeleteWorkflowAttributes {
- c_call := _m.On("DeleteWorkflowAttributes", ctx, in, opts)
- return &AdminServiceClient_DeleteWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnDeleteWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceClient_DeleteWorkflowAttributes {
- c_call := _m.On("DeleteWorkflowAttributes", matchers...)
- return &AdminServiceClient_DeleteWorkflowAttributes{Call: c_call}
-}
-
-// DeleteWorkflowAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) DeleteWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesDeleteRequest, opts ...grpc.CallOption) (*admin.WorkflowAttributesDeleteResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesDeleteRequest, ...grpc.CallOption) *admin.WorkflowAttributesDeleteResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesDeleteRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetActiveLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetActiveLaunchPlan) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceClient_GetActiveLaunchPlan {
- return &AdminServiceClient_GetActiveLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetActiveLaunchPlan(ctx context.Context, in *admin.ActiveLaunchPlanRequest, opts ...grpc.CallOption) *AdminServiceClient_GetActiveLaunchPlan {
- c_call := _m.On("GetActiveLaunchPlan", ctx, in, opts)
- return &AdminServiceClient_GetActiveLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetActiveLaunchPlanMatch(matchers ...interface{}) *AdminServiceClient_GetActiveLaunchPlan {
- c_call := _m.On("GetActiveLaunchPlan", matchers...)
- return &AdminServiceClient_GetActiveLaunchPlan{Call: c_call}
-}
-
-// GetActiveLaunchPlan provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetActiveLaunchPlan(ctx context.Context, in *admin.ActiveLaunchPlanRequest, opts ...grpc.CallOption) (*admin.LaunchPlan, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlan
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ActiveLaunchPlanRequest, ...grpc.CallOption) *admin.LaunchPlan); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlan)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ActiveLaunchPlanRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetDescriptionEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetDescriptionEntity) Return(_a0 *admin.DescriptionEntity, _a1 error) *AdminServiceClient_GetDescriptionEntity {
- return &AdminServiceClient_GetDescriptionEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetDescriptionEntity(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetDescriptionEntity {
- c_call := _m.On("GetDescriptionEntity", ctx, in, opts)
- return &AdminServiceClient_GetDescriptionEntity{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetDescriptionEntityMatch(matchers ...interface{}) *AdminServiceClient_GetDescriptionEntity {
- c_call := _m.On("GetDescriptionEntity", matchers...)
- return &AdminServiceClient_GetDescriptionEntity{Call: c_call}
-}
-
-// GetDescriptionEntity provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetDescriptionEntity(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) (*admin.DescriptionEntity, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.DescriptionEntity
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) *admin.DescriptionEntity); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.DescriptionEntity)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetExecution) Return(_a0 *admin.Execution, _a1 error) *AdminServiceClient_GetExecution {
- return &AdminServiceClient_GetExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetExecution(ctx context.Context, in *admin.WorkflowExecutionGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetExecution {
- c_call := _m.On("GetExecution", ctx, in, opts)
- return &AdminServiceClient_GetExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetExecutionMatch(matchers ...interface{}) *AdminServiceClient_GetExecution {
- c_call := _m.On("GetExecution", matchers...)
- return &AdminServiceClient_GetExecution{Call: c_call}
-}
-
-// GetExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetExecution(ctx context.Context, in *admin.WorkflowExecutionGetRequest, opts ...grpc.CallOption) (*admin.Execution, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.Execution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetRequest, ...grpc.CallOption) *admin.Execution); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Execution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetExecutionData) Return(_a0 *admin.WorkflowExecutionGetDataResponse, _a1 error) *AdminServiceClient_GetExecutionData {
- return &AdminServiceClient_GetExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetExecutionData(ctx context.Context, in *admin.WorkflowExecutionGetDataRequest, opts ...grpc.CallOption) *AdminServiceClient_GetExecutionData {
- c_call := _m.On("GetExecutionData", ctx, in, opts)
- return &AdminServiceClient_GetExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetExecutionDataMatch(matchers ...interface{}) *AdminServiceClient_GetExecutionData {
- c_call := _m.On("GetExecutionData", matchers...)
- return &AdminServiceClient_GetExecutionData{Call: c_call}
-}
-
-// GetExecutionData provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetExecutionData(ctx context.Context, in *admin.WorkflowExecutionGetDataRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionGetDataResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetDataRequest, ...grpc.CallOption) *admin.WorkflowExecutionGetDataResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetDataRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetExecutionMetrics struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetExecutionMetrics) Return(_a0 *admin.WorkflowExecutionGetMetricsResponse, _a1 error) *AdminServiceClient_GetExecutionMetrics {
- return &AdminServiceClient_GetExecutionMetrics{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetExecutionMetrics(ctx context.Context, in *admin.WorkflowExecutionGetMetricsRequest, opts ...grpc.CallOption) *AdminServiceClient_GetExecutionMetrics {
- c_call := _m.On("GetExecutionMetrics", ctx, in, opts)
- return &AdminServiceClient_GetExecutionMetrics{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetExecutionMetricsMatch(matchers ...interface{}) *AdminServiceClient_GetExecutionMetrics {
- c_call := _m.On("GetExecutionMetrics", matchers...)
- return &AdminServiceClient_GetExecutionMetrics{Call: c_call}
-}
-
-// GetExecutionMetrics provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetExecutionMetrics(ctx context.Context, in *admin.WorkflowExecutionGetMetricsRequest, opts ...grpc.CallOption) (*admin.WorkflowExecutionGetMetricsResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowExecutionGetMetricsResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetMetricsRequest, ...grpc.CallOption) *admin.WorkflowExecutionGetMetricsResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionGetMetricsResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetMetricsRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetLaunchPlan) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceClient_GetLaunchPlan {
- return &AdminServiceClient_GetLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetLaunchPlan(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetLaunchPlan {
- c_call := _m.On("GetLaunchPlan", ctx, in, opts)
- return &AdminServiceClient_GetLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetLaunchPlanMatch(matchers ...interface{}) *AdminServiceClient_GetLaunchPlan {
- c_call := _m.On("GetLaunchPlan", matchers...)
- return &AdminServiceClient_GetLaunchPlan{Call: c_call}
-}
-
-// GetLaunchPlan provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetLaunchPlan(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) (*admin.LaunchPlan, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlan
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) *admin.LaunchPlan); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlan)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetNamedEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetNamedEntity) Return(_a0 *admin.NamedEntity, _a1 error) *AdminServiceClient_GetNamedEntity {
- return &AdminServiceClient_GetNamedEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetNamedEntity(ctx context.Context, in *admin.NamedEntityGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetNamedEntity {
- c_call := _m.On("GetNamedEntity", ctx, in, opts)
- return &AdminServiceClient_GetNamedEntity{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetNamedEntityMatch(matchers ...interface{}) *AdminServiceClient_GetNamedEntity {
- c_call := _m.On("GetNamedEntity", matchers...)
- return &AdminServiceClient_GetNamedEntity{Call: c_call}
-}
-
-// GetNamedEntity provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetNamedEntity(ctx context.Context, in *admin.NamedEntityGetRequest, opts ...grpc.CallOption) (*admin.NamedEntity, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntity
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityGetRequest, ...grpc.CallOption) *admin.NamedEntity); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntity)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetNodeExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetNodeExecution) Return(_a0 *admin.NodeExecution, _a1 error) *AdminServiceClient_GetNodeExecution {
- return &AdminServiceClient_GetNodeExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetNodeExecution(ctx context.Context, in *admin.NodeExecutionGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetNodeExecution {
- c_call := _m.On("GetNodeExecution", ctx, in, opts)
- return &AdminServiceClient_GetNodeExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetNodeExecutionMatch(matchers ...interface{}) *AdminServiceClient_GetNodeExecution {
- c_call := _m.On("GetNodeExecution", matchers...)
- return &AdminServiceClient_GetNodeExecution{Call: c_call}
-}
-
-// GetNodeExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetNodeExecution(ctx context.Context, in *admin.NodeExecutionGetRequest, opts ...grpc.CallOption) (*admin.NodeExecution, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NodeExecution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionGetRequest, ...grpc.CallOption) *admin.NodeExecution); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetNodeExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetNodeExecutionData) Return(_a0 *admin.NodeExecutionGetDataResponse, _a1 error) *AdminServiceClient_GetNodeExecutionData {
- return &AdminServiceClient_GetNodeExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetNodeExecutionData(ctx context.Context, in *admin.NodeExecutionGetDataRequest, opts ...grpc.CallOption) *AdminServiceClient_GetNodeExecutionData {
- c_call := _m.On("GetNodeExecutionData", ctx, in, opts)
- return &AdminServiceClient_GetNodeExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetNodeExecutionDataMatch(matchers ...interface{}) *AdminServiceClient_GetNodeExecutionData {
- c_call := _m.On("GetNodeExecutionData", matchers...)
- return &AdminServiceClient_GetNodeExecutionData{Call: c_call}
-}
-
-// GetNodeExecutionData provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetNodeExecutionData(ctx context.Context, in *admin.NodeExecutionGetDataRequest, opts ...grpc.CallOption) (*admin.NodeExecutionGetDataResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NodeExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionGetDataRequest, ...grpc.CallOption) *admin.NodeExecutionGetDataResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionGetDataRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetProjectAttributes) Return(_a0 *admin.ProjectAttributesGetResponse, _a1 error) *AdminServiceClient_GetProjectAttributes {
- return &AdminServiceClient_GetProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetProjectAttributes(ctx context.Context, in *admin.ProjectAttributesGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetProjectAttributes {
- c_call := _m.On("GetProjectAttributes", ctx, in, opts)
- return &AdminServiceClient_GetProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetProjectAttributesMatch(matchers ...interface{}) *AdminServiceClient_GetProjectAttributes {
- c_call := _m.On("GetProjectAttributes", matchers...)
- return &AdminServiceClient_GetProjectAttributes{Call: c_call}
-}
-
-// GetProjectAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetProjectAttributes(ctx context.Context, in *admin.ProjectAttributesGetRequest, opts ...grpc.CallOption) (*admin.ProjectAttributesGetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesGetRequest, ...grpc.CallOption) *admin.ProjectAttributesGetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesGetResponse, _a1 error) *AdminServiceClient_GetProjectDomainAttributes {
- return &AdminServiceClient_GetProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetProjectDomainAttributes {
- c_call := _m.On("GetProjectDomainAttributes", ctx, in, opts)
- return &AdminServiceClient_GetProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceClient_GetProjectDomainAttributes {
- c_call := _m.On("GetProjectDomainAttributes", matchers...)
- return &AdminServiceClient_GetProjectDomainAttributes{Call: c_call}
-}
-
-// GetProjectDomainAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesGetRequest, opts ...grpc.CallOption) (*admin.ProjectDomainAttributesGetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectDomainAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesGetRequest, ...grpc.CallOption) *admin.ProjectDomainAttributesGetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetTask) Return(_a0 *admin.Task, _a1 error) *AdminServiceClient_GetTask {
- return &AdminServiceClient_GetTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetTask(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetTask {
- c_call := _m.On("GetTask", ctx, in, opts)
- return &AdminServiceClient_GetTask{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetTaskMatch(matchers ...interface{}) *AdminServiceClient_GetTask {
- c_call := _m.On("GetTask", matchers...)
- return &AdminServiceClient_GetTask{Call: c_call}
-}
-
-// GetTask provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetTask(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) (*admin.Task, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.Task
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) *admin.Task); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Task)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetTaskExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetTaskExecution) Return(_a0 *admin.TaskExecution, _a1 error) *AdminServiceClient_GetTaskExecution {
- return &AdminServiceClient_GetTaskExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetTaskExecution(ctx context.Context, in *admin.TaskExecutionGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetTaskExecution {
- c_call := _m.On("GetTaskExecution", ctx, in, opts)
- return &AdminServiceClient_GetTaskExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetTaskExecutionMatch(matchers ...interface{}) *AdminServiceClient_GetTaskExecution {
- c_call := _m.On("GetTaskExecution", matchers...)
- return &AdminServiceClient_GetTaskExecution{Call: c_call}
-}
-
-// GetTaskExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetTaskExecution(ctx context.Context, in *admin.TaskExecutionGetRequest, opts ...grpc.CallOption) (*admin.TaskExecution, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskExecution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionGetRequest, ...grpc.CallOption) *admin.TaskExecution); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetTaskExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetTaskExecutionData) Return(_a0 *admin.TaskExecutionGetDataResponse, _a1 error) *AdminServiceClient_GetTaskExecutionData {
- return &AdminServiceClient_GetTaskExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetTaskExecutionData(ctx context.Context, in *admin.TaskExecutionGetDataRequest, opts ...grpc.CallOption) *AdminServiceClient_GetTaskExecutionData {
- c_call := _m.On("GetTaskExecutionData", ctx, in, opts)
- return &AdminServiceClient_GetTaskExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetTaskExecutionDataMatch(matchers ...interface{}) *AdminServiceClient_GetTaskExecutionData {
- c_call := _m.On("GetTaskExecutionData", matchers...)
- return &AdminServiceClient_GetTaskExecutionData{Call: c_call}
-}
-
-// GetTaskExecutionData provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetTaskExecutionData(ctx context.Context, in *admin.TaskExecutionGetDataRequest, opts ...grpc.CallOption) (*admin.TaskExecutionGetDataResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionGetDataRequest, ...grpc.CallOption) *admin.TaskExecutionGetDataResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionGetDataRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetVersion struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetVersion) Return(_a0 *admin.GetVersionResponse, _a1 error) *AdminServiceClient_GetVersion {
- return &AdminServiceClient_GetVersion{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetVersion(ctx context.Context, in *admin.GetVersionRequest, opts ...grpc.CallOption) *AdminServiceClient_GetVersion {
- c_call := _m.On("GetVersion", ctx, in, opts)
- return &AdminServiceClient_GetVersion{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetVersionMatch(matchers ...interface{}) *AdminServiceClient_GetVersion {
- c_call := _m.On("GetVersion", matchers...)
- return &AdminServiceClient_GetVersion{Call: c_call}
-}
-
-// GetVersion provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetVersion(ctx context.Context, in *admin.GetVersionRequest, opts ...grpc.CallOption) (*admin.GetVersionResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.GetVersionResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.GetVersionRequest, ...grpc.CallOption) *admin.GetVersionResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.GetVersionResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.GetVersionRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetWorkflow struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetWorkflow) Return(_a0 *admin.Workflow, _a1 error) *AdminServiceClient_GetWorkflow {
- return &AdminServiceClient_GetWorkflow{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetWorkflow(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetWorkflow {
- c_call := _m.On("GetWorkflow", ctx, in, opts)
- return &AdminServiceClient_GetWorkflow{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetWorkflowMatch(matchers ...interface{}) *AdminServiceClient_GetWorkflow {
- c_call := _m.On("GetWorkflow", matchers...)
- return &AdminServiceClient_GetWorkflow{Call: c_call}
-}
-
-// GetWorkflow provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetWorkflow(ctx context.Context, in *admin.ObjectGetRequest, opts ...grpc.CallOption) (*admin.Workflow, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.Workflow
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) *admin.Workflow); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Workflow)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_GetWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_GetWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesGetResponse, _a1 error) *AdminServiceClient_GetWorkflowAttributes {
- return &AdminServiceClient_GetWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnGetWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesGetRequest, opts ...grpc.CallOption) *AdminServiceClient_GetWorkflowAttributes {
- c_call := _m.On("GetWorkflowAttributes", ctx, in, opts)
- return &AdminServiceClient_GetWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnGetWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceClient_GetWorkflowAttributes {
- c_call := _m.On("GetWorkflowAttributes", matchers...)
- return &AdminServiceClient_GetWorkflowAttributes{Call: c_call}
-}
-
-// GetWorkflowAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) GetWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesGetRequest, opts ...grpc.CallOption) (*admin.WorkflowAttributesGetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesGetRequest, ...grpc.CallOption) *admin.WorkflowAttributesGetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListActiveLaunchPlans struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListActiveLaunchPlans) Return(_a0 *admin.LaunchPlanList, _a1 error) *AdminServiceClient_ListActiveLaunchPlans {
- return &AdminServiceClient_ListActiveLaunchPlans{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListActiveLaunchPlans(ctx context.Context, in *admin.ActiveLaunchPlanListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListActiveLaunchPlans {
- c_call := _m.On("ListActiveLaunchPlans", ctx, in, opts)
- return &AdminServiceClient_ListActiveLaunchPlans{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListActiveLaunchPlansMatch(matchers ...interface{}) *AdminServiceClient_ListActiveLaunchPlans {
- c_call := _m.On("ListActiveLaunchPlans", matchers...)
- return &AdminServiceClient_ListActiveLaunchPlans{Call: c_call}
-}
-
-// ListActiveLaunchPlans provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListActiveLaunchPlans(ctx context.Context, in *admin.ActiveLaunchPlanListRequest, opts ...grpc.CallOption) (*admin.LaunchPlanList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlanList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ActiveLaunchPlanListRequest, ...grpc.CallOption) *admin.LaunchPlanList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ActiveLaunchPlanListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListDescriptionEntities struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListDescriptionEntities) Return(_a0 *admin.DescriptionEntityList, _a1 error) *AdminServiceClient_ListDescriptionEntities {
- return &AdminServiceClient_ListDescriptionEntities{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListDescriptionEntities(ctx context.Context, in *admin.DescriptionEntityListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListDescriptionEntities {
- c_call := _m.On("ListDescriptionEntities", ctx, in, opts)
- return &AdminServiceClient_ListDescriptionEntities{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListDescriptionEntitiesMatch(matchers ...interface{}) *AdminServiceClient_ListDescriptionEntities {
- c_call := _m.On("ListDescriptionEntities", matchers...)
- return &AdminServiceClient_ListDescriptionEntities{Call: c_call}
-}
-
-// ListDescriptionEntities provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListDescriptionEntities(ctx context.Context, in *admin.DescriptionEntityListRequest, opts ...grpc.CallOption) (*admin.DescriptionEntityList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.DescriptionEntityList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.DescriptionEntityListRequest, ...grpc.CallOption) *admin.DescriptionEntityList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.DescriptionEntityList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.DescriptionEntityListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListExecutions) Return(_a0 *admin.ExecutionList, _a1 error) *AdminServiceClient_ListExecutions {
- return &AdminServiceClient_ListExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListExecutions(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListExecutions {
- c_call := _m.On("ListExecutions", ctx, in, opts)
- return &AdminServiceClient_ListExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListExecutionsMatch(matchers ...interface{}) *AdminServiceClient_ListExecutions {
- c_call := _m.On("ListExecutions", matchers...)
- return &AdminServiceClient_ListExecutions{Call: c_call}
-}
-
-// ListExecutions provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListExecutions(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) (*admin.ExecutionList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) *admin.ExecutionList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListLaunchPlanIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListLaunchPlanIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceClient_ListLaunchPlanIds {
- return &AdminServiceClient_ListLaunchPlanIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListLaunchPlanIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListLaunchPlanIds {
- c_call := _m.On("ListLaunchPlanIds", ctx, in, opts)
- return &AdminServiceClient_ListLaunchPlanIds{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListLaunchPlanIdsMatch(matchers ...interface{}) *AdminServiceClient_ListLaunchPlanIds {
- c_call := _m.On("ListLaunchPlanIds", matchers...)
- return &AdminServiceClient_ListLaunchPlanIds{Call: c_call}
-}
-
-// ListLaunchPlanIds provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListLaunchPlanIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) (*admin.NamedEntityIdentifierList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListLaunchPlans struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListLaunchPlans) Return(_a0 *admin.LaunchPlanList, _a1 error) *AdminServiceClient_ListLaunchPlans {
- return &AdminServiceClient_ListLaunchPlans{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListLaunchPlans(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListLaunchPlans {
- c_call := _m.On("ListLaunchPlans", ctx, in, opts)
- return &AdminServiceClient_ListLaunchPlans{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListLaunchPlansMatch(matchers ...interface{}) *AdminServiceClient_ListLaunchPlans {
- c_call := _m.On("ListLaunchPlans", matchers...)
- return &AdminServiceClient_ListLaunchPlans{Call: c_call}
-}
-
-// ListLaunchPlans provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListLaunchPlans(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) (*admin.LaunchPlanList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlanList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) *admin.LaunchPlanList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListMatchableAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListMatchableAttributes) Return(_a0 *admin.ListMatchableAttributesResponse, _a1 error) *AdminServiceClient_ListMatchableAttributes {
- return &AdminServiceClient_ListMatchableAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListMatchableAttributes(ctx context.Context, in *admin.ListMatchableAttributesRequest, opts ...grpc.CallOption) *AdminServiceClient_ListMatchableAttributes {
- c_call := _m.On("ListMatchableAttributes", ctx, in, opts)
- return &AdminServiceClient_ListMatchableAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListMatchableAttributesMatch(matchers ...interface{}) *AdminServiceClient_ListMatchableAttributes {
- c_call := _m.On("ListMatchableAttributes", matchers...)
- return &AdminServiceClient_ListMatchableAttributes{Call: c_call}
-}
-
-// ListMatchableAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListMatchableAttributes(ctx context.Context, in *admin.ListMatchableAttributesRequest, opts ...grpc.CallOption) (*admin.ListMatchableAttributesResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ListMatchableAttributesResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ListMatchableAttributesRequest, ...grpc.CallOption) *admin.ListMatchableAttributesResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ListMatchableAttributesResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ListMatchableAttributesRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListNamedEntities struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListNamedEntities) Return(_a0 *admin.NamedEntityList, _a1 error) *AdminServiceClient_ListNamedEntities {
- return &AdminServiceClient_ListNamedEntities{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListNamedEntities(ctx context.Context, in *admin.NamedEntityListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListNamedEntities {
- c_call := _m.On("ListNamedEntities", ctx, in, opts)
- return &AdminServiceClient_ListNamedEntities{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListNamedEntitiesMatch(matchers ...interface{}) *AdminServiceClient_ListNamedEntities {
- c_call := _m.On("ListNamedEntities", matchers...)
- return &AdminServiceClient_ListNamedEntities{Call: c_call}
-}
-
-// ListNamedEntities provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListNamedEntities(ctx context.Context, in *admin.NamedEntityListRequest, opts ...grpc.CallOption) (*admin.NamedEntityList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntityList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityListRequest, ...grpc.CallOption) *admin.NamedEntityList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListNodeExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListNodeExecutions) Return(_a0 *admin.NodeExecutionList, _a1 error) *AdminServiceClient_ListNodeExecutions {
- return &AdminServiceClient_ListNodeExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListNodeExecutions(ctx context.Context, in *admin.NodeExecutionListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListNodeExecutions {
- c_call := _m.On("ListNodeExecutions", ctx, in, opts)
- return &AdminServiceClient_ListNodeExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListNodeExecutionsMatch(matchers ...interface{}) *AdminServiceClient_ListNodeExecutions {
- c_call := _m.On("ListNodeExecutions", matchers...)
- return &AdminServiceClient_ListNodeExecutions{Call: c_call}
-}
-
-// ListNodeExecutions provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListNodeExecutions(ctx context.Context, in *admin.NodeExecutionListRequest, opts ...grpc.CallOption) (*admin.NodeExecutionList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NodeExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionListRequest, ...grpc.CallOption) *admin.NodeExecutionList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListNodeExecutionsForTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListNodeExecutionsForTask) Return(_a0 *admin.NodeExecutionList, _a1 error) *AdminServiceClient_ListNodeExecutionsForTask {
- return &AdminServiceClient_ListNodeExecutionsForTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListNodeExecutionsForTask(ctx context.Context, in *admin.NodeExecutionForTaskListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListNodeExecutionsForTask {
- c_call := _m.On("ListNodeExecutionsForTask", ctx, in, opts)
- return &AdminServiceClient_ListNodeExecutionsForTask{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListNodeExecutionsForTaskMatch(matchers ...interface{}) *AdminServiceClient_ListNodeExecutionsForTask {
- c_call := _m.On("ListNodeExecutionsForTask", matchers...)
- return &AdminServiceClient_ListNodeExecutionsForTask{Call: c_call}
-}
-
-// ListNodeExecutionsForTask provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListNodeExecutionsForTask(ctx context.Context, in *admin.NodeExecutionForTaskListRequest, opts ...grpc.CallOption) (*admin.NodeExecutionList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NodeExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionForTaskListRequest, ...grpc.CallOption) *admin.NodeExecutionList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionForTaskListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListProjects struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListProjects) Return(_a0 *admin.Projects, _a1 error) *AdminServiceClient_ListProjects {
- return &AdminServiceClient_ListProjects{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListProjects(ctx context.Context, in *admin.ProjectListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListProjects {
- c_call := _m.On("ListProjects", ctx, in, opts)
- return &AdminServiceClient_ListProjects{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListProjectsMatch(matchers ...interface{}) *AdminServiceClient_ListProjects {
- c_call := _m.On("ListProjects", matchers...)
- return &AdminServiceClient_ListProjects{Call: c_call}
-}
-
-// ListProjects provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListProjects(ctx context.Context, in *admin.ProjectListRequest, opts ...grpc.CallOption) (*admin.Projects, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.Projects
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectListRequest, ...grpc.CallOption) *admin.Projects); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Projects)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListTaskExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListTaskExecutions) Return(_a0 *admin.TaskExecutionList, _a1 error) *AdminServiceClient_ListTaskExecutions {
- return &AdminServiceClient_ListTaskExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListTaskExecutions(ctx context.Context, in *admin.TaskExecutionListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListTaskExecutions {
- c_call := _m.On("ListTaskExecutions", ctx, in, opts)
- return &AdminServiceClient_ListTaskExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListTaskExecutionsMatch(matchers ...interface{}) *AdminServiceClient_ListTaskExecutions {
- c_call := _m.On("ListTaskExecutions", matchers...)
- return &AdminServiceClient_ListTaskExecutions{Call: c_call}
-}
-
-// ListTaskExecutions provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListTaskExecutions(ctx context.Context, in *admin.TaskExecutionListRequest, opts ...grpc.CallOption) (*admin.TaskExecutionList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionListRequest, ...grpc.CallOption) *admin.TaskExecutionList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListTaskIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListTaskIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceClient_ListTaskIds {
- return &AdminServiceClient_ListTaskIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListTaskIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListTaskIds {
- c_call := _m.On("ListTaskIds", ctx, in, opts)
- return &AdminServiceClient_ListTaskIds{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListTaskIdsMatch(matchers ...interface{}) *AdminServiceClient_ListTaskIds {
- c_call := _m.On("ListTaskIds", matchers...)
- return &AdminServiceClient_ListTaskIds{Call: c_call}
-}
-
-// ListTaskIds provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListTaskIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) (*admin.NamedEntityIdentifierList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListTasks struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListTasks) Return(_a0 *admin.TaskList, _a1 error) *AdminServiceClient_ListTasks {
- return &AdminServiceClient_ListTasks{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListTasks(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListTasks {
- c_call := _m.On("ListTasks", ctx, in, opts)
- return &AdminServiceClient_ListTasks{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListTasksMatch(matchers ...interface{}) *AdminServiceClient_ListTasks {
- c_call := _m.On("ListTasks", matchers...)
- return &AdminServiceClient_ListTasks{Call: c_call}
-}
-
-// ListTasks provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListTasks(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) (*admin.TaskList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.TaskList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) *admin.TaskList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListWorkflowIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListWorkflowIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceClient_ListWorkflowIds {
- return &AdminServiceClient_ListWorkflowIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListWorkflowIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListWorkflowIds {
- c_call := _m.On("ListWorkflowIds", ctx, in, opts)
- return &AdminServiceClient_ListWorkflowIds{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListWorkflowIdsMatch(matchers ...interface{}) *AdminServiceClient_ListWorkflowIds {
- c_call := _m.On("ListWorkflowIds", matchers...)
- return &AdminServiceClient_ListWorkflowIds{Call: c_call}
-}
-
-// ListWorkflowIds provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListWorkflowIds(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) (*admin.NamedEntityIdentifierList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_ListWorkflows struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_ListWorkflows) Return(_a0 *admin.WorkflowList, _a1 error) *AdminServiceClient_ListWorkflows {
- return &AdminServiceClient_ListWorkflows{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnListWorkflows(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) *AdminServiceClient_ListWorkflows {
- c_call := _m.On("ListWorkflows", ctx, in, opts)
- return &AdminServiceClient_ListWorkflows{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnListWorkflowsMatch(matchers ...interface{}) *AdminServiceClient_ListWorkflows {
- c_call := _m.On("ListWorkflows", matchers...)
- return &AdminServiceClient_ListWorkflows{Call: c_call}
-}
-
-// ListWorkflows provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) ListWorkflows(ctx context.Context, in *admin.ResourceListRequest, opts ...grpc.CallOption) (*admin.WorkflowList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) *admin.WorkflowList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_RecoverExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_RecoverExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceClient_RecoverExecution {
- return &AdminServiceClient_RecoverExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnRecoverExecution(ctx context.Context, in *admin.ExecutionRecoverRequest, opts ...grpc.CallOption) *AdminServiceClient_RecoverExecution {
- c_call := _m.On("RecoverExecution", ctx, in, opts)
- return &AdminServiceClient_RecoverExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnRecoverExecutionMatch(matchers ...interface{}) *AdminServiceClient_RecoverExecution {
- c_call := _m.On("RecoverExecution", matchers...)
- return &AdminServiceClient_RecoverExecution{Call: c_call}
-}
-
-// RecoverExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) RecoverExecution(ctx context.Context, in *admin.ExecutionRecoverRequest, opts ...grpc.CallOption) (*admin.ExecutionCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionRecoverRequest, ...grpc.CallOption) *admin.ExecutionCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionRecoverRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_RegisterProject struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_RegisterProject) Return(_a0 *admin.ProjectRegisterResponse, _a1 error) *AdminServiceClient_RegisterProject {
- return &AdminServiceClient_RegisterProject{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnRegisterProject(ctx context.Context, in *admin.ProjectRegisterRequest, opts ...grpc.CallOption) *AdminServiceClient_RegisterProject {
- c_call := _m.On("RegisterProject", ctx, in, opts)
- return &AdminServiceClient_RegisterProject{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnRegisterProjectMatch(matchers ...interface{}) *AdminServiceClient_RegisterProject {
- c_call := _m.On("RegisterProject", matchers...)
- return &AdminServiceClient_RegisterProject{Call: c_call}
-}
-
-// RegisterProject provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) RegisterProject(ctx context.Context, in *admin.ProjectRegisterRequest, opts ...grpc.CallOption) (*admin.ProjectRegisterResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectRegisterResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectRegisterRequest, ...grpc.CallOption) *admin.ProjectRegisterResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectRegisterResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectRegisterRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_RelaunchExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_RelaunchExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceClient_RelaunchExecution {
- return &AdminServiceClient_RelaunchExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnRelaunchExecution(ctx context.Context, in *admin.ExecutionRelaunchRequest, opts ...grpc.CallOption) *AdminServiceClient_RelaunchExecution {
- c_call := _m.On("RelaunchExecution", ctx, in, opts)
- return &AdminServiceClient_RelaunchExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnRelaunchExecutionMatch(matchers ...interface{}) *AdminServiceClient_RelaunchExecution {
- c_call := _m.On("RelaunchExecution", matchers...)
- return &AdminServiceClient_RelaunchExecution{Call: c_call}
-}
-
-// RelaunchExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) RelaunchExecution(ctx context.Context, in *admin.ExecutionRelaunchRequest, opts ...grpc.CallOption) (*admin.ExecutionCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionRelaunchRequest, ...grpc.CallOption) *admin.ExecutionCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionRelaunchRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_TerminateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_TerminateExecution) Return(_a0 *admin.ExecutionTerminateResponse, _a1 error) *AdminServiceClient_TerminateExecution {
- return &AdminServiceClient_TerminateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnTerminateExecution(ctx context.Context, in *admin.ExecutionTerminateRequest, opts ...grpc.CallOption) *AdminServiceClient_TerminateExecution {
- c_call := _m.On("TerminateExecution", ctx, in, opts)
- return &AdminServiceClient_TerminateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnTerminateExecutionMatch(matchers ...interface{}) *AdminServiceClient_TerminateExecution {
- c_call := _m.On("TerminateExecution", matchers...)
- return &AdminServiceClient_TerminateExecution{Call: c_call}
-}
-
-// TerminateExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) TerminateExecution(ctx context.Context, in *admin.ExecutionTerminateRequest, opts ...grpc.CallOption) (*admin.ExecutionTerminateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionTerminateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionTerminateRequest, ...grpc.CallOption) *admin.ExecutionTerminateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionTerminateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionTerminateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateExecution) Return(_a0 *admin.ExecutionUpdateResponse, _a1 error) *AdminServiceClient_UpdateExecution {
- return &AdminServiceClient_UpdateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateExecution(ctx context.Context, in *admin.ExecutionUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateExecution {
- c_call := _m.On("UpdateExecution", ctx, in, opts)
- return &AdminServiceClient_UpdateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateExecutionMatch(matchers ...interface{}) *AdminServiceClient_UpdateExecution {
- c_call := _m.On("UpdateExecution", matchers...)
- return &AdminServiceClient_UpdateExecution{Call: c_call}
-}
-
-// UpdateExecution provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateExecution(ctx context.Context, in *admin.ExecutionUpdateRequest, opts ...grpc.CallOption) (*admin.ExecutionUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ExecutionUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionUpdateRequest, ...grpc.CallOption) *admin.ExecutionUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateLaunchPlan) Return(_a0 *admin.LaunchPlanUpdateResponse, _a1 error) *AdminServiceClient_UpdateLaunchPlan {
- return &AdminServiceClient_UpdateLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateLaunchPlan(ctx context.Context, in *admin.LaunchPlanUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateLaunchPlan {
- c_call := _m.On("UpdateLaunchPlan", ctx, in, opts)
- return &AdminServiceClient_UpdateLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateLaunchPlanMatch(matchers ...interface{}) *AdminServiceClient_UpdateLaunchPlan {
- c_call := _m.On("UpdateLaunchPlan", matchers...)
- return &AdminServiceClient_UpdateLaunchPlan{Call: c_call}
-}
-
-// UpdateLaunchPlan provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateLaunchPlan(ctx context.Context, in *admin.LaunchPlanUpdateRequest, opts ...grpc.CallOption) (*admin.LaunchPlanUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.LaunchPlanUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.LaunchPlanUpdateRequest, ...grpc.CallOption) *admin.LaunchPlanUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.LaunchPlanUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateNamedEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateNamedEntity) Return(_a0 *admin.NamedEntityUpdateResponse, _a1 error) *AdminServiceClient_UpdateNamedEntity {
- return &AdminServiceClient_UpdateNamedEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateNamedEntity(ctx context.Context, in *admin.NamedEntityUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateNamedEntity {
- c_call := _m.On("UpdateNamedEntity", ctx, in, opts)
- return &AdminServiceClient_UpdateNamedEntity{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateNamedEntityMatch(matchers ...interface{}) *AdminServiceClient_UpdateNamedEntity {
- c_call := _m.On("UpdateNamedEntity", matchers...)
- return &AdminServiceClient_UpdateNamedEntity{Call: c_call}
-}
-
-// UpdateNamedEntity provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateNamedEntity(ctx context.Context, in *admin.NamedEntityUpdateRequest, opts ...grpc.CallOption) (*admin.NamedEntityUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.NamedEntityUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityUpdateRequest, ...grpc.CallOption) *admin.NamedEntityUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateProject struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateProject) Return(_a0 *admin.ProjectUpdateResponse, _a1 error) *AdminServiceClient_UpdateProject {
- return &AdminServiceClient_UpdateProject{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateProject(ctx context.Context, in *admin.Project, opts ...grpc.CallOption) *AdminServiceClient_UpdateProject {
- c_call := _m.On("UpdateProject", ctx, in, opts)
- return &AdminServiceClient_UpdateProject{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateProjectMatch(matchers ...interface{}) *AdminServiceClient_UpdateProject {
- c_call := _m.On("UpdateProject", matchers...)
- return &AdminServiceClient_UpdateProject{Call: c_call}
-}
-
-// UpdateProject provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateProject(ctx context.Context, in *admin.Project, opts ...grpc.CallOption) (*admin.ProjectUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.Project, ...grpc.CallOption) *admin.ProjectUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.Project, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateProjectAttributes) Return(_a0 *admin.ProjectAttributesUpdateResponse, _a1 error) *AdminServiceClient_UpdateProjectAttributes {
- return &AdminServiceClient_UpdateProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateProjectAttributes(ctx context.Context, in *admin.ProjectAttributesUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateProjectAttributes {
- c_call := _m.On("UpdateProjectAttributes", ctx, in, opts)
- return &AdminServiceClient_UpdateProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateProjectAttributesMatch(matchers ...interface{}) *AdminServiceClient_UpdateProjectAttributes {
- c_call := _m.On("UpdateProjectAttributes", matchers...)
- return &AdminServiceClient_UpdateProjectAttributes{Call: c_call}
-}
-
-// UpdateProjectAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateProjectAttributes(ctx context.Context, in *admin.ProjectAttributesUpdateRequest, opts ...grpc.CallOption) (*admin.ProjectAttributesUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesUpdateRequest, ...grpc.CallOption) *admin.ProjectAttributesUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesUpdateResponse, _a1 error) *AdminServiceClient_UpdateProjectDomainAttributes {
- return &AdminServiceClient_UpdateProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateProjectDomainAttributes {
- c_call := _m.On("UpdateProjectDomainAttributes", ctx, in, opts)
- return &AdminServiceClient_UpdateProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceClient_UpdateProjectDomainAttributes {
- c_call := _m.On("UpdateProjectDomainAttributes", matchers...)
- return &AdminServiceClient_UpdateProjectDomainAttributes{Call: c_call}
-}
-
-// UpdateProjectDomainAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateProjectDomainAttributes(ctx context.Context, in *admin.ProjectDomainAttributesUpdateRequest, opts ...grpc.CallOption) (*admin.ProjectDomainAttributesUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.ProjectDomainAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesUpdateRequest, ...grpc.CallOption) *admin.ProjectDomainAttributesUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceClient_UpdateWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceClient_UpdateWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesUpdateResponse, _a1 error) *AdminServiceClient_UpdateWorkflowAttributes {
- return &AdminServiceClient_UpdateWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceClient) OnUpdateWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesUpdateRequest, opts ...grpc.CallOption) *AdminServiceClient_UpdateWorkflowAttributes {
- c_call := _m.On("UpdateWorkflowAttributes", ctx, in, opts)
- return &AdminServiceClient_UpdateWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceClient) OnUpdateWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceClient_UpdateWorkflowAttributes {
- c_call := _m.On("UpdateWorkflowAttributes", matchers...)
- return &AdminServiceClient_UpdateWorkflowAttributes{Call: c_call}
-}
-
-// UpdateWorkflowAttributes provides a mock function with given fields: ctx, in, opts
-func (_m *AdminServiceClient) UpdateWorkflowAttributes(ctx context.Context, in *admin.WorkflowAttributesUpdateRequest, opts ...grpc.CallOption) (*admin.WorkflowAttributesUpdateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.WorkflowAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesUpdateRequest, ...grpc.CallOption) *admin.WorkflowAttributesUpdateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesUpdateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go b/flyteidl/clients/go/admin/mocks/AdminServiceServer.go
deleted file mode 100644
index cf06b26b1..000000000
--- a/flyteidl/clients/go/admin/mocks/AdminServiceServer.go
+++ /dev/null
@@ -1,2189 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
-
- mock "github.com/stretchr/testify/mock"
-)
-
-// AdminServiceServer is an autogenerated mock type for the AdminServiceServer type
-type AdminServiceServer struct {
- mock.Mock
-}
-
-type AdminServiceServer_CreateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceServer_CreateExecution {
- return &AdminServiceServer_CreateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateExecution(_a0 context.Context, _a1 *admin.ExecutionCreateRequest) *AdminServiceServer_CreateExecution {
- c_call := _m.On("CreateExecution", _a0, _a1)
- return &AdminServiceServer_CreateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateExecutionMatch(matchers ...interface{}) *AdminServiceServer_CreateExecution {
- c_call := _m.On("CreateExecution", matchers...)
- return &AdminServiceServer_CreateExecution{Call: c_call}
-}
-
-// CreateExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateExecution(_a0 context.Context, _a1 *admin.ExecutionCreateRequest) (*admin.ExecutionCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionCreateRequest) *admin.ExecutionCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateLaunchPlan) Return(_a0 *admin.LaunchPlanCreateResponse, _a1 error) *AdminServiceServer_CreateLaunchPlan {
- return &AdminServiceServer_CreateLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateLaunchPlan(_a0 context.Context, _a1 *admin.LaunchPlanCreateRequest) *AdminServiceServer_CreateLaunchPlan {
- c_call := _m.On("CreateLaunchPlan", _a0, _a1)
- return &AdminServiceServer_CreateLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateLaunchPlanMatch(matchers ...interface{}) *AdminServiceServer_CreateLaunchPlan {
- c_call := _m.On("CreateLaunchPlan", matchers...)
- return &AdminServiceServer_CreateLaunchPlan{Call: c_call}
-}
-
-// CreateLaunchPlan provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateLaunchPlan(_a0 context.Context, _a1 *admin.LaunchPlanCreateRequest) (*admin.LaunchPlanCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlanCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.LaunchPlanCreateRequest) *admin.LaunchPlanCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.LaunchPlanCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateNodeEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateNodeEvent) Return(_a0 *admin.NodeExecutionEventResponse, _a1 error) *AdminServiceServer_CreateNodeEvent {
- return &AdminServiceServer_CreateNodeEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateNodeEvent(_a0 context.Context, _a1 *admin.NodeExecutionEventRequest) *AdminServiceServer_CreateNodeEvent {
- c_call := _m.On("CreateNodeEvent", _a0, _a1)
- return &AdminServiceServer_CreateNodeEvent{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateNodeEventMatch(matchers ...interface{}) *AdminServiceServer_CreateNodeEvent {
- c_call := _m.On("CreateNodeEvent", matchers...)
- return &AdminServiceServer_CreateNodeEvent{Call: c_call}
-}
-
-// CreateNodeEvent provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateNodeEvent(_a0 context.Context, _a1 *admin.NodeExecutionEventRequest) (*admin.NodeExecutionEventResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NodeExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionEventRequest) *admin.NodeExecutionEventResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionEventRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateTask) Return(_a0 *admin.TaskCreateResponse, _a1 error) *AdminServiceServer_CreateTask {
- return &AdminServiceServer_CreateTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateTask(_a0 context.Context, _a1 *admin.TaskCreateRequest) *AdminServiceServer_CreateTask {
- c_call := _m.On("CreateTask", _a0, _a1)
- return &AdminServiceServer_CreateTask{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateTaskMatch(matchers ...interface{}) *AdminServiceServer_CreateTask {
- c_call := _m.On("CreateTask", matchers...)
- return &AdminServiceServer_CreateTask{Call: c_call}
-}
-
-// CreateTask provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateTask(_a0 context.Context, _a1 *admin.TaskCreateRequest) (*admin.TaskCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskCreateRequest) *admin.TaskCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateTaskEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateTaskEvent) Return(_a0 *admin.TaskExecutionEventResponse, _a1 error) *AdminServiceServer_CreateTaskEvent {
- return &AdminServiceServer_CreateTaskEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateTaskEvent(_a0 context.Context, _a1 *admin.TaskExecutionEventRequest) *AdminServiceServer_CreateTaskEvent {
- c_call := _m.On("CreateTaskEvent", _a0, _a1)
- return &AdminServiceServer_CreateTaskEvent{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateTaskEventMatch(matchers ...interface{}) *AdminServiceServer_CreateTaskEvent {
- c_call := _m.On("CreateTaskEvent", matchers...)
- return &AdminServiceServer_CreateTaskEvent{Call: c_call}
-}
-
-// CreateTaskEvent provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateTaskEvent(_a0 context.Context, _a1 *admin.TaskExecutionEventRequest) (*admin.TaskExecutionEventResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionEventRequest) *admin.TaskExecutionEventResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionEventRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateWorkflow struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateWorkflow) Return(_a0 *admin.WorkflowCreateResponse, _a1 error) *AdminServiceServer_CreateWorkflow {
- return &AdminServiceServer_CreateWorkflow{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateWorkflow(_a0 context.Context, _a1 *admin.WorkflowCreateRequest) *AdminServiceServer_CreateWorkflow {
- c_call := _m.On("CreateWorkflow", _a0, _a1)
- return &AdminServiceServer_CreateWorkflow{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateWorkflowMatch(matchers ...interface{}) *AdminServiceServer_CreateWorkflow {
- c_call := _m.On("CreateWorkflow", matchers...)
- return &AdminServiceServer_CreateWorkflow{Call: c_call}
-}
-
-// CreateWorkflow provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateWorkflow(_a0 context.Context, _a1 *admin.WorkflowCreateRequest) (*admin.WorkflowCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowCreateRequest) *admin.WorkflowCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_CreateWorkflowEvent struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_CreateWorkflowEvent) Return(_a0 *admin.WorkflowExecutionEventResponse, _a1 error) *AdminServiceServer_CreateWorkflowEvent {
- return &AdminServiceServer_CreateWorkflowEvent{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnCreateWorkflowEvent(_a0 context.Context, _a1 *admin.WorkflowExecutionEventRequest) *AdminServiceServer_CreateWorkflowEvent {
- c_call := _m.On("CreateWorkflowEvent", _a0, _a1)
- return &AdminServiceServer_CreateWorkflowEvent{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnCreateWorkflowEventMatch(matchers ...interface{}) *AdminServiceServer_CreateWorkflowEvent {
- c_call := _m.On("CreateWorkflowEvent", matchers...)
- return &AdminServiceServer_CreateWorkflowEvent{Call: c_call}
-}
-
-// CreateWorkflowEvent provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) CreateWorkflowEvent(_a0 context.Context, _a1 *admin.WorkflowExecutionEventRequest) (*admin.WorkflowExecutionEventResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowExecutionEventResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionEventRequest) *admin.WorkflowExecutionEventResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionEventResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionEventRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_DeleteProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_DeleteProjectAttributes) Return(_a0 *admin.ProjectAttributesDeleteResponse, _a1 error) *AdminServiceServer_DeleteProjectAttributes {
- return &AdminServiceServer_DeleteProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnDeleteProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesDeleteRequest) *AdminServiceServer_DeleteProjectAttributes {
- c_call := _m.On("DeleteProjectAttributes", _a0, _a1)
- return &AdminServiceServer_DeleteProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnDeleteProjectAttributesMatch(matchers ...interface{}) *AdminServiceServer_DeleteProjectAttributes {
- c_call := _m.On("DeleteProjectAttributes", matchers...)
- return &AdminServiceServer_DeleteProjectAttributes{Call: c_call}
-}
-
-// DeleteProjectAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) DeleteProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesDeleteRequest) (*admin.ProjectAttributesDeleteResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesDeleteRequest) *admin.ProjectAttributesDeleteResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesDeleteRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_DeleteProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_DeleteProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesDeleteResponse, _a1 error) *AdminServiceServer_DeleteProjectDomainAttributes {
- return &AdminServiceServer_DeleteProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnDeleteProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesDeleteRequest) *AdminServiceServer_DeleteProjectDomainAttributes {
- c_call := _m.On("DeleteProjectDomainAttributes", _a0, _a1)
- return &AdminServiceServer_DeleteProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnDeleteProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceServer_DeleteProjectDomainAttributes {
- c_call := _m.On("DeleteProjectDomainAttributes", matchers...)
- return &AdminServiceServer_DeleteProjectDomainAttributes{Call: c_call}
-}
-
-// DeleteProjectDomainAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) DeleteProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesDeleteRequest) (*admin.ProjectDomainAttributesDeleteResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectDomainAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesDeleteRequest) *admin.ProjectDomainAttributesDeleteResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesDeleteRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_DeleteWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_DeleteWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesDeleteResponse, _a1 error) *AdminServiceServer_DeleteWorkflowAttributes {
- return &AdminServiceServer_DeleteWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnDeleteWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesDeleteRequest) *AdminServiceServer_DeleteWorkflowAttributes {
- c_call := _m.On("DeleteWorkflowAttributes", _a0, _a1)
- return &AdminServiceServer_DeleteWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnDeleteWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceServer_DeleteWorkflowAttributes {
- c_call := _m.On("DeleteWorkflowAttributes", matchers...)
- return &AdminServiceServer_DeleteWorkflowAttributes{Call: c_call}
-}
-
-// DeleteWorkflowAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) DeleteWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesDeleteRequest) (*admin.WorkflowAttributesDeleteResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowAttributesDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesDeleteRequest) *admin.WorkflowAttributesDeleteResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesDeleteRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetActiveLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetActiveLaunchPlan) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceServer_GetActiveLaunchPlan {
- return &AdminServiceServer_GetActiveLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetActiveLaunchPlan(_a0 context.Context, _a1 *admin.ActiveLaunchPlanRequest) *AdminServiceServer_GetActiveLaunchPlan {
- c_call := _m.On("GetActiveLaunchPlan", _a0, _a1)
- return &AdminServiceServer_GetActiveLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetActiveLaunchPlanMatch(matchers ...interface{}) *AdminServiceServer_GetActiveLaunchPlan {
- c_call := _m.On("GetActiveLaunchPlan", matchers...)
- return &AdminServiceServer_GetActiveLaunchPlan{Call: c_call}
-}
-
-// GetActiveLaunchPlan provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetActiveLaunchPlan(_a0 context.Context, _a1 *admin.ActiveLaunchPlanRequest) (*admin.LaunchPlan, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlan
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ActiveLaunchPlanRequest) *admin.LaunchPlan); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlan)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ActiveLaunchPlanRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetDescriptionEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetDescriptionEntity) Return(_a0 *admin.DescriptionEntity, _a1 error) *AdminServiceServer_GetDescriptionEntity {
- return &AdminServiceServer_GetDescriptionEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetDescriptionEntity(_a0 context.Context, _a1 *admin.ObjectGetRequest) *AdminServiceServer_GetDescriptionEntity {
- c_call := _m.On("GetDescriptionEntity", _a0, _a1)
- return &AdminServiceServer_GetDescriptionEntity{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetDescriptionEntityMatch(matchers ...interface{}) *AdminServiceServer_GetDescriptionEntity {
- c_call := _m.On("GetDescriptionEntity", matchers...)
- return &AdminServiceServer_GetDescriptionEntity{Call: c_call}
-}
-
-// GetDescriptionEntity provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetDescriptionEntity(_a0 context.Context, _a1 *admin.ObjectGetRequest) (*admin.DescriptionEntity, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.DescriptionEntity
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest) *admin.DescriptionEntity); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.DescriptionEntity)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetExecution) Return(_a0 *admin.Execution, _a1 error) *AdminServiceServer_GetExecution {
- return &AdminServiceServer_GetExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetExecution(_a0 context.Context, _a1 *admin.WorkflowExecutionGetRequest) *AdminServiceServer_GetExecution {
- c_call := _m.On("GetExecution", _a0, _a1)
- return &AdminServiceServer_GetExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetExecutionMatch(matchers ...interface{}) *AdminServiceServer_GetExecution {
- c_call := _m.On("GetExecution", matchers...)
- return &AdminServiceServer_GetExecution{Call: c_call}
-}
-
-// GetExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetExecution(_a0 context.Context, _a1 *admin.WorkflowExecutionGetRequest) (*admin.Execution, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.Execution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetRequest) *admin.Execution); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Execution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetExecutionData) Return(_a0 *admin.WorkflowExecutionGetDataResponse, _a1 error) *AdminServiceServer_GetExecutionData {
- return &AdminServiceServer_GetExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetExecutionData(_a0 context.Context, _a1 *admin.WorkflowExecutionGetDataRequest) *AdminServiceServer_GetExecutionData {
- c_call := _m.On("GetExecutionData", _a0, _a1)
- return &AdminServiceServer_GetExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetExecutionDataMatch(matchers ...interface{}) *AdminServiceServer_GetExecutionData {
- c_call := _m.On("GetExecutionData", matchers...)
- return &AdminServiceServer_GetExecutionData{Call: c_call}
-}
-
-// GetExecutionData provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetExecutionData(_a0 context.Context, _a1 *admin.WorkflowExecutionGetDataRequest) (*admin.WorkflowExecutionGetDataResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetDataRequest) *admin.WorkflowExecutionGetDataResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetDataRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetExecutionMetrics struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetExecutionMetrics) Return(_a0 *admin.WorkflowExecutionGetMetricsResponse, _a1 error) *AdminServiceServer_GetExecutionMetrics {
- return &AdminServiceServer_GetExecutionMetrics{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetExecutionMetrics(_a0 context.Context, _a1 *admin.WorkflowExecutionGetMetricsRequest) *AdminServiceServer_GetExecutionMetrics {
- c_call := _m.On("GetExecutionMetrics", _a0, _a1)
- return &AdminServiceServer_GetExecutionMetrics{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetExecutionMetricsMatch(matchers ...interface{}) *AdminServiceServer_GetExecutionMetrics {
- c_call := _m.On("GetExecutionMetrics", matchers...)
- return &AdminServiceServer_GetExecutionMetrics{Call: c_call}
-}
-
-// GetExecutionMetrics provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetExecutionMetrics(_a0 context.Context, _a1 *admin.WorkflowExecutionGetMetricsRequest) (*admin.WorkflowExecutionGetMetricsResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowExecutionGetMetricsResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowExecutionGetMetricsRequest) *admin.WorkflowExecutionGetMetricsResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowExecutionGetMetricsResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowExecutionGetMetricsRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetLaunchPlan) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceServer_GetLaunchPlan {
- return &AdminServiceServer_GetLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetLaunchPlan(_a0 context.Context, _a1 *admin.ObjectGetRequest) *AdminServiceServer_GetLaunchPlan {
- c_call := _m.On("GetLaunchPlan", _a0, _a1)
- return &AdminServiceServer_GetLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetLaunchPlanMatch(matchers ...interface{}) *AdminServiceServer_GetLaunchPlan {
- c_call := _m.On("GetLaunchPlan", matchers...)
- return &AdminServiceServer_GetLaunchPlan{Call: c_call}
-}
-
-// GetLaunchPlan provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetLaunchPlan(_a0 context.Context, _a1 *admin.ObjectGetRequest) (*admin.LaunchPlan, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlan
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest) *admin.LaunchPlan); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlan)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetNamedEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetNamedEntity) Return(_a0 *admin.NamedEntity, _a1 error) *AdminServiceServer_GetNamedEntity {
- return &AdminServiceServer_GetNamedEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetNamedEntity(_a0 context.Context, _a1 *admin.NamedEntityGetRequest) *AdminServiceServer_GetNamedEntity {
- c_call := _m.On("GetNamedEntity", _a0, _a1)
- return &AdminServiceServer_GetNamedEntity{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetNamedEntityMatch(matchers ...interface{}) *AdminServiceServer_GetNamedEntity {
- c_call := _m.On("GetNamedEntity", matchers...)
- return &AdminServiceServer_GetNamedEntity{Call: c_call}
-}
-
-// GetNamedEntity provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetNamedEntity(_a0 context.Context, _a1 *admin.NamedEntityGetRequest) (*admin.NamedEntity, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntity
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityGetRequest) *admin.NamedEntity); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntity)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetNodeExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetNodeExecution) Return(_a0 *admin.NodeExecution, _a1 error) *AdminServiceServer_GetNodeExecution {
- return &AdminServiceServer_GetNodeExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetNodeExecution(_a0 context.Context, _a1 *admin.NodeExecutionGetRequest) *AdminServiceServer_GetNodeExecution {
- c_call := _m.On("GetNodeExecution", _a0, _a1)
- return &AdminServiceServer_GetNodeExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetNodeExecutionMatch(matchers ...interface{}) *AdminServiceServer_GetNodeExecution {
- c_call := _m.On("GetNodeExecution", matchers...)
- return &AdminServiceServer_GetNodeExecution{Call: c_call}
-}
-
-// GetNodeExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetNodeExecution(_a0 context.Context, _a1 *admin.NodeExecutionGetRequest) (*admin.NodeExecution, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NodeExecution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionGetRequest) *admin.NodeExecution); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetNodeExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetNodeExecutionData) Return(_a0 *admin.NodeExecutionGetDataResponse, _a1 error) *AdminServiceServer_GetNodeExecutionData {
- return &AdminServiceServer_GetNodeExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetNodeExecutionData(_a0 context.Context, _a1 *admin.NodeExecutionGetDataRequest) *AdminServiceServer_GetNodeExecutionData {
- c_call := _m.On("GetNodeExecutionData", _a0, _a1)
- return &AdminServiceServer_GetNodeExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetNodeExecutionDataMatch(matchers ...interface{}) *AdminServiceServer_GetNodeExecutionData {
- c_call := _m.On("GetNodeExecutionData", matchers...)
- return &AdminServiceServer_GetNodeExecutionData{Call: c_call}
-}
-
-// GetNodeExecutionData provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetNodeExecutionData(_a0 context.Context, _a1 *admin.NodeExecutionGetDataRequest) (*admin.NodeExecutionGetDataResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NodeExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionGetDataRequest) *admin.NodeExecutionGetDataResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionGetDataRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetProjectAttributes) Return(_a0 *admin.ProjectAttributesGetResponse, _a1 error) *AdminServiceServer_GetProjectAttributes {
- return &AdminServiceServer_GetProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesGetRequest) *AdminServiceServer_GetProjectAttributes {
- c_call := _m.On("GetProjectAttributes", _a0, _a1)
- return &AdminServiceServer_GetProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetProjectAttributesMatch(matchers ...interface{}) *AdminServiceServer_GetProjectAttributes {
- c_call := _m.On("GetProjectAttributes", matchers...)
- return &AdminServiceServer_GetProjectAttributes{Call: c_call}
-}
-
-// GetProjectAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesGetRequest) (*admin.ProjectAttributesGetResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesGetRequest) *admin.ProjectAttributesGetResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesGetResponse, _a1 error) *AdminServiceServer_GetProjectDomainAttributes {
- return &AdminServiceServer_GetProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesGetRequest) *AdminServiceServer_GetProjectDomainAttributes {
- c_call := _m.On("GetProjectDomainAttributes", _a0, _a1)
- return &AdminServiceServer_GetProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceServer_GetProjectDomainAttributes {
- c_call := _m.On("GetProjectDomainAttributes", matchers...)
- return &AdminServiceServer_GetProjectDomainAttributes{Call: c_call}
-}
-
-// GetProjectDomainAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesGetRequest) (*admin.ProjectDomainAttributesGetResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectDomainAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesGetRequest) *admin.ProjectDomainAttributesGetResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetTask) Return(_a0 *admin.Task, _a1 error) *AdminServiceServer_GetTask {
- return &AdminServiceServer_GetTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetTask(_a0 context.Context, _a1 *admin.ObjectGetRequest) *AdminServiceServer_GetTask {
- c_call := _m.On("GetTask", _a0, _a1)
- return &AdminServiceServer_GetTask{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetTaskMatch(matchers ...interface{}) *AdminServiceServer_GetTask {
- c_call := _m.On("GetTask", matchers...)
- return &AdminServiceServer_GetTask{Call: c_call}
-}
-
-// GetTask provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetTask(_a0 context.Context, _a1 *admin.ObjectGetRequest) (*admin.Task, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.Task
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest) *admin.Task); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Task)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetTaskExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetTaskExecution) Return(_a0 *admin.TaskExecution, _a1 error) *AdminServiceServer_GetTaskExecution {
- return &AdminServiceServer_GetTaskExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetTaskExecution(_a0 context.Context, _a1 *admin.TaskExecutionGetRequest) *AdminServiceServer_GetTaskExecution {
- c_call := _m.On("GetTaskExecution", _a0, _a1)
- return &AdminServiceServer_GetTaskExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetTaskExecutionMatch(matchers ...interface{}) *AdminServiceServer_GetTaskExecution {
- c_call := _m.On("GetTaskExecution", matchers...)
- return &AdminServiceServer_GetTaskExecution{Call: c_call}
-}
-
-// GetTaskExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetTaskExecution(_a0 context.Context, _a1 *admin.TaskExecutionGetRequest) (*admin.TaskExecution, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskExecution
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionGetRequest) *admin.TaskExecution); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecution)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetTaskExecutionData struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetTaskExecutionData) Return(_a0 *admin.TaskExecutionGetDataResponse, _a1 error) *AdminServiceServer_GetTaskExecutionData {
- return &AdminServiceServer_GetTaskExecutionData{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetTaskExecutionData(_a0 context.Context, _a1 *admin.TaskExecutionGetDataRequest) *AdminServiceServer_GetTaskExecutionData {
- c_call := _m.On("GetTaskExecutionData", _a0, _a1)
- return &AdminServiceServer_GetTaskExecutionData{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetTaskExecutionDataMatch(matchers ...interface{}) *AdminServiceServer_GetTaskExecutionData {
- c_call := _m.On("GetTaskExecutionData", matchers...)
- return &AdminServiceServer_GetTaskExecutionData{Call: c_call}
-}
-
-// GetTaskExecutionData provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetTaskExecutionData(_a0 context.Context, _a1 *admin.TaskExecutionGetDataRequest) (*admin.TaskExecutionGetDataResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskExecutionGetDataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionGetDataRequest) *admin.TaskExecutionGetDataResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionGetDataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionGetDataRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetVersion struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetVersion) Return(_a0 *admin.GetVersionResponse, _a1 error) *AdminServiceServer_GetVersion {
- return &AdminServiceServer_GetVersion{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetVersion(_a0 context.Context, _a1 *admin.GetVersionRequest) *AdminServiceServer_GetVersion {
- c_call := _m.On("GetVersion", _a0, _a1)
- return &AdminServiceServer_GetVersion{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetVersionMatch(matchers ...interface{}) *AdminServiceServer_GetVersion {
- c_call := _m.On("GetVersion", matchers...)
- return &AdminServiceServer_GetVersion{Call: c_call}
-}
-
-// GetVersion provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetVersion(_a0 context.Context, _a1 *admin.GetVersionRequest) (*admin.GetVersionResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.GetVersionResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.GetVersionRequest) *admin.GetVersionResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.GetVersionResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.GetVersionRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetWorkflow struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetWorkflow) Return(_a0 *admin.Workflow, _a1 error) *AdminServiceServer_GetWorkflow {
- return &AdminServiceServer_GetWorkflow{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetWorkflow(_a0 context.Context, _a1 *admin.ObjectGetRequest) *AdminServiceServer_GetWorkflow {
- c_call := _m.On("GetWorkflow", _a0, _a1)
- return &AdminServiceServer_GetWorkflow{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetWorkflowMatch(matchers ...interface{}) *AdminServiceServer_GetWorkflow {
- c_call := _m.On("GetWorkflow", matchers...)
- return &AdminServiceServer_GetWorkflow{Call: c_call}
-}
-
-// GetWorkflow provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetWorkflow(_a0 context.Context, _a1 *admin.ObjectGetRequest) (*admin.Workflow, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.Workflow
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ObjectGetRequest) *admin.Workflow); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Workflow)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ObjectGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_GetWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_GetWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesGetResponse, _a1 error) *AdminServiceServer_GetWorkflowAttributes {
- return &AdminServiceServer_GetWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnGetWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesGetRequest) *AdminServiceServer_GetWorkflowAttributes {
- c_call := _m.On("GetWorkflowAttributes", _a0, _a1)
- return &AdminServiceServer_GetWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnGetWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceServer_GetWorkflowAttributes {
- c_call := _m.On("GetWorkflowAttributes", matchers...)
- return &AdminServiceServer_GetWorkflowAttributes{Call: c_call}
-}
-
-// GetWorkflowAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) GetWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesGetRequest) (*admin.WorkflowAttributesGetResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowAttributesGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesGetRequest) *admin.WorkflowAttributesGetResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListActiveLaunchPlans struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListActiveLaunchPlans) Return(_a0 *admin.LaunchPlanList, _a1 error) *AdminServiceServer_ListActiveLaunchPlans {
- return &AdminServiceServer_ListActiveLaunchPlans{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListActiveLaunchPlans(_a0 context.Context, _a1 *admin.ActiveLaunchPlanListRequest) *AdminServiceServer_ListActiveLaunchPlans {
- c_call := _m.On("ListActiveLaunchPlans", _a0, _a1)
- return &AdminServiceServer_ListActiveLaunchPlans{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListActiveLaunchPlansMatch(matchers ...interface{}) *AdminServiceServer_ListActiveLaunchPlans {
- c_call := _m.On("ListActiveLaunchPlans", matchers...)
- return &AdminServiceServer_ListActiveLaunchPlans{Call: c_call}
-}
-
-// ListActiveLaunchPlans provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListActiveLaunchPlans(_a0 context.Context, _a1 *admin.ActiveLaunchPlanListRequest) (*admin.LaunchPlanList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlanList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ActiveLaunchPlanListRequest) *admin.LaunchPlanList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ActiveLaunchPlanListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListDescriptionEntities struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListDescriptionEntities) Return(_a0 *admin.DescriptionEntityList, _a1 error) *AdminServiceServer_ListDescriptionEntities {
- return &AdminServiceServer_ListDescriptionEntities{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListDescriptionEntities(_a0 context.Context, _a1 *admin.DescriptionEntityListRequest) *AdminServiceServer_ListDescriptionEntities {
- c_call := _m.On("ListDescriptionEntities", _a0, _a1)
- return &AdminServiceServer_ListDescriptionEntities{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListDescriptionEntitiesMatch(matchers ...interface{}) *AdminServiceServer_ListDescriptionEntities {
- c_call := _m.On("ListDescriptionEntities", matchers...)
- return &AdminServiceServer_ListDescriptionEntities{Call: c_call}
-}
-
-// ListDescriptionEntities provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListDescriptionEntities(_a0 context.Context, _a1 *admin.DescriptionEntityListRequest) (*admin.DescriptionEntityList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.DescriptionEntityList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.DescriptionEntityListRequest) *admin.DescriptionEntityList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.DescriptionEntityList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.DescriptionEntityListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListExecutions) Return(_a0 *admin.ExecutionList, _a1 error) *AdminServiceServer_ListExecutions {
- return &AdminServiceServer_ListExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListExecutions(_a0 context.Context, _a1 *admin.ResourceListRequest) *AdminServiceServer_ListExecutions {
- c_call := _m.On("ListExecutions", _a0, _a1)
- return &AdminServiceServer_ListExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListExecutionsMatch(matchers ...interface{}) *AdminServiceServer_ListExecutions {
- c_call := _m.On("ListExecutions", matchers...)
- return &AdminServiceServer_ListExecutions{Call: c_call}
-}
-
-// ListExecutions provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListExecutions(_a0 context.Context, _a1 *admin.ResourceListRequest) (*admin.ExecutionList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest) *admin.ExecutionList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListLaunchPlanIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListLaunchPlanIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceServer_ListLaunchPlanIds {
- return &AdminServiceServer_ListLaunchPlanIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListLaunchPlanIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) *AdminServiceServer_ListLaunchPlanIds {
- c_call := _m.On("ListLaunchPlanIds", _a0, _a1)
- return &AdminServiceServer_ListLaunchPlanIds{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListLaunchPlanIdsMatch(matchers ...interface{}) *AdminServiceServer_ListLaunchPlanIds {
- c_call := _m.On("ListLaunchPlanIds", matchers...)
- return &AdminServiceServer_ListLaunchPlanIds{Call: c_call}
-}
-
-// ListLaunchPlanIds provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListLaunchPlanIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) (*admin.NamedEntityIdentifierList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListLaunchPlans struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListLaunchPlans) Return(_a0 *admin.LaunchPlanList, _a1 error) *AdminServiceServer_ListLaunchPlans {
- return &AdminServiceServer_ListLaunchPlans{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListLaunchPlans(_a0 context.Context, _a1 *admin.ResourceListRequest) *AdminServiceServer_ListLaunchPlans {
- c_call := _m.On("ListLaunchPlans", _a0, _a1)
- return &AdminServiceServer_ListLaunchPlans{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListLaunchPlansMatch(matchers ...interface{}) *AdminServiceServer_ListLaunchPlans {
- c_call := _m.On("ListLaunchPlans", matchers...)
- return &AdminServiceServer_ListLaunchPlans{Call: c_call}
-}
-
-// ListLaunchPlans provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListLaunchPlans(_a0 context.Context, _a1 *admin.ResourceListRequest) (*admin.LaunchPlanList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlanList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest) *admin.LaunchPlanList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListMatchableAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListMatchableAttributes) Return(_a0 *admin.ListMatchableAttributesResponse, _a1 error) *AdminServiceServer_ListMatchableAttributes {
- return &AdminServiceServer_ListMatchableAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListMatchableAttributes(_a0 context.Context, _a1 *admin.ListMatchableAttributesRequest) *AdminServiceServer_ListMatchableAttributes {
- c_call := _m.On("ListMatchableAttributes", _a0, _a1)
- return &AdminServiceServer_ListMatchableAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListMatchableAttributesMatch(matchers ...interface{}) *AdminServiceServer_ListMatchableAttributes {
- c_call := _m.On("ListMatchableAttributes", matchers...)
- return &AdminServiceServer_ListMatchableAttributes{Call: c_call}
-}
-
-// ListMatchableAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListMatchableAttributes(_a0 context.Context, _a1 *admin.ListMatchableAttributesRequest) (*admin.ListMatchableAttributesResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ListMatchableAttributesResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ListMatchableAttributesRequest) *admin.ListMatchableAttributesResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ListMatchableAttributesResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ListMatchableAttributesRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListNamedEntities struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListNamedEntities) Return(_a0 *admin.NamedEntityList, _a1 error) *AdminServiceServer_ListNamedEntities {
- return &AdminServiceServer_ListNamedEntities{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListNamedEntities(_a0 context.Context, _a1 *admin.NamedEntityListRequest) *AdminServiceServer_ListNamedEntities {
- c_call := _m.On("ListNamedEntities", _a0, _a1)
- return &AdminServiceServer_ListNamedEntities{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListNamedEntitiesMatch(matchers ...interface{}) *AdminServiceServer_ListNamedEntities {
- c_call := _m.On("ListNamedEntities", matchers...)
- return &AdminServiceServer_ListNamedEntities{Call: c_call}
-}
-
-// ListNamedEntities provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListNamedEntities(_a0 context.Context, _a1 *admin.NamedEntityListRequest) (*admin.NamedEntityList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntityList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityListRequest) *admin.NamedEntityList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListNodeExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListNodeExecutions) Return(_a0 *admin.NodeExecutionList, _a1 error) *AdminServiceServer_ListNodeExecutions {
- return &AdminServiceServer_ListNodeExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListNodeExecutions(_a0 context.Context, _a1 *admin.NodeExecutionListRequest) *AdminServiceServer_ListNodeExecutions {
- c_call := _m.On("ListNodeExecutions", _a0, _a1)
- return &AdminServiceServer_ListNodeExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListNodeExecutionsMatch(matchers ...interface{}) *AdminServiceServer_ListNodeExecutions {
- c_call := _m.On("ListNodeExecutions", matchers...)
- return &AdminServiceServer_ListNodeExecutions{Call: c_call}
-}
-
-// ListNodeExecutions provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListNodeExecutions(_a0 context.Context, _a1 *admin.NodeExecutionListRequest) (*admin.NodeExecutionList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NodeExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionListRequest) *admin.NodeExecutionList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListNodeExecutionsForTask struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListNodeExecutionsForTask) Return(_a0 *admin.NodeExecutionList, _a1 error) *AdminServiceServer_ListNodeExecutionsForTask {
- return &AdminServiceServer_ListNodeExecutionsForTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListNodeExecutionsForTask(_a0 context.Context, _a1 *admin.NodeExecutionForTaskListRequest) *AdminServiceServer_ListNodeExecutionsForTask {
- c_call := _m.On("ListNodeExecutionsForTask", _a0, _a1)
- return &AdminServiceServer_ListNodeExecutionsForTask{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListNodeExecutionsForTaskMatch(matchers ...interface{}) *AdminServiceServer_ListNodeExecutionsForTask {
- c_call := _m.On("ListNodeExecutionsForTask", matchers...)
- return &AdminServiceServer_ListNodeExecutionsForTask{Call: c_call}
-}
-
-// ListNodeExecutionsForTask provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListNodeExecutionsForTask(_a0 context.Context, _a1 *admin.NodeExecutionForTaskListRequest) (*admin.NodeExecutionList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NodeExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NodeExecutionForTaskListRequest) *admin.NodeExecutionList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NodeExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NodeExecutionForTaskListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListProjects struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListProjects) Return(_a0 *admin.Projects, _a1 error) *AdminServiceServer_ListProjects {
- return &AdminServiceServer_ListProjects{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListProjects(_a0 context.Context, _a1 *admin.ProjectListRequest) *AdminServiceServer_ListProjects {
- c_call := _m.On("ListProjects", _a0, _a1)
- return &AdminServiceServer_ListProjects{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListProjectsMatch(matchers ...interface{}) *AdminServiceServer_ListProjects {
- c_call := _m.On("ListProjects", matchers...)
- return &AdminServiceServer_ListProjects{Call: c_call}
-}
-
-// ListProjects provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListProjects(_a0 context.Context, _a1 *admin.ProjectListRequest) (*admin.Projects, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.Projects
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectListRequest) *admin.Projects); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Projects)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListTaskExecutions struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListTaskExecutions) Return(_a0 *admin.TaskExecutionList, _a1 error) *AdminServiceServer_ListTaskExecutions {
- return &AdminServiceServer_ListTaskExecutions{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListTaskExecutions(_a0 context.Context, _a1 *admin.TaskExecutionListRequest) *AdminServiceServer_ListTaskExecutions {
- c_call := _m.On("ListTaskExecutions", _a0, _a1)
- return &AdminServiceServer_ListTaskExecutions{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListTaskExecutionsMatch(matchers ...interface{}) *AdminServiceServer_ListTaskExecutions {
- c_call := _m.On("ListTaskExecutions", matchers...)
- return &AdminServiceServer_ListTaskExecutions{Call: c_call}
-}
-
-// ListTaskExecutions provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListTaskExecutions(_a0 context.Context, _a1 *admin.TaskExecutionListRequest) (*admin.TaskExecutionList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskExecutionList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.TaskExecutionListRequest) *admin.TaskExecutionList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskExecutionList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.TaskExecutionListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListTaskIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListTaskIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceServer_ListTaskIds {
- return &AdminServiceServer_ListTaskIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListTaskIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) *AdminServiceServer_ListTaskIds {
- c_call := _m.On("ListTaskIds", _a0, _a1)
- return &AdminServiceServer_ListTaskIds{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListTaskIdsMatch(matchers ...interface{}) *AdminServiceServer_ListTaskIds {
- c_call := _m.On("ListTaskIds", matchers...)
- return &AdminServiceServer_ListTaskIds{Call: c_call}
-}
-
-// ListTaskIds provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListTaskIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) (*admin.NamedEntityIdentifierList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListTasks struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListTasks) Return(_a0 *admin.TaskList, _a1 error) *AdminServiceServer_ListTasks {
- return &AdminServiceServer_ListTasks{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListTasks(_a0 context.Context, _a1 *admin.ResourceListRequest) *AdminServiceServer_ListTasks {
- c_call := _m.On("ListTasks", _a0, _a1)
- return &AdminServiceServer_ListTasks{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListTasksMatch(matchers ...interface{}) *AdminServiceServer_ListTasks {
- c_call := _m.On("ListTasks", matchers...)
- return &AdminServiceServer_ListTasks{Call: c_call}
-}
-
-// ListTasks provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListTasks(_a0 context.Context, _a1 *admin.ResourceListRequest) (*admin.TaskList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.TaskList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest) *admin.TaskList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.TaskList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListWorkflowIds struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListWorkflowIds) Return(_a0 *admin.NamedEntityIdentifierList, _a1 error) *AdminServiceServer_ListWorkflowIds {
- return &AdminServiceServer_ListWorkflowIds{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListWorkflowIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) *AdminServiceServer_ListWorkflowIds {
- c_call := _m.On("ListWorkflowIds", _a0, _a1)
- return &AdminServiceServer_ListWorkflowIds{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListWorkflowIdsMatch(matchers ...interface{}) *AdminServiceServer_ListWorkflowIds {
- c_call := _m.On("ListWorkflowIds", matchers...)
- return &AdminServiceServer_ListWorkflowIds{Call: c_call}
-}
-
-// ListWorkflowIds provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListWorkflowIds(_a0 context.Context, _a1 *admin.NamedEntityIdentifierListRequest) (*admin.NamedEntityIdentifierList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntityIdentifierList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityIdentifierListRequest) *admin.NamedEntityIdentifierList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityIdentifierList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityIdentifierListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_ListWorkflows struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_ListWorkflows) Return(_a0 *admin.WorkflowList, _a1 error) *AdminServiceServer_ListWorkflows {
- return &AdminServiceServer_ListWorkflows{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnListWorkflows(_a0 context.Context, _a1 *admin.ResourceListRequest) *AdminServiceServer_ListWorkflows {
- c_call := _m.On("ListWorkflows", _a0, _a1)
- return &AdminServiceServer_ListWorkflows{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnListWorkflowsMatch(matchers ...interface{}) *AdminServiceServer_ListWorkflows {
- c_call := _m.On("ListWorkflows", matchers...)
- return &AdminServiceServer_ListWorkflows{Call: c_call}
-}
-
-// ListWorkflows provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) ListWorkflows(_a0 context.Context, _a1 *admin.ResourceListRequest) (*admin.WorkflowList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ResourceListRequest) *admin.WorkflowList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ResourceListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_RecoverExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_RecoverExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceServer_RecoverExecution {
- return &AdminServiceServer_RecoverExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnRecoverExecution(_a0 context.Context, _a1 *admin.ExecutionRecoverRequest) *AdminServiceServer_RecoverExecution {
- c_call := _m.On("RecoverExecution", _a0, _a1)
- return &AdminServiceServer_RecoverExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnRecoverExecutionMatch(matchers ...interface{}) *AdminServiceServer_RecoverExecution {
- c_call := _m.On("RecoverExecution", matchers...)
- return &AdminServiceServer_RecoverExecution{Call: c_call}
-}
-
-// RecoverExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) RecoverExecution(_a0 context.Context, _a1 *admin.ExecutionRecoverRequest) (*admin.ExecutionCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionRecoverRequest) *admin.ExecutionCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionRecoverRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_RegisterProject struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_RegisterProject) Return(_a0 *admin.ProjectRegisterResponse, _a1 error) *AdminServiceServer_RegisterProject {
- return &AdminServiceServer_RegisterProject{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnRegisterProject(_a0 context.Context, _a1 *admin.ProjectRegisterRequest) *AdminServiceServer_RegisterProject {
- c_call := _m.On("RegisterProject", _a0, _a1)
- return &AdminServiceServer_RegisterProject{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnRegisterProjectMatch(matchers ...interface{}) *AdminServiceServer_RegisterProject {
- c_call := _m.On("RegisterProject", matchers...)
- return &AdminServiceServer_RegisterProject{Call: c_call}
-}
-
-// RegisterProject provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) RegisterProject(_a0 context.Context, _a1 *admin.ProjectRegisterRequest) (*admin.ProjectRegisterResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectRegisterResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectRegisterRequest) *admin.ProjectRegisterResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectRegisterResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectRegisterRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_RelaunchExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_RelaunchExecution) Return(_a0 *admin.ExecutionCreateResponse, _a1 error) *AdminServiceServer_RelaunchExecution {
- return &AdminServiceServer_RelaunchExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnRelaunchExecution(_a0 context.Context, _a1 *admin.ExecutionRelaunchRequest) *AdminServiceServer_RelaunchExecution {
- c_call := _m.On("RelaunchExecution", _a0, _a1)
- return &AdminServiceServer_RelaunchExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnRelaunchExecutionMatch(matchers ...interface{}) *AdminServiceServer_RelaunchExecution {
- c_call := _m.On("RelaunchExecution", matchers...)
- return &AdminServiceServer_RelaunchExecution{Call: c_call}
-}
-
-// RelaunchExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) RelaunchExecution(_a0 context.Context, _a1 *admin.ExecutionRelaunchRequest) (*admin.ExecutionCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionRelaunchRequest) *admin.ExecutionCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionRelaunchRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_TerminateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_TerminateExecution) Return(_a0 *admin.ExecutionTerminateResponse, _a1 error) *AdminServiceServer_TerminateExecution {
- return &AdminServiceServer_TerminateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnTerminateExecution(_a0 context.Context, _a1 *admin.ExecutionTerminateRequest) *AdminServiceServer_TerminateExecution {
- c_call := _m.On("TerminateExecution", _a0, _a1)
- return &AdminServiceServer_TerminateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnTerminateExecutionMatch(matchers ...interface{}) *AdminServiceServer_TerminateExecution {
- c_call := _m.On("TerminateExecution", matchers...)
- return &AdminServiceServer_TerminateExecution{Call: c_call}
-}
-
-// TerminateExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) TerminateExecution(_a0 context.Context, _a1 *admin.ExecutionTerminateRequest) (*admin.ExecutionTerminateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionTerminateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionTerminateRequest) *admin.ExecutionTerminateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionTerminateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionTerminateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateExecution struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateExecution) Return(_a0 *admin.ExecutionUpdateResponse, _a1 error) *AdminServiceServer_UpdateExecution {
- return &AdminServiceServer_UpdateExecution{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateExecution(_a0 context.Context, _a1 *admin.ExecutionUpdateRequest) *AdminServiceServer_UpdateExecution {
- c_call := _m.On("UpdateExecution", _a0, _a1)
- return &AdminServiceServer_UpdateExecution{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateExecutionMatch(matchers ...interface{}) *AdminServiceServer_UpdateExecution {
- c_call := _m.On("UpdateExecution", matchers...)
- return &AdminServiceServer_UpdateExecution{Call: c_call}
-}
-
-// UpdateExecution provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateExecution(_a0 context.Context, _a1 *admin.ExecutionUpdateRequest) (*admin.ExecutionUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ExecutionUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ExecutionUpdateRequest) *admin.ExecutionUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ExecutionUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ExecutionUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateLaunchPlan struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateLaunchPlan) Return(_a0 *admin.LaunchPlanUpdateResponse, _a1 error) *AdminServiceServer_UpdateLaunchPlan {
- return &AdminServiceServer_UpdateLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateLaunchPlan(_a0 context.Context, _a1 *admin.LaunchPlanUpdateRequest) *AdminServiceServer_UpdateLaunchPlan {
- c_call := _m.On("UpdateLaunchPlan", _a0, _a1)
- return &AdminServiceServer_UpdateLaunchPlan{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateLaunchPlanMatch(matchers ...interface{}) *AdminServiceServer_UpdateLaunchPlan {
- c_call := _m.On("UpdateLaunchPlan", matchers...)
- return &AdminServiceServer_UpdateLaunchPlan{Call: c_call}
-}
-
-// UpdateLaunchPlan provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateLaunchPlan(_a0 context.Context, _a1 *admin.LaunchPlanUpdateRequest) (*admin.LaunchPlanUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.LaunchPlanUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.LaunchPlanUpdateRequest) *admin.LaunchPlanUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.LaunchPlanUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.LaunchPlanUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateNamedEntity struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateNamedEntity) Return(_a0 *admin.NamedEntityUpdateResponse, _a1 error) *AdminServiceServer_UpdateNamedEntity {
- return &AdminServiceServer_UpdateNamedEntity{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateNamedEntity(_a0 context.Context, _a1 *admin.NamedEntityUpdateRequest) *AdminServiceServer_UpdateNamedEntity {
- c_call := _m.On("UpdateNamedEntity", _a0, _a1)
- return &AdminServiceServer_UpdateNamedEntity{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateNamedEntityMatch(matchers ...interface{}) *AdminServiceServer_UpdateNamedEntity {
- c_call := _m.On("UpdateNamedEntity", matchers...)
- return &AdminServiceServer_UpdateNamedEntity{Call: c_call}
-}
-
-// UpdateNamedEntity provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateNamedEntity(_a0 context.Context, _a1 *admin.NamedEntityUpdateRequest) (*admin.NamedEntityUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.NamedEntityUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.NamedEntityUpdateRequest) *admin.NamedEntityUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.NamedEntityUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.NamedEntityUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateProject struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateProject) Return(_a0 *admin.ProjectUpdateResponse, _a1 error) *AdminServiceServer_UpdateProject {
- return &AdminServiceServer_UpdateProject{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateProject(_a0 context.Context, _a1 *admin.Project) *AdminServiceServer_UpdateProject {
- c_call := _m.On("UpdateProject", _a0, _a1)
- return &AdminServiceServer_UpdateProject{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateProjectMatch(matchers ...interface{}) *AdminServiceServer_UpdateProject {
- c_call := _m.On("UpdateProject", matchers...)
- return &AdminServiceServer_UpdateProject{Call: c_call}
-}
-
-// UpdateProject provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateProject(_a0 context.Context, _a1 *admin.Project) (*admin.ProjectUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.Project) *admin.ProjectUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.Project) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateProjectAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateProjectAttributes) Return(_a0 *admin.ProjectAttributesUpdateResponse, _a1 error) *AdminServiceServer_UpdateProjectAttributes {
- return &AdminServiceServer_UpdateProjectAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesUpdateRequest) *AdminServiceServer_UpdateProjectAttributes {
- c_call := _m.On("UpdateProjectAttributes", _a0, _a1)
- return &AdminServiceServer_UpdateProjectAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateProjectAttributesMatch(matchers ...interface{}) *AdminServiceServer_UpdateProjectAttributes {
- c_call := _m.On("UpdateProjectAttributes", matchers...)
- return &AdminServiceServer_UpdateProjectAttributes{Call: c_call}
-}
-
-// UpdateProjectAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateProjectAttributes(_a0 context.Context, _a1 *admin.ProjectAttributesUpdateRequest) (*admin.ProjectAttributesUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectAttributesUpdateRequest) *admin.ProjectAttributesUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectAttributesUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateProjectDomainAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesUpdateResponse, _a1 error) *AdminServiceServer_UpdateProjectDomainAttributes {
- return &AdminServiceServer_UpdateProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesUpdateRequest) *AdminServiceServer_UpdateProjectDomainAttributes {
- c_call := _m.On("UpdateProjectDomainAttributes", _a0, _a1)
- return &AdminServiceServer_UpdateProjectDomainAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateProjectDomainAttributesMatch(matchers ...interface{}) *AdminServiceServer_UpdateProjectDomainAttributes {
- c_call := _m.On("UpdateProjectDomainAttributes", matchers...)
- return &AdminServiceServer_UpdateProjectDomainAttributes{Call: c_call}
-}
-
-// UpdateProjectDomainAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateProjectDomainAttributes(_a0 context.Context, _a1 *admin.ProjectDomainAttributesUpdateRequest) (*admin.ProjectDomainAttributesUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.ProjectDomainAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.ProjectDomainAttributesUpdateRequest) *admin.ProjectDomainAttributesUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.ProjectDomainAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.ProjectDomainAttributesUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AdminServiceServer_UpdateWorkflowAttributes struct {
- *mock.Call
-}
-
-func (_m AdminServiceServer_UpdateWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesUpdateResponse, _a1 error) *AdminServiceServer_UpdateWorkflowAttributes {
- return &AdminServiceServer_UpdateWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AdminServiceServer) OnUpdateWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesUpdateRequest) *AdminServiceServer_UpdateWorkflowAttributes {
- c_call := _m.On("UpdateWorkflowAttributes", _a0, _a1)
- return &AdminServiceServer_UpdateWorkflowAttributes{Call: c_call}
-}
-
-func (_m *AdminServiceServer) OnUpdateWorkflowAttributesMatch(matchers ...interface{}) *AdminServiceServer_UpdateWorkflowAttributes {
- c_call := _m.On("UpdateWorkflowAttributes", matchers...)
- return &AdminServiceServer_UpdateWorkflowAttributes{Call: c_call}
-}
-
-// UpdateWorkflowAttributes provides a mock function with given fields: _a0, _a1
-func (_m *AdminServiceServer) UpdateWorkflowAttributes(_a0 context.Context, _a1 *admin.WorkflowAttributesUpdateRequest) (*admin.WorkflowAttributesUpdateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.WorkflowAttributesUpdateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.WorkflowAttributesUpdateRequest) *admin.WorkflowAttributesUpdateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.WorkflowAttributesUpdateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.WorkflowAttributesUpdateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/AuthMetadataServiceClient.go b/flyteidl/clients/go/admin/mocks/AuthMetadataServiceClient.go
deleted file mode 100644
index 29dbb8d99..000000000
--- a/flyteidl/clients/go/admin/mocks/AuthMetadataServiceClient.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-// AuthMetadataServiceClient is an autogenerated mock type for the AuthMetadataServiceClient type
-type AuthMetadataServiceClient struct {
- mock.Mock
-}
-
-type AuthMetadataServiceClient_GetOAuth2Metadata struct {
- *mock.Call
-}
-
-func (_m AuthMetadataServiceClient_GetOAuth2Metadata) Return(_a0 *service.OAuth2MetadataResponse, _a1 error) *AuthMetadataServiceClient_GetOAuth2Metadata {
- return &AuthMetadataServiceClient_GetOAuth2Metadata{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AuthMetadataServiceClient) OnGetOAuth2Metadata(ctx context.Context, in *service.OAuth2MetadataRequest, opts ...grpc.CallOption) *AuthMetadataServiceClient_GetOAuth2Metadata {
- c_call := _m.On("GetOAuth2Metadata", ctx, in, opts)
- return &AuthMetadataServiceClient_GetOAuth2Metadata{Call: c_call}
-}
-
-func (_m *AuthMetadataServiceClient) OnGetOAuth2MetadataMatch(matchers ...interface{}) *AuthMetadataServiceClient_GetOAuth2Metadata {
- c_call := _m.On("GetOAuth2Metadata", matchers...)
- return &AuthMetadataServiceClient_GetOAuth2Metadata{Call: c_call}
-}
-
-// GetOAuth2Metadata provides a mock function with given fields: ctx, in, opts
-func (_m *AuthMetadataServiceClient) GetOAuth2Metadata(ctx context.Context, in *service.OAuth2MetadataRequest, opts ...grpc.CallOption) (*service.OAuth2MetadataResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.OAuth2MetadataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.OAuth2MetadataRequest, ...grpc.CallOption) *service.OAuth2MetadataResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.OAuth2MetadataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.OAuth2MetadataRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AuthMetadataServiceClient_GetPublicClientConfig struct {
- *mock.Call
-}
-
-func (_m AuthMetadataServiceClient_GetPublicClientConfig) Return(_a0 *service.PublicClientAuthConfigResponse, _a1 error) *AuthMetadataServiceClient_GetPublicClientConfig {
- return &AuthMetadataServiceClient_GetPublicClientConfig{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AuthMetadataServiceClient) OnGetPublicClientConfig(ctx context.Context, in *service.PublicClientAuthConfigRequest, opts ...grpc.CallOption) *AuthMetadataServiceClient_GetPublicClientConfig {
- c_call := _m.On("GetPublicClientConfig", ctx, in, opts)
- return &AuthMetadataServiceClient_GetPublicClientConfig{Call: c_call}
-}
-
-func (_m *AuthMetadataServiceClient) OnGetPublicClientConfigMatch(matchers ...interface{}) *AuthMetadataServiceClient_GetPublicClientConfig {
- c_call := _m.On("GetPublicClientConfig", matchers...)
- return &AuthMetadataServiceClient_GetPublicClientConfig{Call: c_call}
-}
-
-// GetPublicClientConfig provides a mock function with given fields: ctx, in, opts
-func (_m *AuthMetadataServiceClient) GetPublicClientConfig(ctx context.Context, in *service.PublicClientAuthConfigRequest, opts ...grpc.CallOption) (*service.PublicClientAuthConfigResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.PublicClientAuthConfigResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.PublicClientAuthConfigRequest, ...grpc.CallOption) *service.PublicClientAuthConfigResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.PublicClientAuthConfigResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.PublicClientAuthConfigRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/AuthMetadataServiceServer.go b/flyteidl/clients/go/admin/mocks/AuthMetadataServiceServer.go
deleted file mode 100644
index 59f8533d9..000000000
--- a/flyteidl/clients/go/admin/mocks/AuthMetadataServiceServer.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- mock "github.com/stretchr/testify/mock"
-)
-
-// AuthMetadataServiceServer is an autogenerated mock type for the AuthMetadataServiceServer type
-type AuthMetadataServiceServer struct {
- mock.Mock
-}
-
-type AuthMetadataServiceServer_GetOAuth2Metadata struct {
- *mock.Call
-}
-
-func (_m AuthMetadataServiceServer_GetOAuth2Metadata) Return(_a0 *service.OAuth2MetadataResponse, _a1 error) *AuthMetadataServiceServer_GetOAuth2Metadata {
- return &AuthMetadataServiceServer_GetOAuth2Metadata{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AuthMetadataServiceServer) OnGetOAuth2Metadata(_a0 context.Context, _a1 *service.OAuth2MetadataRequest) *AuthMetadataServiceServer_GetOAuth2Metadata {
- c_call := _m.On("GetOAuth2Metadata", _a0, _a1)
- return &AuthMetadataServiceServer_GetOAuth2Metadata{Call: c_call}
-}
-
-func (_m *AuthMetadataServiceServer) OnGetOAuth2MetadataMatch(matchers ...interface{}) *AuthMetadataServiceServer_GetOAuth2Metadata {
- c_call := _m.On("GetOAuth2Metadata", matchers...)
- return &AuthMetadataServiceServer_GetOAuth2Metadata{Call: c_call}
-}
-
-// GetOAuth2Metadata provides a mock function with given fields: _a0, _a1
-func (_m *AuthMetadataServiceServer) GetOAuth2Metadata(_a0 context.Context, _a1 *service.OAuth2MetadataRequest) (*service.OAuth2MetadataResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.OAuth2MetadataResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.OAuth2MetadataRequest) *service.OAuth2MetadataResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.OAuth2MetadataResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.OAuth2MetadataRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type AuthMetadataServiceServer_GetPublicClientConfig struct {
- *mock.Call
-}
-
-func (_m AuthMetadataServiceServer_GetPublicClientConfig) Return(_a0 *service.PublicClientAuthConfigResponse, _a1 error) *AuthMetadataServiceServer_GetPublicClientConfig {
- return &AuthMetadataServiceServer_GetPublicClientConfig{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *AuthMetadataServiceServer) OnGetPublicClientConfig(_a0 context.Context, _a1 *service.PublicClientAuthConfigRequest) *AuthMetadataServiceServer_GetPublicClientConfig {
- c_call := _m.On("GetPublicClientConfig", _a0, _a1)
- return &AuthMetadataServiceServer_GetPublicClientConfig{Call: c_call}
-}
-
-func (_m *AuthMetadataServiceServer) OnGetPublicClientConfigMatch(matchers ...interface{}) *AuthMetadataServiceServer_GetPublicClientConfig {
- c_call := _m.On("GetPublicClientConfig", matchers...)
- return &AuthMetadataServiceServer_GetPublicClientConfig{Call: c_call}
-}
-
-// GetPublicClientConfig provides a mock function with given fields: _a0, _a1
-func (_m *AuthMetadataServiceServer) GetPublicClientConfig(_a0 context.Context, _a1 *service.PublicClientAuthConfigRequest) (*service.PublicClientAuthConfigResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.PublicClientAuthConfigResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.PublicClientAuthConfigRequest) *service.PublicClientAuthConfigResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.PublicClientAuthConfigResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.PublicClientAuthConfigRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/DataProxyServiceClient.go b/flyteidl/clients/go/admin/mocks/DataProxyServiceClient.go
deleted file mode 100644
index d161dc3fe..000000000
--- a/flyteidl/clients/go/admin/mocks/DataProxyServiceClient.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-// DataProxyServiceClient is an autogenerated mock type for the DataProxyServiceClient type
-type DataProxyServiceClient struct {
- mock.Mock
-}
-
-type DataProxyServiceClient_CreateDownloadLink struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceClient_CreateDownloadLink) Return(_a0 *service.CreateDownloadLinkResponse, _a1 error) *DataProxyServiceClient_CreateDownloadLink {
- return &DataProxyServiceClient_CreateDownloadLink{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceClient) OnCreateDownloadLink(ctx context.Context, in *service.CreateDownloadLinkRequest, opts ...grpc.CallOption) *DataProxyServiceClient_CreateDownloadLink {
- c_call := _m.On("CreateDownloadLink", ctx, in, opts)
- return &DataProxyServiceClient_CreateDownloadLink{Call: c_call}
-}
-
-func (_m *DataProxyServiceClient) OnCreateDownloadLinkMatch(matchers ...interface{}) *DataProxyServiceClient_CreateDownloadLink {
- c_call := _m.On("CreateDownloadLink", matchers...)
- return &DataProxyServiceClient_CreateDownloadLink{Call: c_call}
-}
-
-// CreateDownloadLink provides a mock function with given fields: ctx, in, opts
-func (_m *DataProxyServiceClient) CreateDownloadLink(ctx context.Context, in *service.CreateDownloadLinkRequest, opts ...grpc.CallOption) (*service.CreateDownloadLinkResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.CreateDownloadLinkResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateDownloadLinkRequest, ...grpc.CallOption) *service.CreateDownloadLinkResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateDownloadLinkResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateDownloadLinkRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataProxyServiceClient_CreateDownloadLocation struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceClient_CreateDownloadLocation) Return(_a0 *service.CreateDownloadLocationResponse, _a1 error) *DataProxyServiceClient_CreateDownloadLocation {
- return &DataProxyServiceClient_CreateDownloadLocation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceClient) OnCreateDownloadLocation(ctx context.Context, in *service.CreateDownloadLocationRequest, opts ...grpc.CallOption) *DataProxyServiceClient_CreateDownloadLocation {
- c_call := _m.On("CreateDownloadLocation", ctx, in, opts)
- return &DataProxyServiceClient_CreateDownloadLocation{Call: c_call}
-}
-
-func (_m *DataProxyServiceClient) OnCreateDownloadLocationMatch(matchers ...interface{}) *DataProxyServiceClient_CreateDownloadLocation {
- c_call := _m.On("CreateDownloadLocation", matchers...)
- return &DataProxyServiceClient_CreateDownloadLocation{Call: c_call}
-}
-
-// CreateDownloadLocation provides a mock function with given fields: ctx, in, opts
-func (_m *DataProxyServiceClient) CreateDownloadLocation(ctx context.Context, in *service.CreateDownloadLocationRequest, opts ...grpc.CallOption) (*service.CreateDownloadLocationResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.CreateDownloadLocationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateDownloadLocationRequest, ...grpc.CallOption) *service.CreateDownloadLocationResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateDownloadLocationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateDownloadLocationRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataProxyServiceClient_CreateUploadLocation struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceClient_CreateUploadLocation) Return(_a0 *service.CreateUploadLocationResponse, _a1 error) *DataProxyServiceClient_CreateUploadLocation {
- return &DataProxyServiceClient_CreateUploadLocation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceClient) OnCreateUploadLocation(ctx context.Context, in *service.CreateUploadLocationRequest, opts ...grpc.CallOption) *DataProxyServiceClient_CreateUploadLocation {
- c_call := _m.On("CreateUploadLocation", ctx, in, opts)
- return &DataProxyServiceClient_CreateUploadLocation{Call: c_call}
-}
-
-func (_m *DataProxyServiceClient) OnCreateUploadLocationMatch(matchers ...interface{}) *DataProxyServiceClient_CreateUploadLocation {
- c_call := _m.On("CreateUploadLocation", matchers...)
- return &DataProxyServiceClient_CreateUploadLocation{Call: c_call}
-}
-
-// CreateUploadLocation provides a mock function with given fields: ctx, in, opts
-func (_m *DataProxyServiceClient) CreateUploadLocation(ctx context.Context, in *service.CreateUploadLocationRequest, opts ...grpc.CallOption) (*service.CreateUploadLocationResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.CreateUploadLocationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateUploadLocationRequest, ...grpc.CallOption) *service.CreateUploadLocationResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateUploadLocationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateUploadLocationRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/DataProxyServiceServer.go b/flyteidl/clients/go/admin/mocks/DataProxyServiceServer.go
deleted file mode 100644
index 6ba37135a..000000000
--- a/flyteidl/clients/go/admin/mocks/DataProxyServiceServer.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- mock "github.com/stretchr/testify/mock"
-)
-
-// DataProxyServiceServer is an autogenerated mock type for the DataProxyServiceServer type
-type DataProxyServiceServer struct {
- mock.Mock
-}
-
-type DataProxyServiceServer_CreateDownloadLink struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceServer_CreateDownloadLink) Return(_a0 *service.CreateDownloadLinkResponse, _a1 error) *DataProxyServiceServer_CreateDownloadLink {
- return &DataProxyServiceServer_CreateDownloadLink{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceServer) OnCreateDownloadLink(_a0 context.Context, _a1 *service.CreateDownloadLinkRequest) *DataProxyServiceServer_CreateDownloadLink {
- c_call := _m.On("CreateDownloadLink", _a0, _a1)
- return &DataProxyServiceServer_CreateDownloadLink{Call: c_call}
-}
-
-func (_m *DataProxyServiceServer) OnCreateDownloadLinkMatch(matchers ...interface{}) *DataProxyServiceServer_CreateDownloadLink {
- c_call := _m.On("CreateDownloadLink", matchers...)
- return &DataProxyServiceServer_CreateDownloadLink{Call: c_call}
-}
-
-// CreateDownloadLink provides a mock function with given fields: _a0, _a1
-func (_m *DataProxyServiceServer) CreateDownloadLink(_a0 context.Context, _a1 *service.CreateDownloadLinkRequest) (*service.CreateDownloadLinkResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.CreateDownloadLinkResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateDownloadLinkRequest) *service.CreateDownloadLinkResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateDownloadLinkResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateDownloadLinkRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataProxyServiceServer_CreateDownloadLocation struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceServer_CreateDownloadLocation) Return(_a0 *service.CreateDownloadLocationResponse, _a1 error) *DataProxyServiceServer_CreateDownloadLocation {
- return &DataProxyServiceServer_CreateDownloadLocation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceServer) OnCreateDownloadLocation(_a0 context.Context, _a1 *service.CreateDownloadLocationRequest) *DataProxyServiceServer_CreateDownloadLocation {
- c_call := _m.On("CreateDownloadLocation", _a0, _a1)
- return &DataProxyServiceServer_CreateDownloadLocation{Call: c_call}
-}
-
-func (_m *DataProxyServiceServer) OnCreateDownloadLocationMatch(matchers ...interface{}) *DataProxyServiceServer_CreateDownloadLocation {
- c_call := _m.On("CreateDownloadLocation", matchers...)
- return &DataProxyServiceServer_CreateDownloadLocation{Call: c_call}
-}
-
-// CreateDownloadLocation provides a mock function with given fields: _a0, _a1
-func (_m *DataProxyServiceServer) CreateDownloadLocation(_a0 context.Context, _a1 *service.CreateDownloadLocationRequest) (*service.CreateDownloadLocationResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.CreateDownloadLocationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateDownloadLocationRequest) *service.CreateDownloadLocationResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateDownloadLocationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateDownloadLocationRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataProxyServiceServer_CreateUploadLocation struct {
- *mock.Call
-}
-
-func (_m DataProxyServiceServer_CreateUploadLocation) Return(_a0 *service.CreateUploadLocationResponse, _a1 error) *DataProxyServiceServer_CreateUploadLocation {
- return &DataProxyServiceServer_CreateUploadLocation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataProxyServiceServer) OnCreateUploadLocation(_a0 context.Context, _a1 *service.CreateUploadLocationRequest) *DataProxyServiceServer_CreateUploadLocation {
- c_call := _m.On("CreateUploadLocation", _a0, _a1)
- return &DataProxyServiceServer_CreateUploadLocation{Call: c_call}
-}
-
-func (_m *DataProxyServiceServer) OnCreateUploadLocationMatch(matchers ...interface{}) *DataProxyServiceServer_CreateUploadLocation {
- c_call := _m.On("CreateUploadLocation", matchers...)
- return &DataProxyServiceServer_CreateUploadLocation{Call: c_call}
-}
-
-// CreateUploadLocation provides a mock function with given fields: _a0, _a1
-func (_m *DataProxyServiceServer) CreateUploadLocation(_a0 context.Context, _a1 *service.CreateUploadLocationRequest) (*service.CreateUploadLocationResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.CreateUploadLocationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.CreateUploadLocationRequest) *service.CreateUploadLocationResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.CreateUploadLocationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.CreateUploadLocationRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/ExternalPluginServiceClient.go b/flyteidl/clients/go/admin/mocks/ExternalPluginServiceClient.go
deleted file mode 100644
index 05df34213..000000000
--- a/flyteidl/clients/go/admin/mocks/ExternalPluginServiceClient.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-// ExternalPluginServiceClient is an autogenerated mock type for the ExternalPluginServiceClient type
-type ExternalPluginServiceClient struct {
- mock.Mock
-}
-
-type ExternalPluginServiceClient_CreateTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceClient_CreateTask) Return(_a0 *service.TaskCreateResponse, _a1 error) *ExternalPluginServiceClient_CreateTask {
- return &ExternalPluginServiceClient_CreateTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceClient) OnCreateTask(ctx context.Context, in *service.TaskCreateRequest, opts ...grpc.CallOption) *ExternalPluginServiceClient_CreateTask {
- c_call := _m.On("CreateTask", ctx, in, opts)
- return &ExternalPluginServiceClient_CreateTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceClient) OnCreateTaskMatch(matchers ...interface{}) *ExternalPluginServiceClient_CreateTask {
- c_call := _m.On("CreateTask", matchers...)
- return &ExternalPluginServiceClient_CreateTask{Call: c_call}
-}
-
-// CreateTask provides a mock function with given fields: ctx, in, opts
-func (_m *ExternalPluginServiceClient) CreateTask(ctx context.Context, in *service.TaskCreateRequest, opts ...grpc.CallOption) (*service.TaskCreateResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.TaskCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskCreateRequest, ...grpc.CallOption) *service.TaskCreateResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type ExternalPluginServiceClient_DeleteTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceClient_DeleteTask) Return(_a0 *service.TaskDeleteResponse, _a1 error) *ExternalPluginServiceClient_DeleteTask {
- return &ExternalPluginServiceClient_DeleteTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceClient) OnDeleteTask(ctx context.Context, in *service.TaskDeleteRequest, opts ...grpc.CallOption) *ExternalPluginServiceClient_DeleteTask {
- c_call := _m.On("DeleteTask", ctx, in, opts)
- return &ExternalPluginServiceClient_DeleteTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceClient) OnDeleteTaskMatch(matchers ...interface{}) *ExternalPluginServiceClient_DeleteTask {
- c_call := _m.On("DeleteTask", matchers...)
- return &ExternalPluginServiceClient_DeleteTask{Call: c_call}
-}
-
-// DeleteTask provides a mock function with given fields: ctx, in, opts
-func (_m *ExternalPluginServiceClient) DeleteTask(ctx context.Context, in *service.TaskDeleteRequest, opts ...grpc.CallOption) (*service.TaskDeleteResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.TaskDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskDeleteRequest, ...grpc.CallOption) *service.TaskDeleteResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskDeleteRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type ExternalPluginServiceClient_GetTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceClient_GetTask) Return(_a0 *service.TaskGetResponse, _a1 error) *ExternalPluginServiceClient_GetTask {
- return &ExternalPluginServiceClient_GetTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceClient) OnGetTask(ctx context.Context, in *service.TaskGetRequest, opts ...grpc.CallOption) *ExternalPluginServiceClient_GetTask {
- c_call := _m.On("GetTask", ctx, in, opts)
- return &ExternalPluginServiceClient_GetTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceClient) OnGetTaskMatch(matchers ...interface{}) *ExternalPluginServiceClient_GetTask {
- c_call := _m.On("GetTask", matchers...)
- return &ExternalPluginServiceClient_GetTask{Call: c_call}
-}
-
-// GetTask provides a mock function with given fields: ctx, in, opts
-func (_m *ExternalPluginServiceClient) GetTask(ctx context.Context, in *service.TaskGetRequest, opts ...grpc.CallOption) (*service.TaskGetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.TaskGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskGetRequest, ...grpc.CallOption) *service.TaskGetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskGetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/ExternalPluginServiceServer.go b/flyteidl/clients/go/admin/mocks/ExternalPluginServiceServer.go
deleted file mode 100644
index 34dae1432..000000000
--- a/flyteidl/clients/go/admin/mocks/ExternalPluginServiceServer.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- mock "github.com/stretchr/testify/mock"
-)
-
-// ExternalPluginServiceServer is an autogenerated mock type for the ExternalPluginServiceServer type
-type ExternalPluginServiceServer struct {
- mock.Mock
-}
-
-type ExternalPluginServiceServer_CreateTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceServer_CreateTask) Return(_a0 *service.TaskCreateResponse, _a1 error) *ExternalPluginServiceServer_CreateTask {
- return &ExternalPluginServiceServer_CreateTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceServer) OnCreateTask(_a0 context.Context, _a1 *service.TaskCreateRequest) *ExternalPluginServiceServer_CreateTask {
- c_call := _m.On("CreateTask", _a0, _a1)
- return &ExternalPluginServiceServer_CreateTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceServer) OnCreateTaskMatch(matchers ...interface{}) *ExternalPluginServiceServer_CreateTask {
- c_call := _m.On("CreateTask", matchers...)
- return &ExternalPluginServiceServer_CreateTask{Call: c_call}
-}
-
-// CreateTask provides a mock function with given fields: _a0, _a1
-func (_m *ExternalPluginServiceServer) CreateTask(_a0 context.Context, _a1 *service.TaskCreateRequest) (*service.TaskCreateResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.TaskCreateResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskCreateRequest) *service.TaskCreateResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskCreateResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type ExternalPluginServiceServer_DeleteTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceServer_DeleteTask) Return(_a0 *service.TaskDeleteResponse, _a1 error) *ExternalPluginServiceServer_DeleteTask {
- return &ExternalPluginServiceServer_DeleteTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceServer) OnDeleteTask(_a0 context.Context, _a1 *service.TaskDeleteRequest) *ExternalPluginServiceServer_DeleteTask {
- c_call := _m.On("DeleteTask", _a0, _a1)
- return &ExternalPluginServiceServer_DeleteTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceServer) OnDeleteTaskMatch(matchers ...interface{}) *ExternalPluginServiceServer_DeleteTask {
- c_call := _m.On("DeleteTask", matchers...)
- return &ExternalPluginServiceServer_DeleteTask{Call: c_call}
-}
-
-// DeleteTask provides a mock function with given fields: _a0, _a1
-func (_m *ExternalPluginServiceServer) DeleteTask(_a0 context.Context, _a1 *service.TaskDeleteRequest) (*service.TaskDeleteResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.TaskDeleteResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskDeleteRequest) *service.TaskDeleteResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskDeleteResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskDeleteRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type ExternalPluginServiceServer_GetTask struct {
- *mock.Call
-}
-
-func (_m ExternalPluginServiceServer_GetTask) Return(_a0 *service.TaskGetResponse, _a1 error) *ExternalPluginServiceServer_GetTask {
- return &ExternalPluginServiceServer_GetTask{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *ExternalPluginServiceServer) OnGetTask(_a0 context.Context, _a1 *service.TaskGetRequest) *ExternalPluginServiceServer_GetTask {
- c_call := _m.On("GetTask", _a0, _a1)
- return &ExternalPluginServiceServer_GetTask{Call: c_call}
-}
-
-func (_m *ExternalPluginServiceServer) OnGetTaskMatch(matchers ...interface{}) *ExternalPluginServiceServer_GetTask {
- c_call := _m.On("GetTask", matchers...)
- return &ExternalPluginServiceServer_GetTask{Call: c_call}
-}
-
-// GetTask provides a mock function with given fields: _a0, _a1
-func (_m *ExternalPluginServiceServer) GetTask(_a0 context.Context, _a1 *service.TaskGetRequest) (*service.TaskGetResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.TaskGetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.TaskGetRequest) *service.TaskGetResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.TaskGetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.TaskGetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/IdentityServiceClient.go b/flyteidl/clients/go/admin/mocks/IdentityServiceClient.go
deleted file mode 100644
index 42868ad88..000000000
--- a/flyteidl/clients/go/admin/mocks/IdentityServiceClient.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-// IdentityServiceClient is an autogenerated mock type for the IdentityServiceClient type
-type IdentityServiceClient struct {
- mock.Mock
-}
-
-type IdentityServiceClient_UserInfo struct {
- *mock.Call
-}
-
-func (_m IdentityServiceClient_UserInfo) Return(_a0 *service.UserInfoResponse, _a1 error) *IdentityServiceClient_UserInfo {
- return &IdentityServiceClient_UserInfo{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *IdentityServiceClient) OnUserInfo(ctx context.Context, in *service.UserInfoRequest, opts ...grpc.CallOption) *IdentityServiceClient_UserInfo {
- c_call := _m.On("UserInfo", ctx, in, opts)
- return &IdentityServiceClient_UserInfo{Call: c_call}
-}
-
-func (_m *IdentityServiceClient) OnUserInfoMatch(matchers ...interface{}) *IdentityServiceClient_UserInfo {
- c_call := _m.On("UserInfo", matchers...)
- return &IdentityServiceClient_UserInfo{Call: c_call}
-}
-
-// UserInfo provides a mock function with given fields: ctx, in, opts
-func (_m *IdentityServiceClient) UserInfo(ctx context.Context, in *service.UserInfoRequest, opts ...grpc.CallOption) (*service.UserInfoResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *service.UserInfoResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.UserInfoRequest, ...grpc.CallOption) *service.UserInfoResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.UserInfoResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.UserInfoRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/IdentityServiceServer.go b/flyteidl/clients/go/admin/mocks/IdentityServiceServer.go
deleted file mode 100644
index 597956ab9..000000000
--- a/flyteidl/clients/go/admin/mocks/IdentityServiceServer.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- mock "github.com/stretchr/testify/mock"
-)
-
-// IdentityServiceServer is an autogenerated mock type for the IdentityServiceServer type
-type IdentityServiceServer struct {
- mock.Mock
-}
-
-type IdentityServiceServer_UserInfo struct {
- *mock.Call
-}
-
-func (_m IdentityServiceServer_UserInfo) Return(_a0 *service.UserInfoResponse, _a1 error) *IdentityServiceServer_UserInfo {
- return &IdentityServiceServer_UserInfo{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *IdentityServiceServer) OnUserInfo(_a0 context.Context, _a1 *service.UserInfoRequest) *IdentityServiceServer_UserInfo {
- c_call := _m.On("UserInfo", _a0, _a1)
- return &IdentityServiceServer_UserInfo{Call: c_call}
-}
-
-func (_m *IdentityServiceServer) OnUserInfoMatch(matchers ...interface{}) *IdentityServiceServer_UserInfo {
- c_call := _m.On("UserInfo", matchers...)
- return &IdentityServiceServer_UserInfo{Call: c_call}
-}
-
-// UserInfo provides a mock function with given fields: _a0, _a1
-func (_m *IdentityServiceServer) UserInfo(_a0 context.Context, _a1 *service.UserInfoRequest) (*service.UserInfoResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *service.UserInfoResponse
- if rf, ok := ret.Get(0).(func(context.Context, *service.UserInfoRequest) *service.UserInfoResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*service.UserInfoResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *service.UserInfoRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/SignalServiceClient.go b/flyteidl/clients/go/admin/mocks/SignalServiceClient.go
deleted file mode 100644
index d0a819e2b..000000000
--- a/flyteidl/clients/go/admin/mocks/SignalServiceClient.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
-
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-)
-
-// SignalServiceClient is an autogenerated mock type for the SignalServiceClient type
-type SignalServiceClient struct {
- mock.Mock
-}
-
-type SignalServiceClient_GetOrCreateSignal struct {
- *mock.Call
-}
-
-func (_m SignalServiceClient_GetOrCreateSignal) Return(_a0 *admin.Signal, _a1 error) *SignalServiceClient_GetOrCreateSignal {
- return &SignalServiceClient_GetOrCreateSignal{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceClient) OnGetOrCreateSignal(ctx context.Context, in *admin.SignalGetOrCreateRequest, opts ...grpc.CallOption) *SignalServiceClient_GetOrCreateSignal {
- c_call := _m.On("GetOrCreateSignal", ctx, in, opts)
- return &SignalServiceClient_GetOrCreateSignal{Call: c_call}
-}
-
-func (_m *SignalServiceClient) OnGetOrCreateSignalMatch(matchers ...interface{}) *SignalServiceClient_GetOrCreateSignal {
- c_call := _m.On("GetOrCreateSignal", matchers...)
- return &SignalServiceClient_GetOrCreateSignal{Call: c_call}
-}
-
-// GetOrCreateSignal provides a mock function with given fields: ctx, in, opts
-func (_m *SignalServiceClient) GetOrCreateSignal(ctx context.Context, in *admin.SignalGetOrCreateRequest, opts ...grpc.CallOption) (*admin.Signal, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.Signal
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalGetOrCreateRequest, ...grpc.CallOption) *admin.Signal); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Signal)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalGetOrCreateRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type SignalServiceClient_ListSignals struct {
- *mock.Call
-}
-
-func (_m SignalServiceClient_ListSignals) Return(_a0 *admin.SignalList, _a1 error) *SignalServiceClient_ListSignals {
- return &SignalServiceClient_ListSignals{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceClient) OnListSignals(ctx context.Context, in *admin.SignalListRequest, opts ...grpc.CallOption) *SignalServiceClient_ListSignals {
- c_call := _m.On("ListSignals", ctx, in, opts)
- return &SignalServiceClient_ListSignals{Call: c_call}
-}
-
-func (_m *SignalServiceClient) OnListSignalsMatch(matchers ...interface{}) *SignalServiceClient_ListSignals {
- c_call := _m.On("ListSignals", matchers...)
- return &SignalServiceClient_ListSignals{Call: c_call}
-}
-
-// ListSignals provides a mock function with given fields: ctx, in, opts
-func (_m *SignalServiceClient) ListSignals(ctx context.Context, in *admin.SignalListRequest, opts ...grpc.CallOption) (*admin.SignalList, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.SignalList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalListRequest, ...grpc.CallOption) *admin.SignalList); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.SignalList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalListRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type SignalServiceClient_SetSignal struct {
- *mock.Call
-}
-
-func (_m SignalServiceClient_SetSignal) Return(_a0 *admin.SignalSetResponse, _a1 error) *SignalServiceClient_SetSignal {
- return &SignalServiceClient_SetSignal{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceClient) OnSetSignal(ctx context.Context, in *admin.SignalSetRequest, opts ...grpc.CallOption) *SignalServiceClient_SetSignal {
- c_call := _m.On("SetSignal", ctx, in, opts)
- return &SignalServiceClient_SetSignal{Call: c_call}
-}
-
-func (_m *SignalServiceClient) OnSetSignalMatch(matchers ...interface{}) *SignalServiceClient_SetSignal {
- c_call := _m.On("SetSignal", matchers...)
- return &SignalServiceClient_SetSignal{Call: c_call}
-}
-
-// SetSignal provides a mock function with given fields: ctx, in, opts
-func (_m *SignalServiceClient) SetSignal(ctx context.Context, in *admin.SignalSetRequest, opts ...grpc.CallOption) (*admin.SignalSetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *admin.SignalSetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalSetRequest, ...grpc.CallOption) *admin.SignalSetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.SignalSetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalSetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/SignalServiceServer.go b/flyteidl/clients/go/admin/mocks/SignalServiceServer.go
deleted file mode 100644
index daad4a86c..000000000
--- a/flyteidl/clients/go/admin/mocks/SignalServiceServer.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
-
- mock "github.com/stretchr/testify/mock"
-)
-
-// SignalServiceServer is an autogenerated mock type for the SignalServiceServer type
-type SignalServiceServer struct {
- mock.Mock
-}
-
-type SignalServiceServer_GetOrCreateSignal struct {
- *mock.Call
-}
-
-func (_m SignalServiceServer_GetOrCreateSignal) Return(_a0 *admin.Signal, _a1 error) *SignalServiceServer_GetOrCreateSignal {
- return &SignalServiceServer_GetOrCreateSignal{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceServer) OnGetOrCreateSignal(_a0 context.Context, _a1 *admin.SignalGetOrCreateRequest) *SignalServiceServer_GetOrCreateSignal {
- c_call := _m.On("GetOrCreateSignal", _a0, _a1)
- return &SignalServiceServer_GetOrCreateSignal{Call: c_call}
-}
-
-func (_m *SignalServiceServer) OnGetOrCreateSignalMatch(matchers ...interface{}) *SignalServiceServer_GetOrCreateSignal {
- c_call := _m.On("GetOrCreateSignal", matchers...)
- return &SignalServiceServer_GetOrCreateSignal{Call: c_call}
-}
-
-// GetOrCreateSignal provides a mock function with given fields: _a0, _a1
-func (_m *SignalServiceServer) GetOrCreateSignal(_a0 context.Context, _a1 *admin.SignalGetOrCreateRequest) (*admin.Signal, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.Signal
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalGetOrCreateRequest) *admin.Signal); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.Signal)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalGetOrCreateRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type SignalServiceServer_ListSignals struct {
- *mock.Call
-}
-
-func (_m SignalServiceServer_ListSignals) Return(_a0 *admin.SignalList, _a1 error) *SignalServiceServer_ListSignals {
- return &SignalServiceServer_ListSignals{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceServer) OnListSignals(_a0 context.Context, _a1 *admin.SignalListRequest) *SignalServiceServer_ListSignals {
- c_call := _m.On("ListSignals", _a0, _a1)
- return &SignalServiceServer_ListSignals{Call: c_call}
-}
-
-func (_m *SignalServiceServer) OnListSignalsMatch(matchers ...interface{}) *SignalServiceServer_ListSignals {
- c_call := _m.On("ListSignals", matchers...)
- return &SignalServiceServer_ListSignals{Call: c_call}
-}
-
-// ListSignals provides a mock function with given fields: _a0, _a1
-func (_m *SignalServiceServer) ListSignals(_a0 context.Context, _a1 *admin.SignalListRequest) (*admin.SignalList, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.SignalList
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalListRequest) *admin.SignalList); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.SignalList)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalListRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type SignalServiceServer_SetSignal struct {
- *mock.Call
-}
-
-func (_m SignalServiceServer_SetSignal) Return(_a0 *admin.SignalSetResponse, _a1 error) *SignalServiceServer_SetSignal {
- return &SignalServiceServer_SetSignal{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *SignalServiceServer) OnSetSignal(_a0 context.Context, _a1 *admin.SignalSetRequest) *SignalServiceServer_SetSignal {
- c_call := _m.On("SetSignal", _a0, _a1)
- return &SignalServiceServer_SetSignal{Call: c_call}
-}
-
-func (_m *SignalServiceServer) OnSetSignalMatch(matchers ...interface{}) *SignalServiceServer_SetSignal {
- c_call := _m.On("SetSignal", matchers...)
- return &SignalServiceServer_SetSignal{Call: c_call}
-}
-
-// SetSignal provides a mock function with given fields: _a0, _a1
-func (_m *SignalServiceServer) SetSignal(_a0 context.Context, _a1 *admin.SignalSetRequest) (*admin.SignalSetResponse, error) {
- ret := _m.Called(_a0, _a1)
-
- var r0 *admin.SignalSetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *admin.SignalSetRequest) *admin.SignalSetResponse); ok {
- r0 = rf(_a0, _a1)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*admin.SignalSetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *admin.SignalSetRequest) error); ok {
- r1 = rf(_a0, _a1)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/TokenSource.go b/flyteidl/clients/go/admin/mocks/TokenSource.go
deleted file mode 100644
index 60cc87236..000000000
--- a/flyteidl/clients/go/admin/mocks/TokenSource.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- mock "github.com/stretchr/testify/mock"
- oauth2 "golang.org/x/oauth2"
-)
-
-// TokenSource is an autogenerated mock type for the TokenSource type
-type TokenSource struct {
- mock.Mock
-}
-
-type TokenSource_Token struct {
- *mock.Call
-}
-
-func (_m TokenSource_Token) Return(_a0 *oauth2.Token, _a1 error) *TokenSource_Token {
- return &TokenSource_Token{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *TokenSource) OnToken() *TokenSource_Token {
- c_call := _m.On("Token")
- return &TokenSource_Token{Call: c_call}
-}
-
-func (_m *TokenSource) OnTokenMatch(matchers ...interface{}) *TokenSource_Token {
- c_call := _m.On("Token", matchers...)
- return &TokenSource_Token{Call: c_call}
-}
-
-// Token provides a mock function with given fields:
-func (_m *TokenSource) Token() (*oauth2.Token, error) {
- ret := _m.Called()
-
- var r0 *oauth2.Token
- if rf, ok := ret.Get(0).(func() *oauth2.Token); ok {
- r0 = rf()
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*oauth2.Token)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/clients/go/admin/mocks/isCreateDownloadLinkRequest_Source.go b/flyteidl/clients/go/admin/mocks/isCreateDownloadLinkRequest_Source.go
deleted file mode 100644
index cd799dc9d..000000000
--- a/flyteidl/clients/go/admin/mocks/isCreateDownloadLinkRequest_Source.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import mock "github.com/stretchr/testify/mock"
-
-// isCreateDownloadLinkRequest_Source is an autogenerated mock type for the isCreateDownloadLinkRequest_Source type
-type isCreateDownloadLinkRequest_Source struct {
- mock.Mock
-}
-
-// isCreateDownloadLinkRequest_Source provides a mock function with given fields:
-func (_m *isCreateDownloadLinkRequest_Source) isCreateDownloadLinkRequest_Source() {
- _m.Called()
-}
diff --git a/flyteidl/clients/go/admin/mocks/isTaskCreateResponse_Value.go b/flyteidl/clients/go/admin/mocks/isTaskCreateResponse_Value.go
deleted file mode 100644
index b692f16f9..000000000
--- a/flyteidl/clients/go/admin/mocks/isTaskCreateResponse_Value.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import mock "github.com/stretchr/testify/mock"
-
-// isTaskCreateResponse_Value is an autogenerated mock type for the isTaskCreateResponse_Value type
-type isTaskCreateResponse_Value struct {
- mock.Mock
-}
-
-// isTaskCreateResponse_Value provides a mock function with given fields:
-func (_m *isTaskCreateResponse_Value) isTaskCreateResponse_Value() {
- _m.Called()
-}
diff --git a/flyteidl/clients/go/admin/oauth/config.go b/flyteidl/clients/go/admin/oauth/config.go
deleted file mode 100644
index 1048c91cd..000000000
--- a/flyteidl/clients/go/admin/oauth/config.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package oauth
-
-import (
- "context"
-
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-// Config oauth2.Config overridden with device endpoint for supporting Device Authorization Grant flow [RFC8268]
-type Config struct {
- *oauth2.Config
- DeviceEndpoint string
- // Audience value to be passed when requesting access token using device flow.This needs to be passed in the first request of the device flow currently and is configured in admin public client config.Required when auth server hasn't been configured with default audience"`
- Audience string
-}
-
-// BuildConfigFromMetadataService builds OAuth2 config from information retrieved through the anonymous auth metadata service.
-func BuildConfigFromMetadataService(ctx context.Context, authMetadataClient service.AuthMetadataServiceClient) (clientConf *Config, err error) {
- var clientResp *service.PublicClientAuthConfigResponse
- if clientResp, err = authMetadataClient.GetPublicClientConfig(ctx, &service.PublicClientAuthConfigRequest{}); err != nil {
- return nil, err
- }
-
- var oauthMetaResp *service.OAuth2MetadataResponse
- if oauthMetaResp, err = authMetadataClient.GetOAuth2Metadata(ctx, &service.OAuth2MetadataRequest{}); err != nil {
- return nil, err
- }
-
- clientConf = &Config{
- Config: &oauth2.Config{
- ClientID: clientResp.ClientId,
- RedirectURL: clientResp.RedirectUri,
- Scopes: clientResp.Scopes,
- Endpoint: oauth2.Endpoint{
- TokenURL: oauthMetaResp.TokenEndpoint,
- AuthURL: oauthMetaResp.AuthorizationEndpoint,
- },
- },
- DeviceEndpoint: oauthMetaResp.DeviceAuthorizationEndpoint,
- Audience: clientResp.Audience,
- }
-
- return clientConf, nil
-}
diff --git a/flyteidl/clients/go/admin/oauth/config_test.go b/flyteidl/clients/go/admin/oauth/config_test.go
deleted file mode 100644
index 3e537aeec..000000000
--- a/flyteidl/clients/go/admin/oauth/config_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package oauth
-
-import (
- "context"
- "testing"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-func TestGenerateClientConfig(t *testing.T) {
- ctx := context.Background()
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- flyteClientResp := &service.PublicClientAuthConfigResponse{
- ClientId: "dummyClient",
- RedirectUri: "dummyRedirectUri",
- Scopes: []string{"dummyScopes"},
- Audience: "dummyAudience",
- }
- oauthMetaDataResp := &service.OAuth2MetadataResponse{
- Issuer: "dummyIssuer",
- AuthorizationEndpoint: "dummyAuthEndPoint",
- TokenEndpoint: "dummyTokenEndpoint",
- CodeChallengeMethodsSupported: []string{"dummyCodeChallenege"},
- DeviceAuthorizationEndpoint: "dummyDeviceEndpoint",
- }
- mockAuthClient.OnGetPublicClientConfigMatch(ctx, mock.Anything).Return(flyteClientResp, nil)
- mockAuthClient.OnGetOAuth2MetadataMatch(ctx, mock.Anything).Return(oauthMetaDataResp, nil)
- oauthConfig, err := BuildConfigFromMetadataService(ctx, mockAuthClient)
- assert.Nil(t, err)
- assert.NotNil(t, oauthConfig)
- assert.Equal(t, "dummyClient", oauthConfig.ClientID)
- assert.Equal(t, "dummyRedirectUri", oauthConfig.RedirectURL)
- assert.Equal(t, "dummyTokenEndpoint", oauthConfig.Endpoint.TokenURL)
- assert.Equal(t, "dummyAuthEndPoint", oauthConfig.Endpoint.AuthURL)
- assert.Equal(t, "dummyDeviceEndpoint", oauthConfig.DeviceEndpoint)
- assert.Equal(t, "dummyAudience", oauthConfig.Audience)
-}
diff --git a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go
deleted file mode 100644
index e2eee411d..000000000
--- a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package pkce
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/pkg/browser"
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-const (
- stateKey = "state"
- nonceKey = "nonce"
- codeChallengeKey = "code_challenge"
- codeChallengeMethodKey = "code_challenge_method"
- codeChallengeMethodVal = "S256"
-)
-
-// TokenOrchestrator implements the main logic to initiate Pkce flow to issue access token and refresh token as well as
-// refreshing the access token if a refresh token is present.
-type TokenOrchestrator struct {
- tokenorchestrator.BaseTokenOrchestrator
- Config Config
-}
-
-// FetchTokenFromAuthFlow starts a webserver to listen to redirect callback from the authorization server at the end
-// of the flow. It then launches the browser to authenticate the user.
-func (f TokenOrchestrator) FetchTokenFromAuthFlow(ctx context.Context) (*oauth2.Token, error) {
- var err error
- var redirectURL *url.URL
- if redirectURL, err = url.Parse(f.ClientConfig.RedirectURL); err != nil {
- return nil, err
- }
-
- // pkceCodeVerifier stores the generated random value which the client will on-send to the auth server with the received
- // authorization code. This way the oauth server can verify that the base64URLEncoded(sha265(codeVerifier)) matches
- // the stored code challenge, which was initially sent through with the code+PKCE authorization request to ensure
- // that this is the original user-agent who requested the access token.
- pkceCodeVerifier := generateCodeVerifier(64)
-
- // pkceCodeChallenge stores the base64(sha256(codeVerifier)) which is sent from the
- // client to the auth server as required for PKCE.
- pkceCodeChallenge := generateCodeChallenge(pkceCodeVerifier)
-
- stateString := state(32)
- nonces := state(32)
-
- tokenChannel := make(chan *oauth2.Token, 1)
- errorChannel := make(chan error, 1)
-
- values := url.Values{}
- values.Add(stateKey, stateString)
- values.Add(nonceKey, nonces)
- values.Add(codeChallengeKey, pkceCodeChallenge)
- values.Add(codeChallengeMethodKey, codeChallengeMethodVal)
- urlToOpen := fmt.Sprintf("%s&%s", f.ClientConfig.AuthCodeURL(""), values.Encode())
-
- serveMux := http.NewServeMux()
- server := &http.Server{Addr: redirectURL.Host, Handler: serveMux, ReadHeaderTimeout: 0}
- // Register the call back handler
- serveMux.HandleFunc(redirectURL.Path, getAuthServerCallbackHandler(f.ClientConfig, pkceCodeVerifier,
- tokenChannel, errorChannel, stateString)) // the oauth2 callback endpoint
- defer server.Close()
-
- go func() {
- if err = server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
- logger.Fatal(ctx, "Couldn't start the callback http server on host %v due to %v", redirectURL.Host,
- err)
- }
- }()
-
- logger.Infof(ctx, "Opening the browser at %s", urlToOpen)
- if err = browser.OpenURL(urlToOpen); err != nil {
- return nil, err
- }
-
- ctx, cancelNow := context.WithTimeout(ctx, f.Config.BrowserSessionTimeout.Duration)
- defer cancelNow()
-
- var token *oauth2.Token
- select {
- case err = <-errorChannel:
- return nil, err
- case <-ctx.Done():
- return nil, fmt.Errorf("context was canceled during auth flow")
- case token = <-tokenChannel:
- if err = f.TokenCache.SaveToken(token); err != nil {
- logger.Errorf(ctx, "unable to save the new token due to. Will ignore the error and use the issued token. Error: %v", err)
- }
-
- return token, nil
- }
-}
-
-// NewTokenOrchestrator creates a new TokenOrchestrator that implements the main logic to initiate Pkce flow to issue
-// access token and refresh token as well as refreshing the access token if a refresh token is present.
-func NewTokenOrchestrator(baseOrchestrator tokenorchestrator.BaseTokenOrchestrator, cfg Config) (TokenOrchestrator, error) {
- return TokenOrchestrator{
- BaseTokenOrchestrator: baseOrchestrator,
- Config: cfg,
- }, nil
-}
diff --git a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go b/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go
deleted file mode 100644
index 76225de4a..000000000
--- a/flyteidl/clients/go/admin/pkce/auth_flow_orchestrator_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package pkce
-
-import (
- "context"
- "testing"
-
- "github.com/stretchr/testify/assert"
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
-)
-
-func TestFetchFromAuthFlow(t *testing.T) {
- ctx := context.Background()
- t.Run("fetch from auth flow", func(t *testing.T) {
- tokenCache := &cache.TokenCacheInMemoryProvider{}
- orchestrator, err := NewTokenOrchestrator(tokenorchestrator.BaseTokenOrchestrator{
- ClientConfig: &oauth.Config{
- Config: &oauth2.Config{
- RedirectURL: "http://localhost:8089/redirect",
- Scopes: []string{"code", "all"},
- },
- },
- TokenCache: tokenCache,
- }, Config{})
- assert.NoError(t, err)
- refreshedToken, err := orchestrator.FetchTokenFromAuthFlow(ctx)
- assert.Nil(t, refreshedToken)
- assert.NotNil(t, err)
- })
-}
diff --git a/flyteidl/clients/go/admin/pkce/config.go b/flyteidl/clients/go/admin/pkce/config.go
deleted file mode 100644
index 320afa0a4..000000000
--- a/flyteidl/clients/go/admin/pkce/config.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package pkce
-
-import "github.com/flyteorg/flytestdlib/config"
-
-// Config defines settings used for PKCE flow.
-type Config struct {
- BrowserSessionTimeout config.Duration `json:"timeout" pflag:",Amount of time the browser session would be active for authentication from client app."`
- TokenRefreshGracePeriod config.Duration `json:"refreshTime" pflag:",grace period from the token expiry after which it would refresh the token."`
-}
diff --git a/flyteidl/clients/go/admin/pkce/handle_app_call_back.go b/flyteidl/clients/go/admin/pkce/handle_app_call_back.go
deleted file mode 100644
index 0874a5a4c..000000000
--- a/flyteidl/clients/go/admin/pkce/handle_app_call_back.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package pkce
-
-import (
- "context"
- "fmt"
- "net/http"
-
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
-)
-
-func getAuthServerCallbackHandler(c *oauth.Config, codeVerifier string, tokenChannel chan *oauth2.Token,
- errorChannel chan error, stateString string) func(rw http.ResponseWriter, req *http.Request) {
-
- return func(rw http.ResponseWriter, req *http.Request) {
- _, _ = rw.Write([]byte(`Flyte Authentication
`))
- rw.Header().Set("Content-Type", "text/html; charset=utf-8")
- if req.URL.Query().Get("error") != "" {
- errorChannel <- fmt.Errorf("error on callback during authorization due to %v", req.URL.Query().Get("error"))
- _, _ = rw.Write([]byte(fmt.Sprintf(`Error!
- Error: %s
- Error Hint: %s
- Description: %s
-
`,
- req.URL.Query().Get("error"),
- req.URL.Query().Get("error_hint"),
- req.URL.Query().Get("error_description"),
- )))
- return
- }
- if req.URL.Query().Get("code") == "" {
- errorChannel <- fmt.Errorf("could not find the authorize code")
- _, _ = rw.Write([]byte(fmt.Sprintln(`Could not find the authorize code.
`)))
- return
- }
- if req.URL.Query().Get("state") != stateString {
- errorChannel <- fmt.Errorf("possibly a csrf attack")
- _, _ = rw.Write([]byte(fmt.Sprintln(`Sorry we can't serve your request'.
`)))
- return
- }
- // We'll check whether we sent a code+PKCE request, and if so, send the code_verifier along when requesting the access token.
- var opts []oauth2.AuthCodeOption
- opts = append(opts, oauth2.SetAuthURLParam("code_verifier", codeVerifier))
-
- token, err := c.Exchange(context.Background(), req.URL.Query().Get("code"), opts...)
- if err != nil {
- errorChannel <- fmt.Errorf("error while exchanging auth code due to %v", err)
- _, _ = rw.Write([]byte(fmt.Sprintf(`Couldn't get access token due to error: %s
`, err.Error())))
- return
- }
- _, _ = rw.Write([]byte(`Cool! Your authentication was successful and you can close the window.
`))
- tokenChannel <- token
- }
-}
diff --git a/flyteidl/clients/go/admin/pkce/handle_app_call_back_test.go b/flyteidl/clients/go/admin/pkce/handle_app_call_back_test.go
deleted file mode 100644
index 91eed672c..000000000
--- a/flyteidl/clients/go/admin/pkce/handle_app_call_back_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-package pkce
-
-import (
- "errors"
- "net/http"
- "net/url"
- "strings"
- "testing"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
-
- "github.com/stretchr/testify/assert"
- testhttp "github.com/stretchr/testify/http"
- "golang.org/x/oauth2"
-)
-
-var (
- rw *testhttp.TestResponseWriter
- req *http.Request
- callBackFn func(rw http.ResponseWriter, req *http.Request)
-)
-
-func HandleAppCallBackSetup(t *testing.T, state string) (tokenChannel chan *oauth2.Token, errorChannel chan error) {
- var testAuthConfig *oauth.Config
- errorChannel = make(chan error, 1)
- tokenChannel = make(chan *oauth2.Token)
- testAuthConfig = &oauth.Config{Config: &oauth2.Config{}, DeviceEndpoint: "dummyDeviceEndpoint"}
- callBackFn = getAuthServerCallbackHandler(testAuthConfig, "", tokenChannel, errorChannel, state)
- assert.NotNil(t, callBackFn)
- req = &http.Request{
- Method: http.MethodGet,
- URL: &url.URL{
- Scheme: "http",
- Host: "dummyHost",
- Path: "dummyPath",
- RawQuery: "&error=invalid_request",
- },
- }
- rw = &testhttp.TestResponseWriter{}
- return
-}
-
-func TestHandleAppCallBackWithErrorInRequest(t *testing.T) {
- tokenChannel, errorChannel := HandleAppCallBackSetup(t, "")
- req = &http.Request{
- Method: http.MethodGet,
- URL: &url.URL{
- Scheme: "http",
- Host: "dummyHost",
- Path: "dummyPath",
- RawQuery: "&error=invalid_request",
- },
- }
- callBackFn(rw, req)
- var errorValue error
- select {
- case errorValue = <-errorChannel:
- assert.NotNil(t, errorValue)
- assert.True(t, strings.Contains(rw.Output, "invalid_request"))
- assert.Equal(t, errors.New("error on callback during authorization due to invalid_request"), errorValue)
- case <-tokenChannel:
- assert.Fail(t, "received a token for a failed test")
- }
-}
-
-func TestHandleAppCallBackWithCodeNotFound(t *testing.T) {
- tokenChannel, errorChannel := HandleAppCallBackSetup(t, "")
- req = &http.Request{
- Method: http.MethodGet,
- URL: &url.URL{
- Scheme: "http",
- Host: "dummyHost",
- Path: "dummyPath",
- RawQuery: "",
- },
- }
- callBackFn(rw, req)
- var errorValue error
- select {
- case errorValue = <-errorChannel:
- assert.NotNil(t, errorValue)
- assert.True(t, strings.Contains(rw.Output, "Could not find the authorize code"))
- assert.Equal(t, errors.New("could not find the authorize code"), errorValue)
- case <-tokenChannel:
- assert.Fail(t, "received a token for a failed test")
- }
-}
-
-func TestHandleAppCallBackCsrfAttach(t *testing.T) {
- tokenChannel, errorChannel := HandleAppCallBackSetup(t, "the real state")
- req = &http.Request{
- Method: http.MethodGet,
- URL: &url.URL{
- Scheme: "http",
- Host: "dummyHost",
- Path: "dummyPath",
- RawQuery: "&code=dummyCode&state=imposterString",
- },
- }
- callBackFn(rw, req)
- var errorValue error
- select {
- case errorValue = <-errorChannel:
- assert.NotNil(t, errorValue)
- assert.True(t, strings.Contains(rw.Output, "Sorry we can't serve your request"))
- assert.Equal(t, errors.New("possibly a csrf attack"), errorValue)
- case <-tokenChannel:
- assert.Fail(t, "received a token for a failed test")
- }
-}
-
-func TestHandleAppCallBackFailedTokenExchange(t *testing.T) {
- tokenChannel, errorChannel := HandleAppCallBackSetup(t, "realStateString")
- req = &http.Request{
- Method: http.MethodGet,
- URL: &url.URL{
- Scheme: "http",
- Host: "dummyHost",
- Path: "dummyPath",
- RawQuery: "&code=dummyCode&state=realStateString",
- },
- }
- rw = &testhttp.TestResponseWriter{}
- callBackFn(rw, req)
- var errorValue error
- select {
- case errorValue = <-errorChannel:
- assert.NotNil(t, errorValue)
- assert.True(t, strings.Contains(errorValue.Error(), "error while exchanging auth code due"))
- case <-tokenChannel:
- assert.Fail(t, "received a token for a failed test")
- }
-}
diff --git a/flyteidl/clients/go/admin/pkce/oauth2_client.go b/flyteidl/clients/go/admin/pkce/oauth2_client.go
deleted file mode 100644
index cab56df13..000000000
--- a/flyteidl/clients/go/admin/pkce/oauth2_client.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Provides the setup required for the client to perform the "Authorization Code" flow with PKCE in order to obtain an
-// access token for public/untrusted clients.
-package pkce
-
-import (
- "crypto/sha256"
- "encoding/base64"
-
- "golang.org/x/oauth2"
- rand2 "k8s.io/apimachinery/pkg/util/rand"
-)
-
-// The following sets up the requirements for generating a standards compliant PKCE code verifier.
-const codeVerifierLenMin = 43
-const codeVerifierLenMax = 128
-
-// generateCodeVerifier provides an easy way to generate an n-length randomised
-// code verifier.
-func generateCodeVerifier(n int) string {
- // Enforce standards compliance...
- if n < codeVerifierLenMin {
- n = codeVerifierLenMin
- }
-
- if n > codeVerifierLenMax {
- n = codeVerifierLenMax
- }
-
- return randomString(n)
-}
-
-func randomString(length int) string {
- return rand2.String(length)
-}
-
-// generateCodeChallenge returns a standards compliant PKCE S(HA)256 code
-// challenge.
-func generateCodeChallenge(codeVerifier string) string {
- // Create a sha-265 hash from the code verifier...
- s256 := sha256.New()
- _, _ = s256.Write([]byte(codeVerifier))
- // Then base64 encode the hash sum to create a code challenge...
- return base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
-}
-
-func state(n int) string {
- data := randomString(n)
- return base64.RawURLEncoding.EncodeToString([]byte(data))
-}
-
-// SimpleTokenSource defines a simple token source that caches a token in memory.
-type SimpleTokenSource struct {
- CachedToken *oauth2.Token
-}
-
-func (ts *SimpleTokenSource) Token() (*oauth2.Token, error) {
- t := ts.CachedToken
- return t, nil
-}
diff --git a/flyteidl/clients/go/admin/pkce/testdata/empty_access_token.json b/flyteidl/clients/go/admin/pkce/testdata/empty_access_token.json
deleted file mode 100644
index 474f4762e..000000000
--- a/flyteidl/clients/go/admin/pkce/testdata/empty_access_token.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "access_token":"",
- "token_type":"bearer",
- "refresh_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1MzM1MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiZi5hbGwiLCJhY2Nlc3NfdG9rZW4iXSwic3ViIjoiMTE0NTI3ODE1MzA1MTI4OTc0NDcwIiwidXNlcl9pbmZvIjp7ImZhbWlseV9uYW1lIjoiTWFoaW5kcmFrYXIiLCJnaXZlbl9uYW1lIjoiUHJhZnVsbGEiLCJuYW1lIjoiUHJhZnVsbGEgTWFoaW5kcmFrYXIiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2p1VDFrOC04YTV2QkdPSUYxYURnaFltRng4aEQ5S05pUjVqblp1PXM5Ni1jIiwic3ViamVjdCI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCJ9fQ.YKom5-gE4e84rJJIfxcpbMzgjZT33UZ27UTa1y8pK2BAWaPjIZtwudwDHQ5Rd3m0mJJWhBp0j0e8h9DvzBUdpsnGMXSCYKP-ag9y9k5OW59FMm9RqIakWHtj6NPnxGO1jAsaNCYePj8knR7pBLCLCse2taDHUJ8RU1F0DeHNr2y-JupgG5y1vjBcb-9eD8OwOSTp686_hm7XoJlxiKx8dj2O7HPH7M2pAHA_0bVrKKj7Y_s3fRhkm_Aq6LRdA-IiTl9xJQxgVUreejls9-RR9mSTKj6A81-Isz3qAUttVVaA4OT5OdW879_yT7OSLw_QwpXzNZ7qOR7OIpmL_xZXig",
- "expiry":"2021-04-27T19:55:26.658635+05:30"
-}
\ No newline at end of file
diff --git a/flyteidl/clients/go/admin/testdata/invalid-root.pem b/flyteidl/clients/go/admin/testdata/invalid-root.pem
deleted file mode 100644
index e69de29bb..000000000
diff --git a/flyteidl/clients/go/admin/testdata/root.pem b/flyteidl/clients/go/admin/testdata/root.pem
deleted file mode 100644
index 856c15ad9..000000000
--- a/flyteidl/clients/go/admin/testdata/root.pem
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEBDCCAuygAwIBAgIDAjppMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMTMwNDA1MTUxNTU1WhcNMTUwNDA0MTUxNTU1WjBJMQswCQYDVQQG
-EwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVy
-bmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NP
-VaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtv
-h8DQUB8oMANA2ghzUWx//zo8pzcGjr1LEQTrfSTe5vn8MXH7lNVg8y5Kr0LSy+rE
-ahqyzFPdFUuLH8gZYR/Nnag+YyuENWllhMgZxUYi+FOVvuOAShDGKuy6lyARxzmZ
-EASg8GF6lSWMTlJ14rbtCMoU/M4iarNOz0YDl5cDfsCx3nuvRTPPuj5xt970JSXC
-DTWJnZ37DhF5iR43xa+OcmkCAwEAAaOB+zCB+DAfBgNVHSMEGDAWgBTAephojYn7
-qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wEgYD
-VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwOgYDVR0fBDMwMTAvoC2g
-K4YpaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9ndGdsb2JhbC5jcmwwPQYI
-KwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwOi8vZ3RnbG9iYWwtb2NzcC5n
-ZW90cnVzdC5jb20wFwYDVR0gBBAwDjAMBgorBgEEAdZ5AgUBMA0GCSqGSIb3DQEB
-BQUAA4IBAQA21waAESetKhSbOHezI6B1WLuxfoNCunLaHtiONgaX4PCVOzf9G0JY
-/iLIa704XtE7JW4S615ndkZAkNoUyHgN7ZVm2o6Gb4ChulYylYbc3GrKBIxbf/a/
-zG+FA1jDaFETzf3I93k9mTXwVqO94FntT0QJo544evZG0R0SnU++0ED8Vf4GXjza
-HFa9llF7b1cq26KqltyMdMKVvvBulRP/F/A8rLIQjcxz++iPAsbw+zOzlTvjwsto
-WHPbqCRiOwY1nQ2pM714A5AuTHhdUDqB1O6gyHA43LL5Z/qHQF1hwFGPa4NrzQU6
-yuGnBXj8ytqU0CwIPX4WecigUCAkVDNx
------END CERTIFICATE-----
\ No newline at end of file
diff --git a/flyteidl/clients/go/admin/testdata/secret_key b/flyteidl/clients/go/admin/testdata/secret_key
deleted file mode 100755
index b23f84a84..000000000
--- a/flyteidl/clients/go/admin/testdata/secret_key
+++ /dev/null
@@ -1 +0,0 @@
-pptDrk6qoJfM0Z1iFxvgUjxx9vEc46UuE6TvOmBJ4aY
\ No newline at end of file
diff --git a/flyteidl/clients/go/admin/token_source.go b/flyteidl/clients/go/admin/token_source.go
deleted file mode 100644
index 33610e287..000000000
--- a/flyteidl/clients/go/admin/token_source.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package admin
-
-import (
- "context"
-
- "golang.org/x/oauth2"
-)
-
-// CustomHeaderTokenSource class is here because we cannot use the normal "github.com/grpc/grpc-go/credentials/oauth" package to satisfy
-// the credentials.PerRPCCredentials interface. This is because we want to be able to support a different 'header'
-// when passing the token in the gRPC call's metadata. The default is filled in in the constructor if none is supplied.
-type CustomHeaderTokenSource struct {
- tokenSource oauth2.TokenSource
- customHeader string
- insecure bool
-}
-
-const DefaultAuthorizationHeader = "authorization"
-
-// RequireTransportSecurity returns whether this credentials class requires TLS/SSL. OAuth uses Bearer tokens that are
-// susceptible to MITM (Man-In-The-Middle) attacks that are mitigated by TLS/SSL. We may return false here to make it
-// easier to setup auth. However, in a production environment, TLS for OAuth2 is a requirement.
-// see also: https://tools.ietf.org/html/rfc6749#section-3.1
-func (ts CustomHeaderTokenSource) RequireTransportSecurity() bool {
- return !ts.insecure
-}
-
-// GetRequestMetadata gets the authorization metadata as a map using a TokenSource to generate a token
-func (ts CustomHeaderTokenSource) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {
- token, err := ts.tokenSource.Token()
- if err != nil {
- return nil, err
- }
-
- return map[string]string{
- ts.customHeader: token.Type() + " " + token.AccessToken,
- }, nil
-}
-
-func NewCustomHeaderTokenSource(source oauth2.TokenSource, insecure bool, customHeader string) CustomHeaderTokenSource {
- header := DefaultAuthorizationHeader
- if customHeader != "" {
- header = customHeader
- }
-
- return CustomHeaderTokenSource{
- tokenSource: source,
- customHeader: header,
- insecure: insecure,
- }
-}
diff --git a/flyteidl/clients/go/admin/token_source_provider.go b/flyteidl/clients/go/admin/token_source_provider.go
deleted file mode 100644
index ba6bb0a46..000000000
--- a/flyteidl/clients/go/admin/token_source_provider.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package admin
-
-import (
- "context"
- "fmt"
- "io/ioutil"
- "net/url"
- "os"
- "strings"
- "sync"
-
- "golang.org/x/oauth2"
- "golang.org/x/oauth2/clientcredentials"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/clients/go/admin/deviceflow"
- "github.com/flyteorg/flyteidl/clients/go/admin/externalprocess"
- "github.com/flyteorg/flyteidl/clients/go/admin/pkce"
- "github.com/flyteorg/flyteidl/clients/go/admin/tokenorchestrator"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-//go:generate mockery -name TokenSource
-type TokenSource interface {
- Token() (*oauth2.Token, error)
-}
-
-const (
- audienceKey = "audience"
-)
-
-// TokenSourceProvider defines the interface needed to provide a TokenSource that is used to
-// create a client with authentication enabled.
-type TokenSourceProvider interface {
- GetTokenSource(ctx context.Context) (oauth2.TokenSource, error)
-}
-
-func NewTokenSourceProvider(ctx context.Context, cfg *Config, tokenCache cache.TokenCache,
- authClient service.AuthMetadataServiceClient) (TokenSourceProvider, error) {
-
- var tokenProvider TokenSourceProvider
- var err error
- switch cfg.AuthType {
- case AuthTypeClientSecret:
- tokenURL := cfg.TokenURL
- if len(tokenURL) == 0 {
- metadata, err := authClient.GetOAuth2Metadata(ctx, &service.OAuth2MetadataRequest{})
- if err != nil {
- return nil, fmt.Errorf("failed to fetch auth metadata. Error: %v", err)
- }
-
- tokenURL = metadata.TokenEndpoint
- }
-
- scopes := cfg.Scopes
- audienceValue := cfg.Audience
-
- if len(scopes) == 0 || cfg.UseAudienceFromAdmin {
- publicClientConfig, err := authClient.GetPublicClientConfig(ctx, &service.PublicClientAuthConfigRequest{})
- if err != nil {
- return nil, fmt.Errorf("failed to fetch client metadata. Error: %v", err)
- }
- // Update scopes from publicClientConfig
- if len(scopes) == 0 {
- scopes = publicClientConfig.Scopes
- }
- // Update audience from publicClientConfig
- if cfg.UseAudienceFromAdmin {
- audienceValue = publicClientConfig.Audience
- }
- }
-
- tokenProvider, err = NewClientCredentialsTokenSourceProvider(ctx, cfg, scopes, tokenURL, tokenCache, audienceValue)
- if err != nil {
- return nil, err
- }
- case AuthTypePkce:
- baseTokenOrchestrator, err := tokenorchestrator.NewBaseTokenOrchestrator(ctx, tokenCache, authClient)
- if err != nil {
- return nil, err
- }
-
- tokenProvider, err = NewPKCETokenSourceProvider(baseTokenOrchestrator, cfg.PkceConfig)
- if err != nil {
- return nil, err
- }
- case AuthTypeExternalCommand:
- tokenProvider, err = NewExternalTokenSourceProvider(cfg.Command)
- if err != nil {
- return nil, err
- }
- case AuthTypeDeviceFlow:
- baseTokenOrchestrator, err := tokenorchestrator.NewBaseTokenOrchestrator(ctx, tokenCache, authClient)
- if err != nil {
- return nil, err
- }
-
- tokenProvider, err = NewDeviceFlowTokenSourceProvider(baseTokenOrchestrator, cfg.DeviceFlowConfig)
- if err != nil {
- return nil, err
- }
- default:
- return nil, fmt.Errorf("unsupported type %v", cfg.AuthType)
- }
-
- return tokenProvider, nil
-}
-
-type ExternalTokenSourceProvider struct {
- command []string
-}
-
-func NewExternalTokenSourceProvider(command []string) (TokenSourceProvider, error) {
- return &ExternalTokenSourceProvider{command: command}, nil
-}
-
-func (e ExternalTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) {
- output, err := externalprocess.Execute(e.command)
- if err != nil {
- return nil, err
- }
-
- return oauth2.StaticTokenSource(&oauth2.Token{
- AccessToken: strings.Trim(string(output), "\t \n"),
- TokenType: "bearer",
- }), nil
-}
-
-type PKCETokenSourceProvider struct {
- tokenOrchestrator pkce.TokenOrchestrator
-}
-
-func NewPKCETokenSourceProvider(baseTokenOrchestrator tokenorchestrator.BaseTokenOrchestrator, pkceCfg pkce.Config) (TokenSourceProvider, error) {
- tokenOrchestrator, err := pkce.NewTokenOrchestrator(baseTokenOrchestrator, pkceCfg)
- if err != nil {
- return nil, err
- }
- return PKCETokenSourceProvider{tokenOrchestrator: tokenOrchestrator}, nil
-}
-
-func (p PKCETokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) {
- return GetPKCEAuthTokenSource(ctx, p.tokenOrchestrator)
-}
-
-// Returns the token source which would be used for three legged oauth. eg : for admin to authorize access to flytectl
-func GetPKCEAuthTokenSource(ctx context.Context, pkceTokenOrchestrator pkce.TokenOrchestrator) (oauth2.TokenSource, error) {
- // explicitly ignore error while fetching token from cache.
- authToken, err := pkceTokenOrchestrator.FetchTokenFromCacheOrRefreshIt(ctx, pkceTokenOrchestrator.Config.BrowserSessionTimeout)
- if err != nil {
- logger.Warnf(ctx, "Failed fetching from cache. Will restart the flow. Error: %v", err)
- }
-
- if authToken == nil {
- // Fetch using auth flow
- if authToken, err = pkceTokenOrchestrator.FetchTokenFromAuthFlow(ctx); err != nil {
- logger.Errorf(ctx, "Error fetching token using auth flow due to %v", err)
- return nil, err
- }
- }
-
- return &pkce.SimpleTokenSource{
- CachedToken: authToken,
- }, nil
-}
-
-type ClientCredentialsTokenSourceProvider struct {
- ccConfig clientcredentials.Config
- tokenCache cache.TokenCache
-}
-
-func NewClientCredentialsTokenSourceProvider(ctx context.Context, cfg *Config, scopes []string, tokenURL string,
- tokenCache cache.TokenCache, audience string) (TokenSourceProvider, error) {
- var secret string
- if len(cfg.ClientSecretEnvVar) > 0 {
- secret = os.Getenv(cfg.ClientSecretEnvVar)
- } else if len(cfg.ClientSecretLocation) > 0 {
- secretBytes, err := ioutil.ReadFile(cfg.ClientSecretLocation)
- if err != nil {
- logger.Errorf(ctx, "Error reading secret from location %s", cfg.ClientSecretLocation)
- return nil, err
- }
- secret = string(secretBytes)
- }
- endpointParams := url.Values{}
- if len(audience) > 0 {
- endpointParams = url.Values{audienceKey: {audience}}
- }
- secret = strings.TrimSpace(secret)
- if tokenCache == nil {
- tokenCache = &cache.TokenCacheInMemoryProvider{}
- }
- return ClientCredentialsTokenSourceProvider{
- ccConfig: clientcredentials.Config{
- ClientID: cfg.ClientID,
- ClientSecret: secret,
- TokenURL: tokenURL,
- Scopes: scopes,
- EndpointParams: endpointParams,
- },
- tokenCache: tokenCache}, nil
-}
-
-func (p ClientCredentialsTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) {
- return &customTokenSource{
- ctx: ctx,
- new: p.ccConfig.TokenSource(ctx),
- mu: sync.Mutex{},
- tokenCache: p.tokenCache,
- }, nil
-}
-
-type customTokenSource struct {
- ctx context.Context
- mu sync.Mutex // guards everything else
- new oauth2.TokenSource
- tokenCache cache.TokenCache
-}
-
-func (s *customTokenSource) Token() (*oauth2.Token, error) {
- s.mu.Lock()
- defer s.mu.Unlock()
-
- if token, err := s.tokenCache.GetToken(); err == nil && token.Valid() {
- return token, nil
- }
-
- token, err := s.new.Token()
- if err != nil {
- return nil, fmt.Errorf("failed to get token: %w", err)
- }
- logger.Infof(s.ctx, "retrieved token with expiry %v", token.Expiry)
-
- err = s.tokenCache.SaveToken(token)
- if err != nil {
- logger.Warnf(s.ctx, "failed to cache token")
- }
-
- return token, nil
-}
-
-type DeviceFlowTokenSourceProvider struct {
- tokenOrchestrator deviceflow.TokenOrchestrator
-}
-
-func NewDeviceFlowTokenSourceProvider(baseTokenOrchestrator tokenorchestrator.BaseTokenOrchestrator, deviceFlowConfig deviceflow.Config) (TokenSourceProvider, error) {
-
- tokenOrchestrator, err := deviceflow.NewDeviceFlowTokenOrchestrator(baseTokenOrchestrator, deviceFlowConfig)
- if err != nil {
- return nil, err
- }
-
- return DeviceFlowTokenSourceProvider{tokenOrchestrator: tokenOrchestrator}, nil
-}
-
-func (p DeviceFlowTokenSourceProvider) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error) {
- return GetDeviceFlowAuthTokenSource(ctx, p.tokenOrchestrator)
-}
-
-// GetDeviceFlowAuthTokenSource Returns the token source which would be used for device auth flow
-func GetDeviceFlowAuthTokenSource(ctx context.Context, deviceFlowOrchestrator deviceflow.TokenOrchestrator) (oauth2.TokenSource, error) {
- // explicitly ignore error while fetching token from cache.
- authToken, err := deviceFlowOrchestrator.FetchTokenFromCacheOrRefreshIt(ctx, deviceFlowOrchestrator.Config.TokenRefreshGracePeriod)
- if err != nil {
- logger.Warnf(ctx, "Failed fetching from cache. Will restart the flow. Error: %v", err)
- }
-
- if authToken == nil {
- // Fetch using auth flow
- if authToken, err = deviceFlowOrchestrator.FetchTokenFromAuthFlow(ctx); err != nil {
- logger.Errorf(ctx, "Error fetching token using auth flow due to %v", err)
- return nil, err
- }
- }
-
- return &pkce.SimpleTokenSource{
- CachedToken: authToken,
- }, nil
-}
diff --git a/flyteidl/clients/go/admin/token_source_provider_test.go b/flyteidl/clients/go/admin/token_source_provider_test.go
deleted file mode 100644
index a0d4cb240..000000000
--- a/flyteidl/clients/go/admin/token_source_provider_test.go
+++ /dev/null
@@ -1,162 +0,0 @@
-package admin
-
-import (
- "context"
- "fmt"
- "net/url"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
- "golang.org/x/oauth2"
-
- tokenCacheMocks "github.com/flyteorg/flyteidl/clients/go/admin/cache/mocks"
- adminMocks "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-)
-
-func TestNewTokenSourceProvider(t *testing.T) {
- ctx := context.Background()
- tests := []struct {
- name string
- audienceCfg string
- scopesCfg []string
- useAudienceFromAdmin bool
- clientConfigResponse service.PublicClientAuthConfigResponse
- expectedAudience string
- expectedScopes []string
- expectedCallsPubEndpoint int
- }{
- {
- name: "audience from client config",
- audienceCfg: "clientConfiguredAud",
- scopesCfg: []string{"all"},
- clientConfigResponse: service.PublicClientAuthConfigResponse{},
- expectedAudience: "clientConfiguredAud",
- expectedScopes: []string{"all"},
- expectedCallsPubEndpoint: 0,
- },
- {
- name: "audience from public client response",
- audienceCfg: "clientConfiguredAud",
- useAudienceFromAdmin: true,
- scopesCfg: []string{"all"},
- clientConfigResponse: service.PublicClientAuthConfigResponse{Audience: "AdminConfiguredAud", Scopes: []string{}},
- expectedAudience: "AdminConfiguredAud",
- expectedScopes: []string{"all"},
- expectedCallsPubEndpoint: 1,
- },
-
- {
- name: "audience from client with useAudience from admin false",
- audienceCfg: "clientConfiguredAud",
- useAudienceFromAdmin: false,
- scopesCfg: []string{"all"},
- clientConfigResponse: service.PublicClientAuthConfigResponse{Audience: "AdminConfiguredAud", Scopes: []string{}},
- expectedAudience: "clientConfiguredAud",
- expectedScopes: []string{"all"},
- expectedCallsPubEndpoint: 0,
- },
- }
- for _, test := range tests {
- cfg := GetConfig(ctx)
- tokenCache := &tokenCacheMocks.TokenCache{}
- metadataClient := &adminMocks.AuthMetadataServiceClient{}
- metadataClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(&service.OAuth2MetadataResponse{}, nil)
- metadataClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(&test.clientConfigResponse, nil)
- cfg.AuthType = AuthTypeClientSecret
- cfg.Audience = test.audienceCfg
- cfg.Scopes = test.scopesCfg
- cfg.UseAudienceFromAdmin = test.useAudienceFromAdmin
- flyteTokenSource, err := NewTokenSourceProvider(ctx, cfg, tokenCache, metadataClient)
- assert.True(t, metadataClient.AssertNumberOfCalls(t, "GetPublicClientConfig", test.expectedCallsPubEndpoint))
- assert.NoError(t, err)
- assert.NotNil(t, flyteTokenSource)
- clientCredSourceProvider, ok := flyteTokenSource.(ClientCredentialsTokenSourceProvider)
- assert.True(t, ok)
- assert.Equal(t, test.expectedScopes, clientCredSourceProvider.ccConfig.Scopes)
- assert.Equal(t, url.Values{audienceKey: {test.expectedAudience}}, clientCredSourceProvider.ccConfig.EndpointParams)
- }
-}
-
-func TestCustomTokenSource_Token(t *testing.T) {
- ctx := context.Background()
- cfg := GetConfig(ctx)
- cfg.ClientSecretLocation = ""
-
- minuteAgo := time.Now().Add(-time.Minute)
- hourAhead := time.Now().Add(time.Hour)
- twoHourAhead := time.Now().Add(2 * time.Hour)
- invalidToken := oauth2.Token{AccessToken: "foo", Expiry: minuteAgo}
- validToken := oauth2.Token{AccessToken: "foo", Expiry: hourAhead}
- newToken := oauth2.Token{AccessToken: "foo", Expiry: twoHourAhead}
-
- tests := []struct {
- name string
- token *oauth2.Token
- newToken *oauth2.Token
- expectedToken *oauth2.Token
- }{
- {
- name: "no cached token",
- token: nil,
- newToken: &newToken,
- expectedToken: &newToken,
- },
- {
- name: "cached token valid",
- token: &validToken,
- newToken: nil,
- expectedToken: &validToken,
- },
- {
- name: "cached token expired",
- token: &invalidToken,
- newToken: &newToken,
- expectedToken: &newToken,
- },
- {
- name: "failed new token",
- token: &invalidToken,
- newToken: nil,
- expectedToken: nil,
- },
- }
-
- for _, test := range tests {
- t.Run(test.name, func(t *testing.T) {
- tokenCache := &tokenCacheMocks.TokenCache{}
- tokenCache.OnGetToken().Return(test.token, nil).Once()
- provider, err := NewClientCredentialsTokenSourceProvider(ctx, cfg, []string{}, "", tokenCache, "")
- assert.NoError(t, err)
- source, err := provider.GetTokenSource(ctx)
- assert.NoError(t, err)
- customSource, ok := source.(*customTokenSource)
- assert.True(t, ok)
-
- mockSource := &adminMocks.TokenSource{}
- if test.token != &validToken {
- if test.newToken != nil {
- mockSource.OnToken().Return(test.newToken, nil)
- } else {
- mockSource.OnToken().Return(nil, fmt.Errorf("refresh token failed"))
- }
- }
- customSource.new = mockSource
- if test.newToken != nil {
- tokenCache.OnSaveToken(test.newToken).Return(nil).Once()
- }
- token, err := source.Token()
- if test.expectedToken != nil {
- assert.Equal(t, test.expectedToken, token)
- assert.NoError(t, err)
- } else {
- assert.Nil(t, token)
- assert.Error(t, err)
- }
- tokenCache.AssertExpectations(t)
- mockSource.AssertExpectations(t)
- })
- }
-}
diff --git a/flyteidl/clients/go/admin/token_source_test.go b/flyteidl/clients/go/admin/token_source_test.go
deleted file mode 100644
index 0e247bfe8..000000000
--- a/flyteidl/clients/go/admin/token_source_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package admin
-
-import (
- "context"
- "testing"
-
- "github.com/stretchr/testify/assert"
- "golang.org/x/oauth2"
-)
-
-type DummyTestTokenSource struct {
- oauth2.TokenSource
-}
-
-func (d DummyTestTokenSource) Token() (*oauth2.Token, error) {
- return &oauth2.Token{
- AccessToken: "abc",
- }, nil
-}
-
-func TestNewTokenSource(t *testing.T) {
- tokenSource := DummyTestTokenSource{}
- flyteTokenSource := NewCustomHeaderTokenSource(tokenSource, true, "test")
- metadata, err := flyteTokenSource.GetRequestMetadata(context.Background())
- assert.NoError(t, err)
- assert.Equal(t, "Bearer abc", metadata["test"])
-}
diff --git a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go
deleted file mode 100644
index 1136435da..000000000
--- a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package tokenorchestrator
-
-import (
- "context"
- "fmt"
- "time"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
-
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
- "github.com/flyteorg/flytestdlib/config"
- "github.com/flyteorg/flytestdlib/logger"
-)
-
-// BaseTokenOrchestrator implements the main logic to initiate device authorization flow
-type BaseTokenOrchestrator struct {
- ClientConfig *oauth.Config
- TokenCache cache.TokenCache
-}
-
-// RefreshToken attempts to refresh the access token if a refresh token is provided.
-func (t BaseTokenOrchestrator) RefreshToken(ctx context.Context, token *oauth2.Token) (*oauth2.Token, error) {
- ts := t.ClientConfig.TokenSource(ctx, token)
- var refreshedToken *oauth2.Token
- var err error
- refreshedToken, err = ts.Token()
- if err != nil {
- logger.Warnf(ctx, "failed to refresh the token due to %v and will be doing re-auth", err)
- return nil, err
- }
-
- if refreshedToken != nil {
- logger.Debugf(ctx, "got a response from the refresh grant for old expiry %v with new expiry %v",
- token.Expiry, refreshedToken.Expiry)
- if refreshedToken.AccessToken != token.AccessToken {
- if err = t.TokenCache.SaveToken(refreshedToken); err != nil {
- logger.Errorf(ctx, "unable to save the new token due to %v", err)
- return nil, err
- }
- }
- }
-
- return refreshedToken, nil
-}
-
-// FetchTokenFromCacheOrRefreshIt fetches the token from cache and refreshes it if it'll expire within the
-// Config.TokenRefreshGracePeriod period.
-func (t BaseTokenOrchestrator) FetchTokenFromCacheOrRefreshIt(ctx context.Context, tokenRefreshGracePeriod config.Duration) (token *oauth2.Token, err error) {
- token, err = t.TokenCache.GetToken()
- if err != nil {
- return nil, err
- }
-
- if !token.Valid() {
- return nil, fmt.Errorf("token from cache is invalid")
- }
-
- // If token doesn't need to be refreshed, return it.
- if time.Now().Before(token.Expiry.Add(-tokenRefreshGracePeriod.Duration)) {
- logger.Infof(ctx, "found the token in the cache")
- return token, nil
- }
- token.Expiry = token.Expiry.Add(-tokenRefreshGracePeriod.Duration)
-
- token, err = t.RefreshToken(ctx, token)
- if err != nil {
- return nil, fmt.Errorf("failed to refresh token using cached token. Error: %w", err)
- }
-
- if !token.Valid() {
- return nil, fmt.Errorf("refreshed token is invalid")
- }
-
- err = t.TokenCache.SaveToken(token)
- if err != nil {
- return nil, fmt.Errorf("failed to save token in the token cache. Error: %w", err)
- }
-
- return token, nil
-}
-
-func NewBaseTokenOrchestrator(ctx context.Context, tokenCache cache.TokenCache, authClient service.AuthMetadataServiceClient) (BaseTokenOrchestrator, error) {
- clientConfig, err := oauth.BuildConfigFromMetadataService(ctx, authClient)
- if err != nil {
- return BaseTokenOrchestrator{}, err
- }
- return BaseTokenOrchestrator{
- ClientConfig: clientConfig,
- TokenCache: tokenCache,
- }, nil
-}
diff --git a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go b/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go
deleted file mode 100644
index 136719a93..000000000
--- a/flyteidl/clients/go/admin/tokenorchestrator/base_token_orchestrator_test.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package tokenorchestrator
-
-import (
- "context"
- "encoding/json"
- "os"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
- "golang.org/x/oauth2"
-
- "github.com/flyteorg/flyteidl/clients/go/admin/cache"
- cacheMocks "github.com/flyteorg/flyteidl/clients/go/admin/cache/mocks"
- "github.com/flyteorg/flyteidl/clients/go/admin/mocks"
- "github.com/flyteorg/flyteidl/clients/go/admin/oauth"
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
- "github.com/flyteorg/flytestdlib/config"
-)
-
-func TestRefreshTheToken(t *testing.T) {
- ctx := context.Background()
- clientConf := &oauth.Config{
- Config: &oauth2.Config{
- ClientID: "dummyClient",
- },
- }
- tokenCacheProvider := &cache.TokenCacheInMemoryProvider{}
- orchestrator := BaseTokenOrchestrator{
- ClientConfig: clientConf,
- TokenCache: tokenCacheProvider,
- }
-
- plan, _ := os.ReadFile("testdata/token.json")
- var tokenData oauth2.Token
- err := json.Unmarshal(plan, &tokenData)
- assert.Nil(t, err)
- t.Run("bad url in Config", func(t *testing.T) {
- refreshedToken, err := orchestrator.RefreshToken(ctx, &tokenData)
- assert.Nil(t, refreshedToken)
- assert.NotNil(t, err)
- })
-}
-
-func TestFetchFromCache(t *testing.T) {
- ctx := context.Background()
- metatdata := &service.OAuth2MetadataResponse{
- TokenEndpoint: "/token",
- ScopesSupported: []string{"code", "all"},
- }
- clientMetatadata := &service.PublicClientAuthConfigResponse{
- AuthorizationMetadataKey: "flyte_authorization",
- RedirectUri: "http://localhost:8089/redirect",
- }
- mockAuthClient := new(mocks.AuthMetadataServiceClient)
- mockAuthClient.OnGetOAuth2MetadataMatch(mock.Anything, mock.Anything).Return(metatdata, nil)
- mockAuthClient.OnGetPublicClientConfigMatch(mock.Anything, mock.Anything).Return(clientMetatadata, nil)
-
- t.Run("no token in cache", func(t *testing.T) {
- tokenCacheProvider := &cache.TokenCacheInMemoryProvider{}
-
- orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient)
-
- assert.NoError(t, err)
- refreshedToken, err := orchestrator.FetchTokenFromCacheOrRefreshIt(ctx, config.Duration{Duration: 5 * time.Minute})
- assert.Nil(t, refreshedToken)
- assert.NotNil(t, err)
- })
-
- t.Run("token in cache", func(t *testing.T) {
- tokenCacheProvider := &cache.TokenCacheInMemoryProvider{}
- orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient)
- assert.NoError(t, err)
- fileData, _ := os.ReadFile("testdata/token.json")
- var tokenData oauth2.Token
- err = json.Unmarshal(fileData, &tokenData)
- assert.Nil(t, err)
- tokenData.Expiry = time.Now().Add(20 * time.Minute)
- err = tokenCacheProvider.SaveToken(&tokenData)
- assert.Nil(t, err)
- cachedToken, err := orchestrator.FetchTokenFromCacheOrRefreshIt(ctx, config.Duration{Duration: 5 * time.Minute})
- assert.Nil(t, err)
- assert.NotNil(t, cachedToken)
- assert.Equal(t, tokenData.AccessToken, cachedToken.AccessToken)
- })
-
- t.Run("expired token in cache", func(t *testing.T) {
- tokenCacheProvider := &cache.TokenCacheInMemoryProvider{}
- orchestrator, err := NewBaseTokenOrchestrator(ctx, tokenCacheProvider, mockAuthClient)
- assert.NoError(t, err)
- fileData, _ := os.ReadFile("testdata/token.json")
- var tokenData oauth2.Token
- err = json.Unmarshal(fileData, &tokenData)
- assert.Nil(t, err)
- tokenData.Expiry = time.Now().Add(-20 * time.Minute)
- err = tokenCacheProvider.SaveToken(&tokenData)
- assert.Nil(t, err)
- _, err = orchestrator.FetchTokenFromCacheOrRefreshIt(ctx, config.Duration{Duration: 5 * time.Minute})
- assert.NotNil(t, err)
- })
-
- t.Run("token fetch before grace period", func(t *testing.T) {
- mockTokenCacheProvider := new(cacheMocks.TokenCache)
- orchestrator, err := NewBaseTokenOrchestrator(ctx, mockTokenCacheProvider, mockAuthClient)
- assert.NoError(t, err)
- fileData, _ := os.ReadFile("testdata/token.json")
- var tokenData oauth2.Token
- err = json.Unmarshal(fileData, &tokenData)
- assert.Nil(t, err)
- tokenData.Expiry = time.Now().Add(20 * time.Minute)
- mockTokenCacheProvider.OnGetTokenMatch(mock.Anything).Return(&tokenData, nil)
- mockTokenCacheProvider.OnSaveTokenMatch(mock.Anything).Return(nil)
- assert.Nil(t, err)
- refreshedToken, err := orchestrator.FetchTokenFromCacheOrRefreshIt(ctx, config.Duration{Duration: 5 * time.Minute})
- assert.Nil(t, err)
- assert.NotNil(t, refreshedToken)
- mockTokenCacheProvider.AssertNotCalled(t, "SaveToken")
- })
-
- t.Run("token fetch after grace period with refresh", func(t *testing.T) {
- mockTokenCacheProvider := new(cacheMocks.TokenCache)
- orchestrator, err := NewBaseTokenOrchestrator(ctx, mockTokenCacheProvider, mockAuthClient)
- assert.NoError(t, err)
- fileData, _ := os.ReadFile("testdata/token.json")
- var tokenData oauth2.Token
- err = json.Unmarshal(fileData, &tokenData)
- assert.Nil(t, err)
- tokenData.Expiry = time.Now().Add(20 * time.Minute)
- mockTokenCacheProvider.OnGetTokenMatch(mock.Anything).Return(&tokenData, nil)
- assert.Nil(t, err)
- refreshedToken, err := orchestrator.FetchTokenFromCacheOrRefreshIt(ctx, config.Duration{Duration: 5 * time.Minute})
- assert.Nil(t, err)
- assert.NotNil(t, refreshedToken)
- mockTokenCacheProvider.AssertNotCalled(t, "SaveToken")
- })
-}
diff --git a/flyteidl/clients/go/admin/tokenorchestrator/testdata/token.json b/flyteidl/clients/go/admin/tokenorchestrator/testdata/token.json
deleted file mode 100644
index 721cecc5f..000000000
--- a/flyteidl/clients/go/admin/tokenorchestrator/testdata/token.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "access_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1Mjk5MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiYWxsIiwiYWNjZXNzX3Rva2VuIl0sInN1YiI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCIsInVzZXJfaW5mbyI6eyJmYW1pbHlfbmFtZSI6Ik1haGluZHJha2FyIiwiZ2l2ZW5fbmFtZSI6IlByYWZ1bGxhIiwibmFtZSI6IlByYWZ1bGxhIE1haGluZHJha2FyIiwicGljdHVyZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hLS9BT2gxNEdqdVQxazgtOGE1dkJHT0lGMWFEZ2hZbUZ4OGhEOUtOaVI1am5adT1zOTYtYyIsInN1YmplY3QiOiIxMTQ1Mjc4MTUzMDUxMjg5NzQ0NzAifX0.ojbUOy2tF6HL8fIp1FJAQchU2MimlVMr3EGVPxMvYyahpW5YsWh6mz7qn4vpEnBuYZDf6cTaN50pJ8krlDX9RqtxF3iEfV2ZYHwyKMThI9sWh_kEBgGwUpyHyk98ZeqQX1uFOH3iwwhR-lPPUlpgdFGzKsxfxeFLOtu1y0V7BgA08KFqgYzl0lJqDYWBkJh_wUAv5g_r0NzSQCsMqb-B3Lno5ScMnlA3SZ_Hg-XdW8hnFIlrwJj4Cv47j3fcZxpqLbTNDXWWogmRbJb3YPlgn_LEnRAyZnFERHKMCE9vaBSTu-1Qstp-gRTORjyV7l3y680dEygQS-99KV3OSBlz6g",
- "token_type":"bearer",
- "refresh_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1MzM1MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiZi5hbGwiLCJhY2Nlc3NfdG9rZW4iXSwic3ViIjoiMTE0NTI3ODE1MzA1MTI4OTc0NDcwIiwidXNlcl9pbmZvIjp7ImZhbWlseV9uYW1lIjoiTWFoaW5kcmFrYXIiLCJnaXZlbl9uYW1lIjoiUHJhZnVsbGEiLCJuYW1lIjoiUHJhZnVsbGEgTWFoaW5kcmFrYXIiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2p1VDFrOC04YTV2QkdPSUYxYURnaFltRng4aEQ5S05pUjVqblp1PXM5Ni1jIiwic3ViamVjdCI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCJ9fQ.YKom5-gE4e84rJJIfxcpbMzgjZT33UZ27UTa1y8pK2BAWaPjIZtwudwDHQ5Rd3m0mJJWhBp0j0e8h9DvzBUdpsnGMXSCYKP-ag9y9k5OW59FMm9RqIakWHtj6NPnxGO1jAsaNCYePj8knR7pBLCLCse2taDHUJ8RU1F0DeHNr2y-JupgG5y1vjBcb-9eD8OwOSTp686_hm7XoJlxiKx8dj2O7HPH7M2pAHA_0bVrKKj7Y_s3fRhkm_Aq6LRdA-IiTl9xJQxgVUreejls9-RR9mSTKj6A81-Isz3qAUttVVaA4OT5OdW879_yT7OSLw_QwpXzNZ7qOR7OIpmL_xZXig",
- "expiry":"2021-04-27T19:55:26.658635+05:30"
-}
\ No newline at end of file
diff --git a/flyteidl/clients/go/coreutils/extract_literal.go b/flyteidl/clients/go/coreutils/extract_literal.go
deleted file mode 100644
index afc7fd2a0..000000000
--- a/flyteidl/clients/go/coreutils/extract_literal.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// extract_literal.go
-// Utility methods to extract a native golang value from a given Literal.
-// Usage:
-// 1] string literal extraction
-// lit, _ := MakeLiteral("test_string")
-// val, _ := ExtractFromLiteral(lit)
-// 2] integer literal extraction. integer would be extracted in type int64.
-// lit, _ := MakeLiteral([]interface{}{1, 2, 3})
-// val, _ := ExtractFromLiteral(lit)
-// 3] float literal extraction. float would be extracted in type float64.
-// lit, _ := MakeLiteral([]interface{}{1.0, 2.0, 3.0})
-// val, _ := ExtractFromLiteral(lit)
-// 4] map of boolean literal extraction.
-// mapInstance := map[string]interface{}{
-// "key1": []interface{}{1, 2, 3},
-// "key2": []interface{}{5},
-// }
-// lit, _ := MakeLiteral(mapInstance)
-// val, _ := ExtractFromLiteral(lit)
-// For further examples check the test TestFetchLiteral in extract_literal_test.go
-
-package coreutils
-
-import (
- "fmt"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
-)
-
-func ExtractFromLiteral(literal *core.Literal) (interface{}, error) {
- switch literalValue := literal.Value.(type) {
- case *core.Literal_Scalar:
- switch scalarValue := literalValue.Scalar.Value.(type) {
- case *core.Scalar_Primitive:
- switch scalarPrimitive := scalarValue.Primitive.Value.(type) {
- case *core.Primitive_Integer:
- scalarPrimitiveInt := scalarPrimitive.Integer
- return scalarPrimitiveInt, nil
- case *core.Primitive_FloatValue:
- scalarPrimitiveFloat := scalarPrimitive.FloatValue
- return scalarPrimitiveFloat, nil
- case *core.Primitive_StringValue:
- scalarPrimitiveString := scalarPrimitive.StringValue
- return scalarPrimitiveString, nil
- case *core.Primitive_Boolean:
- scalarPrimitiveBoolean := scalarPrimitive.Boolean
- return scalarPrimitiveBoolean, nil
- case *core.Primitive_Datetime:
- scalarPrimitiveDateTime := scalarPrimitive.Datetime.AsTime()
- return scalarPrimitiveDateTime, nil
- case *core.Primitive_Duration:
- scalarPrimitiveDuration := scalarPrimitive.Duration.AsDuration()
- return scalarPrimitiveDuration, nil
- default:
- return nil, fmt.Errorf("unsupported literal scalar primitive type %T", scalarValue)
- }
- case *core.Scalar_Blob:
- return scalarValue.Blob.Uri, nil
- case *core.Scalar_Schema:
- return scalarValue.Schema.Uri, nil
- case *core.Scalar_Generic:
- return scalarValue.Generic, nil
- case *core.Scalar_StructuredDataset:
- return scalarValue.StructuredDataset.Uri, nil
- default:
- return nil, fmt.Errorf("unsupported literal scalar type %T", scalarValue)
- }
- case *core.Literal_Collection:
- collectionValue := literalValue.Collection.Literals
- collection := make([]interface{}, len(collectionValue))
- for index, val := range collectionValue {
- if collectionElem, err := ExtractFromLiteral(val); err == nil {
- collection[index] = collectionElem
- } else {
- return nil, err
- }
- }
- return collection, nil
- case *core.Literal_Map:
- mapLiteralValue := literalValue.Map.Literals
- mapResult := make(map[string]interface{}, len(mapLiteralValue))
- for key, val := range mapLiteralValue {
- if val, err := ExtractFromLiteral(val); err == nil {
- mapResult[key] = val
- } else {
- return nil, err
- }
- }
- return mapResult, nil
- }
- return nil, fmt.Errorf("unsupported literal type %T", literal)
-}
diff --git a/flyteidl/clients/go/coreutils/extract_literal_test.go b/flyteidl/clients/go/coreutils/extract_literal_test.go
deleted file mode 100644
index 32d392322..000000000
--- a/flyteidl/clients/go/coreutils/extract_literal_test.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// extract_literal_test.go
-// Test class for the utility methods which extract a native golang value from a flyte Literal.
-
-package coreutils
-
-import (
- "testing"
- "time"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
-
- structpb "github.com/golang/protobuf/ptypes/struct"
- "github.com/stretchr/testify/assert"
-)
-
-func TestFetchLiteral(t *testing.T) {
- t.Run("Primitive", func(t *testing.T) {
- lit, err := MakeLiteral("test_string")
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- assert.Equal(t, "test_string", val)
- })
-
- t.Run("Timestamp", func(t *testing.T) {
- now := time.Now().UTC()
- lit, err := MakeLiteral(now)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- assert.Equal(t, now, val)
- })
-
- t.Run("Duration", func(t *testing.T) {
- duration := time.Second * 10
- lit, err := MakeLiteral(duration)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- assert.Equal(t, duration, val)
- })
-
- t.Run("Array", func(t *testing.T) {
- lit, err := MakeLiteral([]interface{}{1, 2, 3})
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- arr := []interface{}{int64(1), int64(2), int64(3)}
- assert.Equal(t, arr, val)
- })
-
- t.Run("Map", func(t *testing.T) {
- mapInstance := map[string]interface{}{
- "key1": []interface{}{1, 2, 3},
- "key2": []interface{}{5},
- }
- lit, err := MakeLiteral(mapInstance)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- expectedMapInstance := map[string]interface{}{
- "key1": []interface{}{int64(1), int64(2), int64(3)},
- "key2": []interface{}{int64(5)},
- }
- assert.Equal(t, expectedMapInstance, val)
- })
-
- t.Run("Map_Booleans", func(t *testing.T) {
- mapInstance := map[string]interface{}{
- "key1": []interface{}{true, false, true},
- "key2": []interface{}{false},
- }
- lit, err := MakeLiteral(mapInstance)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- assert.Equal(t, mapInstance, val)
- })
-
- t.Run("Map_Floats", func(t *testing.T) {
- mapInstance := map[string]interface{}{
- "key1": []interface{}{1.0, 2.0, 3.0},
- "key2": []interface{}{1.0},
- }
- lit, err := MakeLiteral(mapInstance)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- expectedMapInstance := map[string]interface{}{
- "key1": []interface{}{float64(1.0), float64(2.0), float64(3.0)},
- "key2": []interface{}{float64(1.0)},
- }
- assert.Equal(t, expectedMapInstance, val)
- })
-
- t.Run("NestedMap", func(t *testing.T) {
- mapInstance := map[string]interface{}{
- "key1": map[string]interface{}{"key11": 1.0, "key12": 2.0, "key13": 3.0},
- "key2": map[string]interface{}{"key21": 1.0},
- }
- lit, err := MakeLiteral(mapInstance)
- assert.NoError(t, err)
- val, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- expectedMapInstance := map[string]interface{}{
- "key1": map[string]interface{}{"key11": float64(1.0), "key12": float64(2.0), "key13": float64(3.0)},
- "key2": map[string]interface{}{"key21": float64(1.0)},
- }
- assert.Equal(t, expectedMapInstance, val)
- })
-
- t.Run("Binary", func(t *testing.T) {
- s := MakeBinaryLiteral([]byte{'h'})
- assert.Equal(t, []byte{'h'}, s.GetScalar().GetBinary().GetValue())
- _, err := ExtractFromLiteral(s)
- assert.NotNil(t, err)
- })
-
- t.Run("NoneType", func(t *testing.T) {
- p, err := MakeLiteral(nil)
- assert.NoError(t, err)
- assert.NotNil(t, p.GetScalar())
- _, err = ExtractFromLiteral(p)
- assert.NotNil(t, err)
- })
-
- t.Run("Generic", func(t *testing.T) {
- literalVal := map[string]interface{}{
- "x": 1,
- "y": "ystringvalue",
- }
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRUCT}}
- lit, err := MakeLiteralForType(literalType, literalVal)
- assert.NoError(t, err)
- extractedLiteralVal, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- fieldsMap := map[string]*structpb.Value{
- "x": {
- Kind: &structpb.Value_NumberValue{NumberValue: 1},
- },
- "y": {
- Kind: &structpb.Value_StringValue{StringValue: "ystringvalue"},
- },
- }
- expectedStructVal := &structpb.Struct{
- Fields: fieldsMap,
- }
- extractedStructValue := extractedLiteralVal.(*structpb.Struct)
- assert.Equal(t, len(expectedStructVal.Fields), len(extractedStructValue.Fields))
- for key, val := range expectedStructVal.Fields {
- assert.Equal(t, val.Kind, extractedStructValue.Fields[key].Kind)
- }
- })
-
- t.Run("Generic Passed As String", func(t *testing.T) {
- literalVal := "{\"x\": 1,\"y\": \"ystringvalue\"}"
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRUCT}}
- lit, err := MakeLiteralForType(literalType, literalVal)
- assert.NoError(t, err)
- extractedLiteralVal, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- fieldsMap := map[string]*structpb.Value{
- "x": {
- Kind: &structpb.Value_NumberValue{NumberValue: 1},
- },
- "y": {
- Kind: &structpb.Value_StringValue{StringValue: "ystringvalue"},
- },
- }
- expectedStructVal := &structpb.Struct{
- Fields: fieldsMap,
- }
- extractedStructValue := extractedLiteralVal.(*structpb.Struct)
- assert.Equal(t, len(expectedStructVal.Fields), len(extractedStructValue.Fields))
- for key, val := range expectedStructVal.Fields {
- assert.Equal(t, val.Kind, extractedStructValue.Fields[key].Kind)
- }
- })
-
- t.Run("Structured dataset", func(t *testing.T) {
- literalVal := "s3://blah/blah/blah"
- var dataSetColumns []*core.StructuredDatasetType_DatasetColumn
- dataSetColumns = append(dataSetColumns, &core.StructuredDatasetType_DatasetColumn{
- Name: "Price",
- LiteralType: &core.LiteralType{
- Type: &core.LiteralType_Simple{
- Simple: core.SimpleType_FLOAT,
- },
- },
- })
- var literalType = &core.LiteralType{Type: &core.LiteralType_StructuredDatasetType{StructuredDatasetType: &core.StructuredDatasetType{
- Columns: dataSetColumns,
- Format: "testFormat",
- }}}
-
- lit, err := MakeLiteralForType(literalType, literalVal)
- assert.NoError(t, err)
- extractedLiteralVal, err := ExtractFromLiteral(lit)
- assert.NoError(t, err)
- assert.Equal(t, literalVal, extractedLiteralVal)
- })
-}
diff --git a/flyteidl/clients/go/coreutils/literals.go b/flyteidl/clients/go/coreutils/literals.go
deleted file mode 100644
index 4ad84f181..000000000
--- a/flyteidl/clients/go/coreutils/literals.go
+++ /dev/null
@@ -1,596 +0,0 @@
-// Contains convenience methods for constructing core types.
-package coreutils
-
-import (
- "encoding/json"
- "fmt"
- "math"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
- "github.com/flyteorg/flytestdlib/storage"
-
- "github.com/golang/protobuf/jsonpb"
- "github.com/golang/protobuf/ptypes"
- structpb "github.com/golang/protobuf/ptypes/struct"
- "github.com/pkg/errors"
-)
-
-func MakePrimitive(v interface{}) (*core.Primitive, error) {
- switch p := v.(type) {
- case int:
- return &core.Primitive{
- Value: &core.Primitive_Integer{
- Integer: int64(p),
- },
- }, nil
- case int64:
- return &core.Primitive{
- Value: &core.Primitive_Integer{
- Integer: p,
- },
- }, nil
- case float64:
- return &core.Primitive{
- Value: &core.Primitive_FloatValue{
- FloatValue: p,
- },
- }, nil
- case time.Time:
- t, err := ptypes.TimestampProto(p)
- if err != nil {
- return nil, err
- }
- return &core.Primitive{
- Value: &core.Primitive_Datetime{
- Datetime: t,
- },
- }, nil
- case time.Duration:
- d := ptypes.DurationProto(p)
- return &core.Primitive{
- Value: &core.Primitive_Duration{
- Duration: d,
- },
- }, nil
- case string:
- return &core.Primitive{
- Value: &core.Primitive_StringValue{
- StringValue: p,
- },
- }, nil
- case bool:
- return &core.Primitive{
- Value: &core.Primitive_Boolean{
- Boolean: p,
- },
- }, nil
- }
- return nil, fmt.Errorf("failed to convert to a known primitive type. Input Type [%v] not supported", reflect.TypeOf(v).String())
-}
-
-func MustMakePrimitive(v interface{}) *core.Primitive {
- f, err := MakePrimitive(v)
- if err != nil {
- panic(err)
- }
- return f
-}
-
-func MakePrimitiveLiteral(v interface{}) (*core.Literal, error) {
- p, err := MakePrimitive(v)
- if err != nil {
- return nil, err
- }
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{
- Primitive: p,
- },
- },
- },
- }, nil
-}
-
-func MustMakePrimitiveLiteral(v interface{}) *core.Literal {
- p, err := MakePrimitiveLiteral(v)
- if err != nil {
- panic(err)
- }
- return p
-}
-
-func MakeLiteralForMap(v map[string]interface{}) (*core.Literal, error) {
- m, err := MakeLiteralMap(v)
- if err != nil {
- return nil, err
- }
-
- return &core.Literal{
- Value: &core.Literal_Map{
- Map: m,
- },
- }, nil
-}
-
-func MakeLiteralForCollection(v []interface{}) (*core.Literal, error) {
- literals := make([]*core.Literal, 0, len(v))
- for _, val := range v {
- l, err := MakeLiteral(val)
- if err != nil {
- return nil, err
- }
-
- literals = append(literals, l)
- }
-
- return &core.Literal{
- Value: &core.Literal_Collection{
- Collection: &core.LiteralCollection{
- Literals: literals,
- },
- },
- }, nil
-}
-
-func MakeBinaryLiteral(v []byte) *core.Literal {
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Binary{
- Binary: &core.Binary{
- Value: v,
- },
- },
- },
- },
- }
-}
-
-func MakeGenericLiteral(v *structpb.Struct) *core.Literal {
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Generic{
- Generic: v,
- },
- },
- }}
-}
-
-func MakeLiteral(v interface{}) (*core.Literal, error) {
- if v == nil {
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_NoneType{
- NoneType: &core.Void{},
- },
- },
- },
- }, nil
- }
- switch o := v.(type) {
- case *core.Literal:
- return o, nil
- case []interface{}:
- return MakeLiteralForCollection(o)
- case map[string]interface{}:
- return MakeLiteralForMap(o)
- case []byte:
- return MakeBinaryLiteral(v.([]byte)), nil
- case *structpb.Struct:
- return MakeGenericLiteral(v.(*structpb.Struct)), nil
- case *core.Error:
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Error{
- Error: v.(*core.Error),
- },
- },
- },
- }, nil
- default:
- return MakePrimitiveLiteral(o)
- }
-}
-
-func MustMakeDefaultLiteralForType(typ *core.LiteralType) *core.Literal {
- if res, err := MakeDefaultLiteralForType(typ); err != nil {
- panic(err)
- } else {
- return res
- }
-}
-
-func MakeDefaultLiteralForType(typ *core.LiteralType) (*core.Literal, error) {
- switch t := typ.GetType().(type) {
- case *core.LiteralType_Simple:
- switch t.Simple {
- case core.SimpleType_NONE:
- return MakeLiteral(nil)
- case core.SimpleType_INTEGER:
- return MakeLiteral(int(0))
- case core.SimpleType_FLOAT:
- return MakeLiteral(float64(0))
- case core.SimpleType_STRING:
- return MakeLiteral("")
- case core.SimpleType_BOOLEAN:
- return MakeLiteral(false)
- case core.SimpleType_DATETIME:
- return MakeLiteral(time.Now())
- case core.SimpleType_DURATION:
- return MakeLiteral(time.Second)
- case core.SimpleType_BINARY:
- return MakeLiteral([]byte{})
- case core.SimpleType_ERROR:
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Error{
- Error: &core.Error{
- Message: "Default Error message",
- },
- },
- },
- },
- }, nil
- case core.SimpleType_STRUCT:
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Generic{
- Generic: &structpb.Struct{},
- },
- },
- },
- }, nil
- }
- return nil, errors.Errorf("Not yet implemented. Default creation is not yet implemented for [%s] ", t.Simple.String())
- case *core.LiteralType_Blob:
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Blob{
- Blob: &core.Blob{
- Metadata: &core.BlobMetadata{
- Type: t.Blob,
- },
- Uri: "/tmp/somepath",
- },
- },
- },
- },
- }, nil
- case *core.LiteralType_CollectionType:
- single, err := MakeDefaultLiteralForType(t.CollectionType)
- if err != nil {
- return nil, err
- }
-
- return &core.Literal{
- Value: &core.Literal_Collection{
- Collection: &core.LiteralCollection{
- Literals: []*core.Literal{single},
- },
- },
- }, nil
- case *core.LiteralType_MapValueType:
- single, err := MakeDefaultLiteralForType(t.MapValueType)
- if err != nil {
- return nil, err
- }
-
- return &core.Literal{
- Value: &core.Literal_Map{
- Map: &core.LiteralMap{
- Literals: map[string]*core.Literal{
- "itemKey": single,
- },
- },
- },
- }, nil
- case *core.LiteralType_EnumType:
- return MakeLiteralForType(typ, nil)
- case *core.LiteralType_Schema:
- return MakeLiteralForType(typ, nil)
- }
-
- return nil, fmt.Errorf("failed to convert to a known Literal. Input Type [%v] not supported", typ.String())
-}
-
-func MakePrimitiveForType(t core.SimpleType, s string) (*core.Primitive, error) {
- p := &core.Primitive{}
- switch t {
- case core.SimpleType_INTEGER:
- v, err := strconv.ParseInt(s, 10, 64)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse integer value")
- }
- p.Value = &core.Primitive_Integer{Integer: v}
- case core.SimpleType_FLOAT:
- v, err := strconv.ParseFloat(s, 64)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse Float value")
- }
- p.Value = &core.Primitive_FloatValue{FloatValue: v}
- case core.SimpleType_BOOLEAN:
- v, err := strconv.ParseBool(s)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse Bool value")
- }
- p.Value = &core.Primitive_Boolean{Boolean: v}
- case core.SimpleType_STRING:
- p.Value = &core.Primitive_StringValue{StringValue: s}
- case core.SimpleType_DURATION:
- v, err := time.ParseDuration(s)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse Duration, valid formats: e.g. 300ms, -1.5h, 2h45m")
- }
- p.Value = &core.Primitive_Duration{Duration: ptypes.DurationProto(v)}
- case core.SimpleType_DATETIME:
- v, err := time.Parse(time.RFC3339, s)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse Datetime in RFC3339 format")
- }
- ts, err := ptypes.TimestampProto(v)
- if err != nil {
- return nil, errors.Wrap(err, "failed to convert datetime to proto")
- }
- p.Value = &core.Primitive_Datetime{Datetime: ts}
- default:
- return nil, fmt.Errorf("unsupported type %s", t.String())
- }
- return p, nil
-}
-
-func MakeLiteralForSimpleType(t core.SimpleType, s string) (*core.Literal, error) {
- s = strings.Trim(s, " \n\t")
- scalar := &core.Scalar{}
- switch t {
- case core.SimpleType_STRUCT:
- st := &structpb.Struct{}
- err := jsonpb.UnmarshalString(s, st)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to load generic type as json.")
- }
- scalar.Value = &core.Scalar_Generic{
- Generic: st,
- }
- case core.SimpleType_BINARY:
- scalar.Value = &core.Scalar_Binary{
- Binary: &core.Binary{
- Value: []byte(s),
- // TODO Tag not supported at the moment
- },
- }
- case core.SimpleType_ERROR:
- scalar.Value = &core.Scalar_Error{
- Error: &core.Error{
- Message: s,
- },
- }
- case core.SimpleType_NONE:
- scalar.Value = &core.Scalar_NoneType{
- NoneType: &core.Void{},
- }
- default:
- p, err := MakePrimitiveForType(t, s)
- if err != nil {
- return nil, err
- }
- scalar.Value = &core.Scalar_Primitive{Primitive: p}
- }
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: scalar,
- },
- }, nil
-}
-
-func MustMakeLiteral(v interface{}) *core.Literal {
- p, err := MakeLiteral(v)
- if err != nil {
- panic(err)
- }
-
- return p
-}
-
-func MakeLiteralMap(v map[string]interface{}) (*core.LiteralMap, error) {
-
- literals := make(map[string]*core.Literal, len(v))
- for key, val := range v {
- l, err := MakeLiteral(val)
- if err != nil {
- return nil, err
- }
-
- literals[key] = l
- }
-
- return &core.LiteralMap{
- Literals: literals,
- }, nil
-}
-
-func MakeLiteralForSchema(path storage.DataReference, columns []*core.SchemaType_SchemaColumn) *core.Literal {
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Schema{
- Schema: &core.Schema{
- Uri: path.String(),
- Type: &core.SchemaType{
- Columns: columns,
- },
- },
- },
- },
- },
- }
-}
-
-func MakeLiteralForStructuredDataSet(path storage.DataReference, columns []*core.StructuredDatasetType_DatasetColumn, format string) *core.Literal {
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_StructuredDataset{
- StructuredDataset: &core.StructuredDataset{
- Uri: path.String(),
- Metadata: &core.StructuredDatasetMetadata{
- StructuredDatasetType: &core.StructuredDatasetType{
- Columns: columns,
- Format: format,
- },
- },
- },
- },
- },
- },
- }
-}
-
-func MakeLiteralForBlob(path storage.DataReference, isDir bool, format string) *core.Literal {
- dim := core.BlobType_SINGLE
- if isDir {
- dim = core.BlobType_MULTIPART
- }
- return &core.Literal{
- Value: &core.Literal_Scalar{
- Scalar: &core.Scalar{
- Value: &core.Scalar_Blob{
- Blob: &core.Blob{
- Uri: path.String(),
- Metadata: &core.BlobMetadata{
- Type: &core.BlobType{
- Dimensionality: dim,
- Format: format,
- },
- },
- },
- },
- },
- },
- }
-}
-
-func MakeLiteralForType(t *core.LiteralType, v interface{}) (*core.Literal, error) {
- l := &core.Literal{}
- switch newT := t.Type.(type) {
- case *core.LiteralType_MapValueType:
- newV, ok := v.(map[string]interface{})
- if !ok {
- return nil, fmt.Errorf("map value types can only be of type map[string]interface{}, but found %v", reflect.TypeOf(v))
- }
-
- literals := make(map[string]*core.Literal, len(newV))
- for key, val := range newV {
- lv, err := MakeLiteralForType(newT.MapValueType, val)
- if err != nil {
- return nil, err
- }
- literals[key] = lv
- }
- l.Value = &core.Literal_Map{
- Map: &core.LiteralMap{
- Literals: literals,
- },
- }
-
- case *core.LiteralType_CollectionType:
- newV, ok := v.([]interface{})
- if !ok {
- return nil, fmt.Errorf("collection type expected but found %v", reflect.TypeOf(v))
- }
-
- literals := make([]*core.Literal, 0, len(newV))
- for _, val := range newV {
- lv, err := MakeLiteralForType(newT.CollectionType, val)
- if err != nil {
- return nil, err
- }
- literals = append(literals, lv)
- }
- l.Value = &core.Literal_Collection{
- Collection: &core.LiteralCollection{
- Literals: literals,
- },
- }
-
- case *core.LiteralType_Simple:
- strValue := fmt.Sprintf("%v", v)
- if v == nil {
- strValue = ""
- }
- // Note this is to support large integers which by default when passed from an unmarshalled json will be
- // converted to float64 and printed as exponential format by Sprintf.
- // eg : 8888888 get converted to 8.888888e+06 and which causes strconv.ParseInt to fail
- // Inorder to avoid this we explicitly add this check.
- if f, ok := v.(float64); ok && math.Trunc(f) == f {
- strValue = fmt.Sprintf("%.0f", math.Trunc(f))
- }
- if newT.Simple == core.SimpleType_STRUCT {
- if _, isValueStringType := v.(string); !isValueStringType {
- byteValue, err := json.Marshal(v)
- if err != nil {
- return nil, fmt.Errorf("unable to marshal to json string for struct value %v", v)
- }
- strValue = string(byteValue)
- }
- }
- lv, err := MakeLiteralForSimpleType(newT.Simple, strValue)
- if err != nil {
- return nil, err
- }
- return lv, nil
-
- case *core.LiteralType_Blob:
- isDir := newT.Blob.Dimensionality == core.BlobType_MULTIPART
- lv := MakeLiteralForBlob(storage.DataReference(fmt.Sprintf("%v", v)), isDir, newT.Blob.Format)
- return lv, nil
-
- case *core.LiteralType_Schema:
- lv := MakeLiteralForSchema(storage.DataReference(fmt.Sprintf("%v", v)), newT.Schema.Columns)
- return lv, nil
- case *core.LiteralType_StructuredDatasetType:
- lv := MakeLiteralForStructuredDataSet(storage.DataReference(fmt.Sprintf("%v", v)), newT.StructuredDatasetType.Columns, newT.StructuredDatasetType.Format)
- return lv, nil
-
- case *core.LiteralType_EnumType:
- var newV string
- if v == nil {
- if len(t.GetEnumType().Values) == 0 {
- return nil, fmt.Errorf("enum types need atleast one value")
- }
- newV = t.GetEnumType().Values[0]
- } else {
- var ok bool
- newV, ok = v.(string)
- if !ok {
- return nil, fmt.Errorf("cannot convert [%v] to enum representations, only string values are supported in enum literals", reflect.TypeOf(v))
- }
- found := false
- for _, val := range t.GetEnumType().GetValues() {
- if val == newV {
- found = true
- break
- }
- }
- if !found {
- return nil, fmt.Errorf("incorrect enum value [%s], supported values %+v", newV, t.GetEnumType().GetValues())
- }
- }
- return MakePrimitiveLiteral(newV)
-
- default:
- return nil, fmt.Errorf("unsupported type %s", t.String())
- }
-
- return l, nil
-}
diff --git a/flyteidl/clients/go/coreutils/literals_test.go b/flyteidl/clients/go/coreutils/literals_test.go
deleted file mode 100644
index 4b16478ad..000000000
--- a/flyteidl/clients/go/coreutils/literals_test.go
+++ /dev/null
@@ -1,718 +0,0 @@
-// extract_literal_test.go
-// Test class for the utility methods which construct flyte literals.
-
-package coreutils
-
-import (
- "fmt"
- "reflect"
- "strconv"
- "testing"
- "time"
-
- "github.com/go-test/deep"
-
- "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
- "github.com/flyteorg/flytestdlib/storage"
-
- "github.com/golang/protobuf/ptypes"
- structpb "github.com/golang/protobuf/ptypes/struct"
- "github.com/pkg/errors"
- "github.com/stretchr/testify/assert"
-)
-
-func TestMakePrimitive(t *testing.T) {
- {
- v := 1
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_Integer", reflect.TypeOf(p.Value).String())
- assert.Equal(t, int64(v), p.GetInteger())
- }
- {
- v := int64(1)
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_Integer", reflect.TypeOf(p.Value).String())
- assert.Equal(t, v, p.GetInteger())
- }
- {
- v := 1.0
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_FloatValue", reflect.TypeOf(p.Value).String())
- assert.Equal(t, v, p.GetFloatValue())
- }
- {
- v := "blah"
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_StringValue", reflect.TypeOf(p.Value).String())
- assert.Equal(t, v, p.GetStringValue())
- }
- {
- v := true
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_Boolean", reflect.TypeOf(p.Value).String())
- assert.Equal(t, v, p.GetBoolean())
- }
- {
- v := time.Now()
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_Datetime", reflect.TypeOf(p.Value).String())
- j, err := ptypes.TimestampProto(v)
- assert.NoError(t, err)
- assert.Equal(t, j, p.GetDatetime())
- _, err = MakePrimitive(time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC))
- assert.Error(t, err)
- }
- {
- v := time.Second * 10
- p, err := MakePrimitive(v)
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_Duration", reflect.TypeOf(p.Value).String())
- assert.Equal(t, ptypes.DurationProto(v), p.GetDuration())
- }
- {
- v := struct {
- }{}
- _, err := MakePrimitive(v)
- assert.Error(t, err)
- }
-}
-
-func TestMustMakePrimitive(t *testing.T) {
- {
- v := struct {
- }{}
- assert.Panics(t, func() {
- MustMakePrimitive(v)
- })
- }
- {
- v := time.Second * 10
- p := MustMakePrimitive(v)
- assert.Equal(t, "*core.Primitive_Duration", reflect.TypeOf(p.Value).String())
- assert.Equal(t, ptypes.DurationProto(v), p.GetDuration())
- }
-}
-
-func TestMakePrimitiveLiteral(t *testing.T) {
- {
- v := 1.0
- p, err := MakePrimitiveLiteral(v)
- assert.NoError(t, err)
- assert.NotNil(t, p.GetScalar())
- assert.Equal(t, "*core.Primitive_FloatValue", reflect.TypeOf(p.GetScalar().GetPrimitive().Value).String())
- assert.Equal(t, v, p.GetScalar().GetPrimitive().GetFloatValue())
- }
- {
- v := struct {
- }{}
- _, err := MakePrimitiveLiteral(v)
- assert.Error(t, err)
- }
-}
-
-func TestMustMakePrimitiveLiteral(t *testing.T) {
- t.Run("Panic", func(t *testing.T) {
- v := struct {
- }{}
- assert.Panics(t, func() {
- MustMakePrimitiveLiteral(v)
- })
- })
- t.Run("FloatValue", func(t *testing.T) {
- v := 1.0
- p := MustMakePrimitiveLiteral(v)
- assert.NotNil(t, p.GetScalar())
- assert.Equal(t, "*core.Primitive_FloatValue", reflect.TypeOf(p.GetScalar().GetPrimitive().Value).String())
- assert.Equal(t, v, p.GetScalar().GetPrimitive().GetFloatValue())
- })
-}
-
-func TestMakeLiteral(t *testing.T) {
- t.Run("Primitive", func(t *testing.T) {
- lit, err := MakeLiteral("test_string")
- assert.NoError(t, err)
- assert.Equal(t, "*core.Primitive_StringValue", reflect.TypeOf(lit.GetScalar().GetPrimitive().Value).String())
- })
-
- t.Run("Array", func(t *testing.T) {
- lit, err := MakeLiteral([]interface{}{1, 2, 3})
- assert.NoError(t, err)
- assert.Equal(t, "*core.Literal_Collection", reflect.TypeOf(lit.GetValue()).String())
- assert.Equal(t, "*core.Primitive_Integer", reflect.TypeOf(lit.GetCollection().Literals[0].GetScalar().GetPrimitive().Value).String())
- })
-
- t.Run("Map", func(t *testing.T) {
- lit, err := MakeLiteral(map[string]interface{}{
- "key1": []interface{}{1, 2, 3},
- "key2": []interface{}{5},
- })
- assert.NoError(t, err)
- assert.Equal(t, "*core.Literal_Map", reflect.TypeOf(lit.GetValue()).String())
- assert.Equal(t, "*core.Literal_Collection", reflect.TypeOf(lit.GetMap().Literals["key1"].GetValue()).String())
- })
-
- t.Run("Binary", func(t *testing.T) {
- s := MakeBinaryLiteral([]byte{'h'})
- assert.Equal(t, []byte{'h'}, s.GetScalar().GetBinary().GetValue())
- })
-
- t.Run("NoneType", func(t *testing.T) {
- p, err := MakeLiteral(nil)
- assert.NoError(t, err)
- assert.NotNil(t, p.GetScalar())
- assert.Equal(t, "*core.Scalar_NoneType", reflect.TypeOf(p.GetScalar().Value).String())
- })
-}
-
-func TestMustMakeLiteral(t *testing.T) {
- v := "hello"
- l := MustMakeLiteral(v)
- assert.NotNil(t, l.GetScalar())
- assert.Equal(t, v, l.GetScalar().GetPrimitive().GetStringValue())
-}
-
-func TestMakeBinaryLiteral(t *testing.T) {
- s := MakeBinaryLiteral([]byte{'h'})
- assert.Equal(t, []byte{'h'}, s.GetScalar().GetBinary().GetValue())
-}
-
-func TestMakeDefaultLiteralForType(t *testing.T) {
- type args struct {
- name string
- ty core.SimpleType
- tyName string
- isPrimitive bool
- }
- tests := []args{
- {"None", core.SimpleType_NONE, "*core.Scalar_NoneType", false},
- {"Binary", core.SimpleType_BINARY, "*core.Scalar_Binary", false},
- {"Integer", core.SimpleType_INTEGER, "*core.Primitive_Integer", true},
- {"Float", core.SimpleType_FLOAT, "*core.Primitive_FloatValue", true},
- {"String", core.SimpleType_STRING, "*core.Primitive_StringValue", true},
- {"Boolean", core.SimpleType_BOOLEAN, "*core.Primitive_Boolean", true},
- {"Duration", core.SimpleType_DURATION, "*core.Primitive_Duration", true},
- {"Datetime", core.SimpleType_DATETIME, "*core.Primitive_Datetime", true},
- }
- for _, test := range tests {
- t.Run(test.name, func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Simple{Simple: test.ty}})
- assert.NoError(t, err)
- if test.isPrimitive {
- assert.Equal(t, test.tyName, reflect.TypeOf(l.GetScalar().GetPrimitive().Value).String())
- } else {
- assert.Equal(t, test.tyName, reflect.TypeOf(l.GetScalar().Value).String())
- }
- })
- }
-
- t.Run("Binary", func(t *testing.T) {
- s, err := MakeLiteral([]byte{'h'})
- assert.NoError(t, err)
- assert.Equal(t, []byte{'h'}, s.GetScalar().GetBinary().GetValue())
- })
-
- t.Run("Blob", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Blob{}})
- assert.NoError(t, err)
- assert.Equal(t, "*core.Scalar_Blob", reflect.TypeOf(l.GetScalar().Value).String())
- })
-
- t.Run("Collection", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_CollectionType{CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}}}})
- assert.NoError(t, err)
- assert.Equal(t, "*core.LiteralCollection", reflect.TypeOf(l.GetCollection()).String())
- })
-
- t.Run("Map", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_MapValueType{MapValueType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}}}})
- assert.NoError(t, err)
- assert.Equal(t, "*core.LiteralMap", reflect.TypeOf(l.GetMap()).String())
- })
-
- t.Run("error", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Simple{
- Simple: core.SimpleType_ERROR,
- }})
- assert.NoError(t, err)
- assert.NotNil(t, l.GetScalar().GetError())
- })
-
- t.Run("struct", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Simple{
- Simple: core.SimpleType_STRUCT,
- }})
- assert.NoError(t, err)
- assert.NotNil(t, l.GetScalar().GetGeneric())
- })
-
- t.Run("enum", func(t *testing.T) {
- l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_EnumType{
- EnumType: &core.EnumType{Values: []string{"x", "y", "z"}},
- }})
- assert.NoError(t, err)
- assert.NotNil(t, l.GetScalar().GetPrimitive().GetStringValue())
- expected := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "x"}}}}}}
- assert.Equal(t, expected, l)
- })
-}
-
-func TestMustMakeDefaultLiteralForType(t *testing.T) {
- t.Run("error", func(t *testing.T) {
- assert.Panics(t, func() {
- MustMakeDefaultLiteralForType(nil)
- })
- })
-
- t.Run("Blob", func(t *testing.T) {
- l := MustMakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Blob{}})
- assert.Equal(t, "*core.Scalar_Blob", reflect.TypeOf(l.GetScalar().Value).String())
- })
-}
-
-func TestMakePrimitiveForType(t *testing.T) {
- n := time.Now()
- type args struct {
- t core.SimpleType
- s string
- }
- tests := []struct {
- name string
- args args
- want *core.Primitive
- wantErr bool
- }{
- {"error-type", args{core.SimpleType_NONE, "x"}, nil, true},
-
- {"error-int", args{core.SimpleType_INTEGER, "x"}, nil, true},
- {"int", args{core.SimpleType_INTEGER, "1"}, MustMakePrimitive(1), false},
-
- {"error-bool", args{core.SimpleType_BOOLEAN, "x"}, nil, true},
- {"bool", args{core.SimpleType_BOOLEAN, "true"}, MustMakePrimitive(true), false},
-
- {"error-float", args{core.SimpleType_FLOAT, "x"}, nil, true},
- {"float", args{core.SimpleType_FLOAT, "3.1416"}, MustMakePrimitive(3.1416), false},
-
- {"string", args{core.SimpleType_STRING, "string"}, MustMakePrimitive("string"), false},
-
- {"error-dt", args{core.SimpleType_DATETIME, "x"}, nil, true},
- {"dt", args{core.SimpleType_DATETIME, n.Format(time.RFC3339Nano)}, MustMakePrimitive(n), false},
-
- {"error-dur", args{core.SimpleType_DURATION, "x"}, nil, true},
- {"dur", args{core.SimpleType_DURATION, time.Hour.String()}, MustMakePrimitive(time.Hour), false},
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got, err := MakePrimitiveForType(tt.args.t, tt.args.s)
- if (err != nil) != tt.wantErr {
- t.Errorf("MakePrimitiveForType() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("MakePrimitiveForType() got = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestMakeLiteralForSimpleType(t *testing.T) {
- type args struct {
- t core.SimpleType
- s string
- }
- tests := []struct {
- name string
- args args
- want *core.Literal
- wantErr bool
- }{
- {"error-int", args{core.SimpleType_INTEGER, "x"}, nil, true},
- {"int", args{core.SimpleType_INTEGER, "1"}, MustMakeLiteral(1), false},
-
- {"error-struct", args{core.SimpleType_STRUCT, "x"}, nil, true},
- {"struct", args{core.SimpleType_STRUCT, `{"x": 1}`}, MustMakeLiteral(&structpb.Struct{Fields: map[string]*structpb.Value{"x": {Kind: &structpb.Value_NumberValue{NumberValue: 1}}}}), false},
-
- {"bin", args{core.SimpleType_BINARY, "x"}, MustMakeLiteral([]byte("x")), false},
-
- {"error", args{core.SimpleType_ERROR, "err"}, MustMakeLiteral(&core.Error{Message: "err"}), false},
-
- {"none", args{core.SimpleType_NONE, "null"}, MustMakeLiteral(nil), false},
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got, err := MakeLiteralForSimpleType(tt.args.t, tt.args.s)
- if (err != nil) != tt.wantErr {
- t.Errorf("MakeLiteralForSimpleType() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if diff := deep.Equal(tt.want, got); diff != nil {
- t.Errorf("MakeLiteralForSimpleType() got = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestMakeLiteralForBlob(t *testing.T) {
- type args struct {
- path storage.DataReference
- isDir bool
- format string
- }
- tests := []struct {
- name string
- args args
- want *core.Blob
- }{
- {"simple-key", args{path: "/key", isDir: false, format: "xyz"}, &core.Blob{Uri: "/key", Metadata: &core.BlobMetadata{Type: &core.BlobType{Format: "xyz", Dimensionality: core.BlobType_SINGLE}}}},
- {"simple-dir", args{path: "/key", isDir: true, format: "xyz"}, &core.Blob{Uri: "/key", Metadata: &core.BlobMetadata{Type: &core.BlobType{Format: "xyz", Dimensionality: core.BlobType_MULTIPART}}}},
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := MakeLiteralForBlob(tt.args.path, tt.args.isDir, tt.args.format); !reflect.DeepEqual(got.GetScalar().GetBlob(), tt.want) {
- t.Errorf("MakeLiteralForBlob() = %v, want %v", got, tt.want)
- }
- })
- }
-}
-
-func TestMakeLiteralForType(t *testing.T) {
- t.Run("SimpleInteger", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}}
- val, err := MakeLiteralForType(literalType, 1)
- assert.NoError(t, err)
- literalVal := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_Integer{Integer: 1}}}}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("IntegerComingInAsFloatOverFlow", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}}
- _, err := MakeLiteralForType(literalType, 8.888888e+19)
- assert.NotNil(t, err)
- numError := &strconv.NumError{
- Func: "ParseInt",
- Num: "88888880000000000000",
- Err: fmt.Errorf("value out of range"),
- }
- parseIntError := errors.WithMessage(numError, "failed to parse integer value")
- assert.Equal(t, errors.WithStack(parseIntError).Error(), err.Error())
- })
-
- t.Run("IntegerComingInAsFloat", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}}
- val, err := MakeLiteralForType(literalType, 8.888888e+18)
- assert.NoError(t, err)
- literalVal := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_Integer{Integer: 8.888888e+18}}}}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("SimpleFloat", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_FLOAT}}
- val, err := MakeLiteralForType(literalType, 1)
- assert.NoError(t, err)
- literalVal := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_FloatValue{FloatValue: 1.0}}}}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("ArrayStrings", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_CollectionType{
- CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- strArray := []interface{}{"hello", "world"}
- val, err := MakeLiteralForType(literalType, strArray)
- assert.NoError(t, err)
- literalVal1 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "hello"}}}}}}
- literalVal2 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world"}}}}}}
- literalCollection := []*core.Literal{literalVal1, literalVal2}
- literalVal := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("ArrayOfArrayStringsNotSupported", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_CollectionType{
- CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- strArrayOfArray := [][]interface{}{{"hello1", "world1"}, {"hello2", "world2"}}
- _, err := MakeLiteralForType(literalType, strArrayOfArray)
- expectedErrorf := fmt.Errorf("collection type expected but found [][]interface {}")
- assert.Equal(t, expectedErrorf, err)
- })
-
- t.Run("ArrayOfArrayStringsTypeErasure", func(t *testing.T) {
- var collectionType = &core.LiteralType{Type: &core.LiteralType_CollectionType{
- CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- var literalType = &core.LiteralType{Type: &core.LiteralType_CollectionType{
- CollectionType: collectionType}}
-
- createList1 := func() interface{} {
- return []interface{}{"hello1", "world1"}
- }
- createList2 := func() interface{} {
- return []interface{}{"hello2", "world2"}
- }
- createNestedList := func() interface{} {
- return []interface{}{createList1(), createList2()}
- }
- var strArrayOfArray = createNestedList()
- val, err := MakeLiteralForType(literalType, strArrayOfArray)
- assert.NoError(t, err)
- literalVal11 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "hello1"}}}}}}
- literalVal12 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world1"}}}}}}
- literalCollection1Val := []*core.Literal{literalVal11, literalVal12}
-
- literalCollection1 := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection1Val}}}
-
- literalVal21 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "hello2"}}}}}}
- literalVal22 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world2"}}}}}}
- literalCollection2Val := []*core.Literal{literalVal21, literalVal22}
- literalCollection2 := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection2Val}}}
- literalCollection := []*core.Literal{literalCollection1, literalCollection2}
-
- literalVal := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("MapStrings", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_MapValueType{
- MapValueType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- mapVal := map[string]interface{}{"hello1": "world1", "hello2": "world2"}
- val, err := MakeLiteralForType(literalType, mapVal)
- assert.NoError(t, err)
- literalVal1 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world1"}}}}}}
- literalVal2 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world2"}}}}}}
- literalMapVal := map[string]*core.Literal{"hello1": literalVal1, "hello2": literalVal2}
- literalVal := &core.Literal{Value: &core.Literal_Map{Map: &core.LiteralMap{Literals: literalMapVal}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("MapArrayOfStringsFail", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_MapValueType{
- MapValueType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- strArray := map[string][]interface{}{"hello1": {"world11", "world12"}, "hello2": {"world21", "world22"}}
- _, err := MakeLiteralForType(literalType, strArray)
- expectedErrorf := fmt.Errorf("map value types can only be of type map[string]interface{}, but found map[string][]interface {}")
- assert.Equal(t, expectedErrorf, err)
- })
-
- t.Run("MapArrayOfStringsTypeErasure", func(t *testing.T) {
- var collectionType = &core.LiteralType{Type: &core.LiteralType_CollectionType{
- CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}}
- var literalType = &core.LiteralType{Type: &core.LiteralType_MapValueType{
- MapValueType: collectionType}}
- createList1 := func() interface{} {
- return []interface{}{"world11", "world12"}
- }
- createList2 := func() interface{} {
- return []interface{}{"world21", "world22"}
- }
- strArray := map[string]interface{}{"hello1": createList1(), "hello2": createList2()}
- val, err := MakeLiteralForType(literalType, strArray)
- assert.NoError(t, err)
- literalVal11 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world11"}}}}}}
- literalVal12 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world12"}}}}}}
- literalCollection1 := []*core.Literal{literalVal11, literalVal12}
- literalVal1 := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection1}}}
- literalVal21 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world21"}}}}}}
- literalVal22 := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "world22"}}}}}}
- literalCollection2 := []*core.Literal{literalVal21, literalVal22}
- literalVal2 := &core.Literal{Value: &core.Literal_Collection{Collection: &core.LiteralCollection{Literals: literalCollection2}}}
- literalMapVal := map[string]*core.Literal{"hello1": literalVal1, "hello2": literalVal2}
- literalVal := &core.Literal{Value: &core.Literal_Map{Map: &core.LiteralMap{Literals: literalMapVal}}}
- expectedVal, _ := ExtractFromLiteral(literalVal)
- actualVal, _ := ExtractFromLiteral(val)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("Schema", func(t *testing.T) {
- var schemaColumns []*core.SchemaType_SchemaColumn
- schemaColumns = append(schemaColumns, &core.SchemaType_SchemaColumn{
- Name: "Price",
- Type: core.SchemaType_SchemaColumn_FLOAT,
- })
- var literalType = &core.LiteralType{Type: &core.LiteralType_Schema{Schema: &core.SchemaType{
- Columns: schemaColumns,
- }}}
-
- expectedLV := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Schema{
- Schema: &core.Schema{
- Uri: "s3://blah/blah/blah",
- Type: &core.SchemaType{
- Columns: schemaColumns,
- },
- },
- },
- }}}
- lv, err := MakeLiteralForType(literalType, "s3://blah/blah/blah")
- assert.NoError(t, err)
-
- assert.Equal(t, expectedLV, lv)
-
- expectedVal, err := ExtractFromLiteral(expectedLV)
- assert.NoError(t, err)
- actualVal, err := ExtractFromLiteral(lv)
- assert.NoError(t, err)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("Blob", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Blob{Blob: &core.BlobType{
- Dimensionality: core.BlobType_SINGLE,
- }}}
- expectedLV := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Blob{
- Blob: &core.Blob{
- Uri: "s3://blah/blah/blah",
- Metadata: &core.BlobMetadata{
- Type: &core.BlobType{
- Dimensionality: core.BlobType_SINGLE,
- },
- },
- },
- },
- }}}
- lv, err := MakeLiteralForType(literalType, "s3://blah/blah/blah")
- assert.NoError(t, err)
-
- assert.Equal(t, expectedLV, lv)
-
- expectedVal, err := ExtractFromLiteral(expectedLV)
- assert.NoError(t, err)
- actualVal, err := ExtractFromLiteral(lv)
- assert.NoError(t, err)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("MultipartBlob", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Blob{Blob: &core.BlobType{
- Dimensionality: core.BlobType_MULTIPART,
- }}}
- expectedLV := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Blob{
- Blob: &core.Blob{
- Uri: "s3://blah/blah/blah",
- Metadata: &core.BlobMetadata{
- Type: &core.BlobType{
- Dimensionality: core.BlobType_MULTIPART,
- },
- },
- },
- },
- }}}
- lv, err := MakeLiteralForType(literalType, "s3://blah/blah/blah")
- assert.NoError(t, err)
-
- assert.Equal(t, expectedLV, lv)
-
- expectedVal, err := ExtractFromLiteral(expectedLV)
- assert.NoError(t, err)
- actualVal, err := ExtractFromLiteral(lv)
- assert.NoError(t, err)
- assert.Equal(t, expectedVal, actualVal)
- })
-
- t.Run("enumtype-nil", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_EnumType{EnumType: &core.EnumType{}}}
- _, err := MakeLiteralForType(literalType, nil)
- assert.Error(t, err)
- _, err = MakeLiteralForType(literalType, "")
- assert.Error(t, err)
- })
-
- t.Run("enumtype-happy", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_EnumType{EnumType: &core.EnumType{Values: []string{"x", "y", "z"}}}}
- expected := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_Primitive{Primitive: &core.Primitive{Value: &core.Primitive_StringValue{StringValue: "x"}}}}}}
- v, err := MakeLiteralForType(literalType, "x")
- assert.NoError(t, err)
- assert.Equal(t, expected, v)
- _, err = MakeLiteralForType(literalType, "")
- assert.Error(t, err)
- })
-
- t.Run("enumtype-illegal-val", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_EnumType{EnumType: &core.EnumType{Values: []string{"x", "y", "z"}}}}
- _, err := MakeLiteralForType(literalType, "m")
- assert.Error(t, err)
- })
-
- t.Run("Nil string", func(t *testing.T) {
- var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}
- l, err := MakeLiteralForType(literalType, nil)
- assert.NoError(t, err)
- assert.Equal(t, "", l.GetScalar().GetPrimitive().GetStringValue())
- l, err = MakeLiteralForType(literalType, "")
- assert.NoError(t, err)
- assert.Equal(t, "", l.GetScalar().GetPrimitive().GetStringValue())
- })
-
- t.Run("Structured Data Set", func(t *testing.T) {
- var dataSetColumns []*core.StructuredDatasetType_DatasetColumn
- dataSetColumns = append(dataSetColumns, &core.StructuredDatasetType_DatasetColumn{
- Name: "Price",
- LiteralType: &core.LiteralType{
- Type: &core.LiteralType_Simple{
- Simple: core.SimpleType_FLOAT,
- },
- },
- })
- var literalType = &core.LiteralType{Type: &core.LiteralType_StructuredDatasetType{StructuredDatasetType: &core.StructuredDatasetType{
- Columns: dataSetColumns,
- Format: "testFormat",
- }}}
-
- expectedLV := &core.Literal{Value: &core.Literal_Scalar{Scalar: &core.Scalar{
- Value: &core.Scalar_StructuredDataset{
- StructuredDataset: &core.StructuredDataset{
- Uri: "s3://blah/blah/blah",
- Metadata: &core.StructuredDatasetMetadata{
- StructuredDatasetType: &core.StructuredDatasetType{
- Columns: dataSetColumns,
- Format: "testFormat",
- },
- },
- },
- },
- }}}
- lv, err := MakeLiteralForType(literalType, "s3://blah/blah/blah")
- assert.NoError(t, err)
-
- assert.Equal(t, expectedLV, lv)
-
- expectedVal, err := ExtractFromLiteral(expectedLV)
- assert.NoError(t, err)
- actualVal, err := ExtractFromLiteral(lv)
- assert.NoError(t, err)
- assert.Equal(t, expectedVal, actualVal)
- })
-}
diff --git a/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go b/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go
deleted file mode 100644
index 28e347f66..000000000
--- a/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go
+++ /dev/null
@@ -1,497 +0,0 @@
-// Code generated by mockery v1.0.1. DO NOT EDIT.
-
-package mocks
-
-import (
- context "context"
-
- datacatalog "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/datacatalog"
- grpc "google.golang.org/grpc"
-
- mock "github.com/stretchr/testify/mock"
-)
-
-// DataCatalogClient is an autogenerated mock type for the DataCatalogClient type
-type DataCatalogClient struct {
- mock.Mock
-}
-
-type DataCatalogClient_AddTag struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_AddTag) Return(_a0 *datacatalog.AddTagResponse, _a1 error) *DataCatalogClient_AddTag {
- return &DataCatalogClient_AddTag{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnAddTag(ctx context.Context, in *datacatalog.AddTagRequest, opts ...grpc.CallOption) *DataCatalogClient_AddTag {
- c_call := _m.On("AddTag", ctx, in, opts)
- return &DataCatalogClient_AddTag{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnAddTagMatch(matchers ...interface{}) *DataCatalogClient_AddTag {
- c_call := _m.On("AddTag", matchers...)
- return &DataCatalogClient_AddTag{Call: c_call}
-}
-
-// AddTag provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) AddTag(ctx context.Context, in *datacatalog.AddTagRequest, opts ...grpc.CallOption) (*datacatalog.AddTagResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.AddTagResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.AddTagRequest, ...grpc.CallOption) *datacatalog.AddTagResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.AddTagResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.AddTagRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_CreateArtifact struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_CreateArtifact) Return(_a0 *datacatalog.CreateArtifactResponse, _a1 error) *DataCatalogClient_CreateArtifact {
- return &DataCatalogClient_CreateArtifact{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnCreateArtifact(ctx context.Context, in *datacatalog.CreateArtifactRequest, opts ...grpc.CallOption) *DataCatalogClient_CreateArtifact {
- c_call := _m.On("CreateArtifact", ctx, in, opts)
- return &DataCatalogClient_CreateArtifact{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnCreateArtifactMatch(matchers ...interface{}) *DataCatalogClient_CreateArtifact {
- c_call := _m.On("CreateArtifact", matchers...)
- return &DataCatalogClient_CreateArtifact{Call: c_call}
-}
-
-// CreateArtifact provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) CreateArtifact(ctx context.Context, in *datacatalog.CreateArtifactRequest, opts ...grpc.CallOption) (*datacatalog.CreateArtifactResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.CreateArtifactResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.CreateArtifactRequest, ...grpc.CallOption) *datacatalog.CreateArtifactResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.CreateArtifactResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.CreateArtifactRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_CreateDataset struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_CreateDataset) Return(_a0 *datacatalog.CreateDatasetResponse, _a1 error) *DataCatalogClient_CreateDataset {
- return &DataCatalogClient_CreateDataset{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnCreateDataset(ctx context.Context, in *datacatalog.CreateDatasetRequest, opts ...grpc.CallOption) *DataCatalogClient_CreateDataset {
- c_call := _m.On("CreateDataset", ctx, in, opts)
- return &DataCatalogClient_CreateDataset{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnCreateDatasetMatch(matchers ...interface{}) *DataCatalogClient_CreateDataset {
- c_call := _m.On("CreateDataset", matchers...)
- return &DataCatalogClient_CreateDataset{Call: c_call}
-}
-
-// CreateDataset provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) CreateDataset(ctx context.Context, in *datacatalog.CreateDatasetRequest, opts ...grpc.CallOption) (*datacatalog.CreateDatasetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.CreateDatasetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.CreateDatasetRequest, ...grpc.CallOption) *datacatalog.CreateDatasetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.CreateDatasetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.CreateDatasetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_GetArtifact struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_GetArtifact) Return(_a0 *datacatalog.GetArtifactResponse, _a1 error) *DataCatalogClient_GetArtifact {
- return &DataCatalogClient_GetArtifact{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnGetArtifact(ctx context.Context, in *datacatalog.GetArtifactRequest, opts ...grpc.CallOption) *DataCatalogClient_GetArtifact {
- c_call := _m.On("GetArtifact", ctx, in, opts)
- return &DataCatalogClient_GetArtifact{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnGetArtifactMatch(matchers ...interface{}) *DataCatalogClient_GetArtifact {
- c_call := _m.On("GetArtifact", matchers...)
- return &DataCatalogClient_GetArtifact{Call: c_call}
-}
-
-// GetArtifact provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) GetArtifact(ctx context.Context, in *datacatalog.GetArtifactRequest, opts ...grpc.CallOption) (*datacatalog.GetArtifactResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.GetArtifactResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.GetArtifactRequest, ...grpc.CallOption) *datacatalog.GetArtifactResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.GetArtifactResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.GetArtifactRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_GetDataset struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_GetDataset) Return(_a0 *datacatalog.GetDatasetResponse, _a1 error) *DataCatalogClient_GetDataset {
- return &DataCatalogClient_GetDataset{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnGetDataset(ctx context.Context, in *datacatalog.GetDatasetRequest, opts ...grpc.CallOption) *DataCatalogClient_GetDataset {
- c_call := _m.On("GetDataset", ctx, in, opts)
- return &DataCatalogClient_GetDataset{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnGetDatasetMatch(matchers ...interface{}) *DataCatalogClient_GetDataset {
- c_call := _m.On("GetDataset", matchers...)
- return &DataCatalogClient_GetDataset{Call: c_call}
-}
-
-// GetDataset provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) GetDataset(ctx context.Context, in *datacatalog.GetDatasetRequest, opts ...grpc.CallOption) (*datacatalog.GetDatasetResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.GetDatasetResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.GetDatasetRequest, ...grpc.CallOption) *datacatalog.GetDatasetResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.GetDatasetResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.GetDatasetRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_GetOrExtendReservation struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_GetOrExtendReservation) Return(_a0 *datacatalog.GetOrExtendReservationResponse, _a1 error) *DataCatalogClient_GetOrExtendReservation {
- return &DataCatalogClient_GetOrExtendReservation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnGetOrExtendReservation(ctx context.Context, in *datacatalog.GetOrExtendReservationRequest, opts ...grpc.CallOption) *DataCatalogClient_GetOrExtendReservation {
- c_call := _m.On("GetOrExtendReservation", ctx, in, opts)
- return &DataCatalogClient_GetOrExtendReservation{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnGetOrExtendReservationMatch(matchers ...interface{}) *DataCatalogClient_GetOrExtendReservation {
- c_call := _m.On("GetOrExtendReservation", matchers...)
- return &DataCatalogClient_GetOrExtendReservation{Call: c_call}
-}
-
-// GetOrExtendReservation provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) GetOrExtendReservation(ctx context.Context, in *datacatalog.GetOrExtendReservationRequest, opts ...grpc.CallOption) (*datacatalog.GetOrExtendReservationResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.GetOrExtendReservationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.GetOrExtendReservationRequest, ...grpc.CallOption) *datacatalog.GetOrExtendReservationResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.GetOrExtendReservationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.GetOrExtendReservationRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_ListArtifacts struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_ListArtifacts) Return(_a0 *datacatalog.ListArtifactsResponse, _a1 error) *DataCatalogClient_ListArtifacts {
- return &DataCatalogClient_ListArtifacts{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnListArtifacts(ctx context.Context, in *datacatalog.ListArtifactsRequest, opts ...grpc.CallOption) *DataCatalogClient_ListArtifacts {
- c_call := _m.On("ListArtifacts", ctx, in, opts)
- return &DataCatalogClient_ListArtifacts{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnListArtifactsMatch(matchers ...interface{}) *DataCatalogClient_ListArtifacts {
- c_call := _m.On("ListArtifacts", matchers...)
- return &DataCatalogClient_ListArtifacts{Call: c_call}
-}
-
-// ListArtifacts provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) ListArtifacts(ctx context.Context, in *datacatalog.ListArtifactsRequest, opts ...grpc.CallOption) (*datacatalog.ListArtifactsResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.ListArtifactsResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.ListArtifactsRequest, ...grpc.CallOption) *datacatalog.ListArtifactsResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.ListArtifactsResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.ListArtifactsRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_ListDatasets struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_ListDatasets) Return(_a0 *datacatalog.ListDatasetsResponse, _a1 error) *DataCatalogClient_ListDatasets {
- return &DataCatalogClient_ListDatasets{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnListDatasets(ctx context.Context, in *datacatalog.ListDatasetsRequest, opts ...grpc.CallOption) *DataCatalogClient_ListDatasets {
- c_call := _m.On("ListDatasets", ctx, in, opts)
- return &DataCatalogClient_ListDatasets{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnListDatasetsMatch(matchers ...interface{}) *DataCatalogClient_ListDatasets {
- c_call := _m.On("ListDatasets", matchers...)
- return &DataCatalogClient_ListDatasets{Call: c_call}
-}
-
-// ListDatasets provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) ListDatasets(ctx context.Context, in *datacatalog.ListDatasetsRequest, opts ...grpc.CallOption) (*datacatalog.ListDatasetsResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.ListDatasetsResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.ListDatasetsRequest, ...grpc.CallOption) *datacatalog.ListDatasetsResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.ListDatasetsResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.ListDatasetsRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_ReleaseReservation struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_ReleaseReservation) Return(_a0 *datacatalog.ReleaseReservationResponse, _a1 error) *DataCatalogClient_ReleaseReservation {
- return &DataCatalogClient_ReleaseReservation{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnReleaseReservation(ctx context.Context, in *datacatalog.ReleaseReservationRequest, opts ...grpc.CallOption) *DataCatalogClient_ReleaseReservation {
- c_call := _m.On("ReleaseReservation", ctx, in, opts)
- return &DataCatalogClient_ReleaseReservation{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnReleaseReservationMatch(matchers ...interface{}) *DataCatalogClient_ReleaseReservation {
- c_call := _m.On("ReleaseReservation", matchers...)
- return &DataCatalogClient_ReleaseReservation{Call: c_call}
-}
-
-// ReleaseReservation provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) ReleaseReservation(ctx context.Context, in *datacatalog.ReleaseReservationRequest, opts ...grpc.CallOption) (*datacatalog.ReleaseReservationResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.ReleaseReservationResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.ReleaseReservationRequest, ...grpc.CallOption) *datacatalog.ReleaseReservationResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.ReleaseReservationResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.ReleaseReservationRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
-
-type DataCatalogClient_UpdateArtifact struct {
- *mock.Call
-}
-
-func (_m DataCatalogClient_UpdateArtifact) Return(_a0 *datacatalog.UpdateArtifactResponse, _a1 error) *DataCatalogClient_UpdateArtifact {
- return &DataCatalogClient_UpdateArtifact{Call: _m.Call.Return(_a0, _a1)}
-}
-
-func (_m *DataCatalogClient) OnUpdateArtifact(ctx context.Context, in *datacatalog.UpdateArtifactRequest, opts ...grpc.CallOption) *DataCatalogClient_UpdateArtifact {
- c_call := _m.On("UpdateArtifact", ctx, in, opts)
- return &DataCatalogClient_UpdateArtifact{Call: c_call}
-}
-
-func (_m *DataCatalogClient) OnUpdateArtifactMatch(matchers ...interface{}) *DataCatalogClient_UpdateArtifact {
- c_call := _m.On("UpdateArtifact", matchers...)
- return &DataCatalogClient_UpdateArtifact{Call: c_call}
-}
-
-// UpdateArtifact provides a mock function with given fields: ctx, in, opts
-func (_m *DataCatalogClient) UpdateArtifact(ctx context.Context, in *datacatalog.UpdateArtifactRequest, opts ...grpc.CallOption) (*datacatalog.UpdateArtifactResponse, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
- }
- var _ca []interface{}
- _ca = append(_ca, ctx, in)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
-
- var r0 *datacatalog.UpdateArtifactResponse
- if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.UpdateArtifactRequest, ...grpc.CallOption) *datacatalog.UpdateArtifactResponse); ok {
- r0 = rf(ctx, in, opts...)
- } else {
- if ret.Get(0) != nil {
- r0 = ret.Get(0).(*datacatalog.UpdateArtifactResponse)
- }
- }
-
- var r1 error
- if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.UpdateArtifactRequest, ...grpc.CallOption) error); ok {
- r1 = rf(ctx, in, opts...)
- } else {
- r1 = ret.Error(1)
- }
-
- return r0, r1
-}
diff --git a/flyteidl/conf.py b/flyteidl/conf.py
deleted file mode 100644
index 1aa29d602..000000000
--- a/flyteidl/conf.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Configuration file for the Sphinx documentation builder.
-#
-# This file does only contain a selection of the most common options. For a
-# full list see the documentation:
-# http://www.sphinx-doc.org/en/stable/config
-
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-import os
-import re
-import sys
-
-import recommonmark
-import sphinx_fontawesome
-from recommonmark.transform import AutoStructify
-
-
-# -- Project information -----------------------------------------------------
-
-project = "Flyte Language Specification"
-copyright = "2021, Flyte"
-author = "Flyte"
-
-# The full version, including alpha/beta/rc tags
-release = re.sub("^v", "", os.popen("git describe").read().strip())
-version = release
-
-# -- General configuration ---------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.autosummary",
- "sphinx.ext.autosectionlabel",
- "sphinx.ext.napoleon",
- "sphinx.ext.todo",
- "sphinx.ext.viewcode",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx-prompt",
- "sphinx_copybutton",
- "recommonmark",
- "sphinx_markdown_tables",
- "sphinx_fontawesome",
- "sphinx_panels",
-]
-
-# build the templated autosummary files
-autosummary_generate = True
-
-# autosectionlabel throws warnings if section names are duplicated.
-# The following tells autosectionlabel to not throw a warning for
-# duplicated section names that are in different documents.
-autosectionlabel_prefix_document = True
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ["_templates"]
-
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-#
-source_suffix = [".rst"]
-
-# The master toctree document.
-master_doc = "index"
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = None
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path .
-exclude_patterns = [
- u"_build",
- "Thumbs.db",
- ".DS_Store",
- "tmp/doc_gen_deps",
- "gen/*/*/*/*/*",
- "CODE_OF_CONDUCT.md",
- "pull_request_template.md",
- "boilerplate",
-]
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = "tango"
-pygments_dark_style = "native"
-
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#
-html_theme = "furo"
-html_title = "Flyte"
-html_favicon = "docs/images/flyte_circle_gradient_1_4x4.png"
-html_logo = "docs/images/flyte_circle_gradient_1_4x4.png"
-
-html_theme_options = {
- "light_css_variables": {
- "color-brand-primary": "#4300c9",
- "color-brand-content": "#4300c9",
- },
- "dark_css_variables": {
- "color-brand-primary": "#9D68E4",
- "color-brand-content": "#9D68E4",
- },
- # custom flyteorg furo theme options
- "github_repo": "flyteidl",
- "github_username": "flyteorg",
- "github_commit": "master",
- "docs_path": ".", # path to documentation source
-}
-
-html_context = {
- "home_page": "https://docs.flyte.org",
-}
-
-# The default sidebars (for documents that don't match any pattern) are
-# defined by theme itself. Builtin themes are using these templates by
-# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
-# 'searchbox.html']``.
-# html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]}
-
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ["docs/_static"]
-html_css_files = ["css/fix_toc.css"]
-
-# Custom sidebar templates, must be a dictionary that maps document names
-# to template names.
-#
-
-
-# -- Options for HTMLHelp output ---------------------------------------------
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "flyteidldoc"
-
-
-# -- Options for LaTeX output ------------------------------------------------
-
-latex_elements = {
- # The paper size ('letterpaper' or 'a4paper').
- #
- # 'papersize': 'letterpaper',
- # The font size ('10pt', '11pt' or '12pt').
- #
- # 'pointsize': '10pt',
- # Additional stuff for the LaTeX preamble.
- #
- # 'preamble': '',
- # Latex figure (float) alignment
- #
- # 'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, "flyteidl.tex", "flyteidl Documentation", "Flyte", "manual"),
-]
-
-
-# -- Options for manual page output ------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [(master_doc, "flyteidl", "flyteidl Documentation", [author], 1)]
-
-
-# -- Options for Texinfo output ----------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- (
- master_doc,
- "flyteidl",
- "flyteidl Documentation",
- author,
- "flyteidl",
- "Python SDK for Flyte (https://flyte.org).",
- "Miscellaneous",
- ),
-]
-
-
-# -- Extension configuration -------------------------------------------------
-# intersphinx configuration
-intersphinx_mapping = {
- "python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
-}
-
-
-def setup(app):
- app.add_config_value(
- "recommonmark_config",
- {
- "auto_toc_tree_section": "Contents",
- "enable_math": False,
- "enable_inline_math": False,
- "enable_eval_rst": True,
- },
- True,
- )
- app.add_transform(AutoStructify)
diff --git a/flyteidl/doc-requirements.in b/flyteidl/doc-requirements.in
deleted file mode 100644
index 3f48edd16..000000000
--- a/flyteidl/doc-requirements.in
+++ /dev/null
@@ -1,10 +0,0 @@
-git+https://github.com/flyteorg/furo.git@main
-recommonmark
-sphinx
-sphinx-prompt
-sphinx-material
-sphinx-code-include
-sphinx-copybutton
-sphinx_markdown_tables
-sphinx_fontawesome
-sphinx-panels
diff --git a/flyteidl/doc-requirements.txt b/flyteidl/doc-requirements.txt
deleted file mode 100644
index 6adef8b8a..000000000
--- a/flyteidl/doc-requirements.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# This file is autogenerated by pip-compile with python 3.8
-# To update, run:
-#
-# pip-compile doc-requirements.in
-#
-alabaster==0.7.12
- # via sphinx
-babel==2.9.1
- # via sphinx
-beautifulsoup4==4.10.0
- # via
- # furo
- # sphinx-code-include
- # sphinx-material
-certifi==2021.10.8
- # via requests
-charset-normalizer==2.0.10
- # via requests
-commonmark==0.9.1
- # via recommonmark
-css-html-js-minify==2.5.5
- # via sphinx-material
-docutils==0.17.1
- # via
- # recommonmark
- # sphinx
- # sphinx-panels
-furo @ git+https://github.com/flyteorg/furo.git@main
- # via -r doc-requirements.in
-idna==3.3
- # via requests
-imagesize==1.3.0
- # via sphinx
-importlib-metadata==4.10.0
- # via markdown
-jinja2==3.0.3
- # via sphinx
-lxml==4.7.1
- # via sphinx-material
-markdown==3.3.6
- # via sphinx-markdown-tables
-markupsafe==2.0.1
- # via jinja2
-packaging==21.3
- # via sphinx
-pygments==2.11.2
- # via
- # sphinx
- # sphinx-prompt
-pyparsing==3.0.6
- # via packaging
-python-slugify[unidecode]==5.0.2
- # via sphinx-material
-pytz==2021.3
- # via babel
-recommonmark==0.7.1
- # via -r doc-requirements.in
-requests==2.27.1
- # via sphinx
-six==1.16.0
- # via sphinx-code-include
-snowballstemmer==2.2.0
- # via sphinx
-soupsieve==2.3.1
- # via beautifulsoup4
-sphinx==4.3.2
- # via
- # -r doc-requirements.in
- # furo
- # recommonmark
- # sphinx-code-include
- # sphinx-copybutton
- # sphinx-fontawesome
- # sphinx-material
- # sphinx-panels
- # sphinx-prompt
-sphinx-code-include==1.1.1
- # via -r doc-requirements.in
-sphinx-copybutton==0.4.0
- # via -r doc-requirements.in
-sphinx-fontawesome==0.0.6
- # via -r doc-requirements.in
-sphinx-markdown-tables==0.0.15
- # via -r doc-requirements.in
-sphinx-material==0.0.35
- # via -r doc-requirements.in
-sphinx-panels==0.6.0
- # via -r doc-requirements.in
-sphinx-prompt==1.5.0
- # via -r doc-requirements.in
-sphinxcontrib-applehelp==1.0.2
- # via sphinx
-sphinxcontrib-devhelp==1.0.2
- # via sphinx
-sphinxcontrib-htmlhelp==2.0.0
- # via sphinx
-sphinxcontrib-jsmath==1.0.1
- # via sphinx
-sphinxcontrib-qthelp==1.0.3
- # via sphinx
-sphinxcontrib-serializinghtml==1.1.5
- # via sphinx
-text-unidecode==1.3
- # via python-slugify
-unidecode==1.3.2
- # via python-slugify
-urllib3==1.26.8
- # via requests
-zipp==3.7.0
- # via importlib-metadata
-
-# The following packages are considered to be unsafe in a requirements file:
-# setuptools
diff --git a/flyteidl/docs/Makefile b/flyteidl/docs/Makefile
deleted file mode 100644
index e31a5fb03..000000000
--- a/flyteidl/docs/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# Minimal makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-SPHINXPROJ = flyteidl
-SOURCEDIR = ../
-BUILDDIR = build
-
-# Put it first so that "make" without argument is like "make help".
-help:
- @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
-.PHONY: help Makefile
-
-# Catch-all target: route all unknown targets to Sphinx using the new
-# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/flyteidl/docs/_static/css/fix_toc.css b/flyteidl/docs/_static/css/fix_toc.css
deleted file mode 100644
index 9d4302546..000000000
--- a/flyteidl/docs/_static/css/fix_toc.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.sidebar-tree > :not(:first-child) {
- display: block !important;
-}
\ No newline at end of file
diff --git a/flyteidl/docs/images/flyte_circle_gradient_1_4x4.png b/flyteidl/docs/images/flyte_circle_gradient_1_4x4.png
deleted file mode 100644
index 49cdbbbc3..000000000
Binary files a/flyteidl/docs/images/flyte_circle_gradient_1_4x4.png and /dev/null differ
diff --git a/flyteidl/docs/make.bat b/flyteidl/docs/make.bat
deleted file mode 100644
index 47d656bb7..000000000
--- a/flyteidl/docs/make.bat
+++ /dev/null
@@ -1,36 +0,0 @@
-@ECHO OFF
-
-pushd %~dp0
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set SOURCEDIR=source
-set BUILDDIR=build
-set SPHINXPROJ=simpleble
-
-if "%1" == "" goto help
-
-%SPHINXBUILD% >NUL 2>NUL
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.http://sphinx-doc.org/
- exit /b 1
-)
-
-%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
-goto end
-
-:help
-%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
-
-:end
-popd
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.cc
deleted file mode 100644
index a2eafa3ca..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// Generated by the gRPC C++ plugin.
-// If you make any local change, they will be lost.
-// source: flyteidl/admin/cluster_assignment.proto
-
-#include "flyteidl/admin/cluster_assignment.pb.h"
-#include "flyteidl/admin/cluster_assignment.grpc.pb.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-namespace flyteidl {
-namespace admin {
-
-} // namespace flyteidl
-} // namespace admin
-
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.h
deleted file mode 100644
index 126217267..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.grpc.pb.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Generated by the gRPC C++ plugin.
-// If you make any local change, they will be lost.
-// source: flyteidl/admin/cluster_assignment.proto
-#ifndef GRPC_flyteidl_2fadmin_2fcluster_5fassignment_2eproto__INCLUDED
-#define GRPC_flyteidl_2fadmin_2fcluster_5fassignment_2eproto__INCLUDED
-
-#include "flyteidl/admin/cluster_assignment.pb.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace grpc_impl {
-class Channel;
-class CompletionQueue;
-class ServerCompletionQueue;
-} // namespace grpc_impl
-
-namespace grpc {
-namespace experimental {
-template
-class MessageAllocator;
-} // namespace experimental
-} // namespace grpc_impl
-
-namespace grpc {
-class ServerContext;
-} // namespace grpc
-
-namespace flyteidl {
-namespace admin {
-
-} // namespace admin
-} // namespace flyteidl
-
-
-#endif // GRPC_flyteidl_2fadmin_2fcluster_5fassignment_2eproto__INCLUDED
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.cc
deleted file mode 100644
index 84784fabd..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.cc
+++ /dev/null
@@ -1,405 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: flyteidl/admin/cluster_assignment.proto
-
-#include "flyteidl/admin/cluster_assignment.pb.h"
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-// @@protoc_insertion_point(includes)
-#include
-
-namespace flyteidl {
-namespace admin {
-class ClusterAssignmentDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _ClusterAssignment_default_instance_;
-} // namespace admin
-} // namespace flyteidl
-static void InitDefaultsClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_ClusterAssignment_default_instance_;
- new (ptr) ::flyteidl::admin::ClusterAssignment();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::ClusterAssignment::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_ClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto}, {}};
-
-void InitDefaults_flyteidl_2fadmin_2fcluster_5fassignment_2eproto() {
- ::google::protobuf::internal::InitSCC(&scc_info_ClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto.base);
-}
-
-::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fcluster_5fassignment_2eproto[1];
-constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto = nullptr;
-constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto = nullptr;
-
-const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fcluster_5fassignment_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ClusterAssignment, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ClusterAssignment, cluster_pool_name_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::flyteidl::admin::ClusterAssignment)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast(&::flyteidl::admin::_ClusterAssignment_default_instance_),
-};
-
-::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fcluster_5fassignment_2eproto = {
- {}, AddDescriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto, "flyteidl/admin/cluster_assignment.proto", schemas,
- file_default_instances, TableStruct_flyteidl_2fadmin_2fcluster_5fassignment_2eproto::offsets,
- file_level_metadata_flyteidl_2fadmin_2fcluster_5fassignment_2eproto, 1, file_level_enum_descriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto,
-};
-
-const char descriptor_table_protodef_flyteidl_2fadmin_2fcluster_5fassignment_2eproto[] =
- "\n\'flyteidl/admin/cluster_assignment.prot"
- "o\022\016flyteidl.admin\":\n\021ClusterAssignment\022\031"
- "\n\021cluster_pool_name\030\003 \001(\tJ\004\010\001\020\002J\004\010\002\020\003B7Z"
- "5github.com/flyteorg/flyteidl/gen/pb-go/"
- "flyteidl/adminb\006proto3"
- ;
-::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fcluster_5fassignment_2eproto = {
- false, InitDefaults_flyteidl_2fadmin_2fcluster_5fassignment_2eproto,
- descriptor_table_protodef_flyteidl_2fadmin_2fcluster_5fassignment_2eproto,
- "flyteidl/admin/cluster_assignment.proto", &assign_descriptors_table_flyteidl_2fadmin_2fcluster_5fassignment_2eproto, 182,
-};
-
-void AddDescriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto() {
- static constexpr ::google::protobuf::internal::InitFunc deps[1] =
- {
- };
- ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fadmin_2fcluster_5fassignment_2eproto, deps, 0);
-}
-
-// Force running AddDescriptors() at dynamic initialization time.
-static bool dynamic_init_dummy_flyteidl_2fadmin_2fcluster_5fassignment_2eproto = []() { AddDescriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto(); return true; }();
-namespace flyteidl {
-namespace admin {
-
-// ===================================================================
-
-void ClusterAssignment::InitAsDefaultInstance() {
-}
-class ClusterAssignment::HasBitSetters {
- public:
-};
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ClusterAssignment::kClusterPoolNameFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ClusterAssignment::ClusterAssignment()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.ClusterAssignment)
-}
-ClusterAssignment::ClusterAssignment(const ClusterAssignment& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- cluster_pool_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.cluster_pool_name().size() > 0) {
- cluster_pool_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_pool_name_);
- }
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.ClusterAssignment)
-}
-
-void ClusterAssignment::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_ClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto.base);
- cluster_pool_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-ClusterAssignment::~ClusterAssignment() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.ClusterAssignment)
- SharedDtor();
-}
-
-void ClusterAssignment::SharedDtor() {
- cluster_pool_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void ClusterAssignment::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const ClusterAssignment& ClusterAssignment::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_ClusterAssignment_flyteidl_2fadmin_2fcluster_5fassignment_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void ClusterAssignment::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.ClusterAssignment)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- cluster_pool_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* ClusterAssignment::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // string cluster_pool_name = 3;
- case 3: {
- if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.ClusterAssignment.cluster_pool_name");
- object = msg->mutable_cluster_pool_name();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool ClusterAssignment::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.ClusterAssignment)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string cluster_pool_name = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_cluster_pool_name()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->cluster_pool_name().data(), static_cast(this->cluster_pool_name().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.ClusterAssignment.cluster_pool_name"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.ClusterAssignment)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.ClusterAssignment)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void ClusterAssignment::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.ClusterAssignment)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string cluster_pool_name = 3;
- if (this->cluster_pool_name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->cluster_pool_name().data(), static_cast(this->cluster_pool_name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.ClusterAssignment.cluster_pool_name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->cluster_pool_name(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.ClusterAssignment)
-}
-
-::google::protobuf::uint8* ClusterAssignment::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.ClusterAssignment)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string cluster_pool_name = 3;
- if (this->cluster_pool_name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->cluster_pool_name().data(), static_cast(this->cluster_pool_name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.ClusterAssignment.cluster_pool_name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->cluster_pool_name(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.ClusterAssignment)
- return target;
-}
-
-size_t ClusterAssignment::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.ClusterAssignment)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // string cluster_pool_name = 3;
- if (this->cluster_pool_name().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->cluster_pool_name());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void ClusterAssignment::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.ClusterAssignment)
- GOOGLE_DCHECK_NE(&from, this);
- const ClusterAssignment* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.ClusterAssignment)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.ClusterAssignment)
- MergeFrom(*source);
- }
-}
-
-void ClusterAssignment::MergeFrom(const ClusterAssignment& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.ClusterAssignment)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.cluster_pool_name().size() > 0) {
-
- cluster_pool_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_pool_name_);
- }
-}
-
-void ClusterAssignment::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.ClusterAssignment)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ClusterAssignment::CopyFrom(const ClusterAssignment& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.ClusterAssignment)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool ClusterAssignment::IsInitialized() const {
- return true;
-}
-
-void ClusterAssignment::Swap(ClusterAssignment* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void ClusterAssignment::InternalSwap(ClusterAssignment* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- cluster_pool_name_.Swap(&other->cluster_pool_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
-
-::google::protobuf::Metadata ClusterAssignment::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcluster_5fassignment_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcluster_5fassignment_2eproto[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace admin
-} // namespace flyteidl
-namespace google {
-namespace protobuf {
-template<> PROTOBUF_NOINLINE ::flyteidl::admin::ClusterAssignment* Arena::CreateMaybeMessage< ::flyteidl::admin::ClusterAssignment >(Arena* arena) {
- return Arena::CreateInternal< ::flyteidl::admin::ClusterAssignment >(arena);
-}
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-#include
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.h
deleted file mode 100644
index 79c774371..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/cluster_assignment.pb.h
+++ /dev/null
@@ -1,262 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: flyteidl/admin/cluster_assignment.proto
-
-#ifndef PROTOBUF_INCLUDED_flyteidl_2fadmin_2fcluster_5fassignment_2eproto
-#define PROTOBUF_INCLUDED_flyteidl_2fadmin_2fcluster_5fassignment_2eproto
-
-#include
-#include
-
-#include
-#if PROTOBUF_VERSION < 3007000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include // IWYU pragma: export
-#include // IWYU pragma: export
-#include
-// @@protoc_insertion_point(includes)
-#include
-#define PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcluster_5fassignment_2eproto
-
-// Internal implementation detail -- do not use these members.
-struct TableStruct_flyteidl_2fadmin_2fcluster_5fassignment_2eproto {
- static const ::google::protobuf::internal::ParseTableField entries[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::google::protobuf::internal::ParseTable schema[1]
- PROTOBUF_SECTION_VARIABLE(protodesc_cold);
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors_flyteidl_2fadmin_2fcluster_5fassignment_2eproto();
-namespace flyteidl {
-namespace admin {
-class ClusterAssignment;
-class ClusterAssignmentDefaultTypeInternal;
-extern ClusterAssignmentDefaultTypeInternal _ClusterAssignment_default_instance_;
-} // namespace admin
-} // namespace flyteidl
-namespace google {
-namespace protobuf {
-template<> ::flyteidl::admin::ClusterAssignment* Arena::CreateMaybeMessage<::flyteidl::admin::ClusterAssignment>(Arena*);
-} // namespace protobuf
-} // namespace google
-namespace flyteidl {
-namespace admin {
-
-// ===================================================================
-
-class ClusterAssignment final :
- public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.ClusterAssignment) */ {
- public:
- ClusterAssignment();
- virtual ~ClusterAssignment();
-
- ClusterAssignment(const ClusterAssignment& from);
-
- inline ClusterAssignment& operator=(const ClusterAssignment& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- ClusterAssignment(ClusterAssignment&& from) noexcept
- : ClusterAssignment() {
- *this = ::std::move(from);
- }
-
- inline ClusterAssignment& operator=(ClusterAssignment&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- static const ::google::protobuf::Descriptor* descriptor() {
- return default_instance().GetDescriptor();
- }
- static const ClusterAssignment& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const ClusterAssignment* internal_default_instance() {
- return reinterpret_cast(
- &_ClusterAssignment_default_instance_);
- }
- static constexpr int kIndexInFileMessages =
- 0;
-
- void Swap(ClusterAssignment* other);
- friend void swap(ClusterAssignment& a, ClusterAssignment& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline ClusterAssignment* New() const final {
- return CreateMaybeMessage(nullptr);
- }
-
- ClusterAssignment* New(::google::protobuf::Arena* arena) const final {
- return CreateMaybeMessage(arena);
- }
- void CopyFrom(const ::google::protobuf::Message& from) final;
- void MergeFrom(const ::google::protobuf::Message& from) final;
- void CopyFrom(const ClusterAssignment& from);
- void MergeFrom(const ClusterAssignment& from);
- PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
- bool IsInitialized() const final;
-
- size_t ByteSizeLong() const final;
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx);
- ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; }
- #else
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) final;
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const final;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const final;
- int GetCachedSize() const final { return _cached_size_.Get(); }
-
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const final;
- void InternalSwap(ClusterAssignment* other);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return nullptr;
- }
- inline void* MaybeArenaPtr() const {
- return nullptr;
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const final;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // string cluster_pool_name = 3;
- void clear_cluster_pool_name();
- static const int kClusterPoolNameFieldNumber = 3;
- const ::std::string& cluster_pool_name() const;
- void set_cluster_pool_name(const ::std::string& value);
- #if LANG_CXX11
- void set_cluster_pool_name(::std::string&& value);
- #endif
- void set_cluster_pool_name(const char* value);
- void set_cluster_pool_name(const char* value, size_t size);
- ::std::string* mutable_cluster_pool_name();
- ::std::string* release_cluster_pool_name();
- void set_allocated_cluster_pool_name(::std::string* cluster_pool_name);
-
- // @@protoc_insertion_point(class_scope:flyteidl.admin.ClusterAssignment)
- private:
- class HasBitSetters;
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr cluster_pool_name_;
- mutable ::google::protobuf::internal::CachedSize _cached_size_;
- friend struct ::TableStruct_flyteidl_2fadmin_2fcluster_5fassignment_2eproto;
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// ClusterAssignment
-
-// string cluster_pool_name = 3;
-inline void ClusterAssignment::clear_cluster_pool_name() {
- cluster_pool_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ClusterAssignment::cluster_pool_name() const {
- // @@protoc_insertion_point(field_get:flyteidl.admin.ClusterAssignment.cluster_pool_name)
- return cluster_pool_name_.GetNoArena();
-}
-inline void ClusterAssignment::set_cluster_pool_name(const ::std::string& value) {
-
- cluster_pool_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-}
-#if LANG_CXX11
-inline void ClusterAssignment::set_cluster_pool_name(::std::string&& value) {
-
- cluster_pool_name_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-}
-#endif
-inline void ClusterAssignment::set_cluster_pool_name(const char* value) {
- GOOGLE_DCHECK(value != nullptr);
-
- cluster_pool_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-}
-inline void ClusterAssignment::set_cluster_pool_name(const char* value, size_t size) {
-
- cluster_pool_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast(value), size));
- // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-}
-inline ::std::string* ClusterAssignment::mutable_cluster_pool_name() {
-
- // @@protoc_insertion_point(field_mutable:flyteidl.admin.ClusterAssignment.cluster_pool_name)
- return cluster_pool_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ClusterAssignment::release_cluster_pool_name() {
- // @@protoc_insertion_point(field_release:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-
- return cluster_pool_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ClusterAssignment::set_allocated_cluster_pool_name(::std::string* cluster_pool_name) {
- if (cluster_pool_name != nullptr) {
-
- } else {
-
- }
- cluster_pool_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), cluster_pool_name);
- // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.ClusterAssignment.cluster_pool_name)
-}
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace admin
-} // namespace flyteidl
-
-// @@protoc_insertion_point(global_scope)
-
-#include
-#endif // PROTOBUF_INCLUDED_flyteidl_2fadmin_2fcluster_5fassignment_2eproto
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.cc
deleted file mode 100644
index 81425fdda..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-// Generated by the gRPC C++ plugin.
-// If you make any local change, they will be lost.
-// source: flyteidl/admin/common.proto
-
-#include "flyteidl/admin/common.pb.h"
-#include "flyteidl/admin/common.grpc.pb.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-namespace flyteidl {
-namespace admin {
-
-} // namespace flyteidl
-} // namespace admin
-
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.h
deleted file mode 100644
index b6d8d3677..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/common.grpc.pb.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Generated by the gRPC C++ plugin.
-// If you make any local change, they will be lost.
-// source: flyteidl/admin/common.proto
-#ifndef GRPC_flyteidl_2fadmin_2fcommon_2eproto__INCLUDED
-#define GRPC_flyteidl_2fadmin_2fcommon_2eproto__INCLUDED
-
-#include "flyteidl/admin/common.pb.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace grpc_impl {
-class Channel;
-class CompletionQueue;
-class ServerCompletionQueue;
-} // namespace grpc_impl
-
-namespace grpc {
-namespace experimental {
-template
-class MessageAllocator;
-} // namespace experimental
-} // namespace grpc_impl
-
-namespace grpc {
-class ServerContext;
-} // namespace grpc
-
-namespace flyteidl {
-namespace admin {
-
-} // namespace admin
-} // namespace flyteidl
-
-
-#endif // GRPC_flyteidl_2fadmin_2fcommon_2eproto__INCLUDED
diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc
deleted file mode 100644
index a64ea9629..000000000
--- a/flyteidl/gen/pb-cpp/flyteidl/admin/common.pb.cc
+++ /dev/null
@@ -1,9624 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: flyteidl/admin/common.proto
-
-#include "flyteidl/admin/common.pb.h"
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-// @@protoc_insertion_point(includes)
-#include
-
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Annotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EmailNotification_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Labels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fcommon_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto;
-extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2fidentifier_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Identifier_flyteidl_2fcore_2fidentifier_2eproto;
-namespace flyteidl {
-namespace admin {
-class NamedEntityIdentifierDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityIdentifier_default_instance_;
-class NamedEntityMetadataDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityMetadata_default_instance_;
-class NamedEntityDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntity_default_instance_;
-class SortDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _Sort_default_instance_;
-class NamedEntityIdentifierListRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityIdentifierListRequest_default_instance_;
-class NamedEntityListRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityListRequest_default_instance_;
-class NamedEntityIdentifierListDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityIdentifierList_default_instance_;
-class NamedEntityListDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityList_default_instance_;
-class NamedEntityGetRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityGetRequest_default_instance_;
-class NamedEntityUpdateRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityUpdateRequest_default_instance_;
-class NamedEntityUpdateResponseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _NamedEntityUpdateResponse_default_instance_;
-class ObjectGetRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _ObjectGetRequest_default_instance_;
-class ResourceListRequestDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _ResourceListRequest_default_instance_;
-class EmailNotificationDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _EmailNotification_default_instance_;
-class PagerDutyNotificationDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _PagerDutyNotification_default_instance_;
-class SlackNotificationDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _SlackNotification_default_instance_;
-class NotificationDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
- const ::flyteidl::admin::EmailNotification* email_;
- const ::flyteidl::admin::PagerDutyNotification* pager_duty_;
- const ::flyteidl::admin::SlackNotification* slack_;
-} _Notification_default_instance_;
-class UrlBlobDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _UrlBlob_default_instance_;
-class Labels_ValuesEntry_DoNotUseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _Labels_ValuesEntry_DoNotUse_default_instance_;
-class LabelsDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _Labels_default_instance_;
-class Annotations_ValuesEntry_DoNotUseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _Annotations_ValuesEntry_DoNotUse_default_instance_;
-class AnnotationsDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _Annotations_default_instance_;
-class AuthRoleDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _AuthRole_default_instance_;
-class RawOutputDataConfigDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed _instance;
-} _RawOutputDataConfig_default_instance_;
-} // namespace admin
-} // namespace flyteidl
-static void InitDefaultsNamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityIdentifier_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityIdentifier();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityIdentifier::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsNamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityMetadata_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityMetadata();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityMetadata::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsNamedEntity_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntity_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntity();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntity::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<2> scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsNamedEntity_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base,
- &scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsSort_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Sort_default_instance_;
- new (ptr) ::flyteidl::admin::Sort();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::Sort::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSort_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsNamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityIdentifierListRequest_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityIdentifierListRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityIdentifierListRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_NamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityListRequest_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityListRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityListRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_NamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityIdentifierList_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityIdentifierList_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityIdentifierList();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityIdentifierList::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_NamedEntityIdentifierList_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNamedEntityIdentifierList_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityList_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityList_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityList();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityList::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_NamedEntityList_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNamedEntityList_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityGetRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityGetRequest_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityGetRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityGetRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_NamedEntityGetRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNamedEntityGetRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityUpdateRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityUpdateRequest_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityUpdateRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityUpdateRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<2> scc_info_NamedEntityUpdateRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsNamedEntityUpdateRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base,
- &scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsNamedEntityUpdateResponse_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_NamedEntityUpdateResponse_default_instance_;
- new (ptr) ::flyteidl::admin::NamedEntityUpdateResponse();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::NamedEntityUpdateResponse::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_NamedEntityUpdateResponse_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNamedEntityUpdateResponse_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsObjectGetRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_ObjectGetRequest_default_instance_;
- new (ptr) ::flyteidl::admin::ObjectGetRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::ObjectGetRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_ObjectGetRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsObjectGetRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_Identifier_flyteidl_2fcore_2fidentifier_2eproto.base,}};
-
-static void InitDefaultsResourceListRequest_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_ResourceListRequest_default_instance_;
- new (ptr) ::flyteidl::admin::ResourceListRequest();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::ResourceListRequest::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<2> scc_info_ResourceListRequest_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsResourceListRequest_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base,
- &scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsEmailNotification_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_EmailNotification_default_instance_;
- new (ptr) ::flyteidl::admin::EmailNotification();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::EmailNotification::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_EmailNotification_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmailNotification_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsPagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_PagerDutyNotification_default_instance_;
- new (ptr) ::flyteidl::admin::PagerDutyNotification();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::PagerDutyNotification::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsSlackNotification_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_SlackNotification_default_instance_;
- new (ptr) ::flyteidl::admin::SlackNotification();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::SlackNotification::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSlackNotification_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsNotification_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Notification_default_instance_;
- new (ptr) ::flyteidl::admin::Notification();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::Notification::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<3> scc_info_Notification_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsNotification_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_EmailNotification_flyteidl_2fadmin_2fcommon_2eproto.base,
- &scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto.base,
- &scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsUrlBlob_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_UrlBlob_default_instance_;
- new (ptr) ::flyteidl::admin::UrlBlob();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::UrlBlob::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_UrlBlob_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUrlBlob_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsLabels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Labels_ValuesEntry_DoNotUse_default_instance_;
- new (ptr) ::flyteidl::admin::Labels_ValuesEntry_DoNotUse();
- }
- ::flyteidl::admin::Labels_ValuesEntry_DoNotUse::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_Labels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsLabels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsLabels_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Labels_default_instance_;
- new (ptr) ::flyteidl::admin::Labels();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::Labels::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_Labels_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsLabels_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_Labels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsAnnotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Annotations_ValuesEntry_DoNotUse_default_instance_;
- new (ptr) ::flyteidl::admin::Annotations_ValuesEntry_DoNotUse();
- }
- ::flyteidl::admin::Annotations_ValuesEntry_DoNotUse::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_Annotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAnnotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsAnnotations_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_Annotations_default_instance_;
- new (ptr) ::flyteidl::admin::Annotations();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::Annotations::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<1> scc_info_Annotations_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsAnnotations_flyteidl_2fadmin_2fcommon_2eproto}, {
- &scc_info_Annotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto.base,}};
-
-static void InitDefaultsAuthRole_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_AuthRole_default_instance_;
- new (ptr) ::flyteidl::admin::AuthRole();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::AuthRole::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_AuthRole_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAuthRole_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-static void InitDefaultsRawOutputDataConfig_flyteidl_2fadmin_2fcommon_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- {
- void* ptr = &::flyteidl::admin::_RawOutputDataConfig_default_instance_;
- new (ptr) ::flyteidl::admin::RawOutputDataConfig();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::flyteidl::admin::RawOutputDataConfig::InitAsDefaultInstance();
-}
-
-::google::protobuf::internal::SCCInfo<0> scc_info_RawOutputDataConfig_flyteidl_2fadmin_2fcommon_2eproto =
- {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRawOutputDataConfig_flyteidl_2fadmin_2fcommon_2eproto}, {}};
-
-void InitDefaults_flyteidl_2fadmin_2fcommon_2eproto() {
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityIdentifierList_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityList_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityGetRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityUpdateRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_NamedEntityUpdateResponse_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_ObjectGetRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_ResourceListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_EmailNotification_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_PagerDutyNotification_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_SlackNotification_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Notification_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_UrlBlob_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Labels_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Labels_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Annotations_ValuesEntry_DoNotUse_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_Annotations_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_AuthRole_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::google::protobuf::internal::InitSCC(&scc_info_RawOutputDataConfig_flyteidl_2fadmin_2fcommon_2eproto.base);
-}
-
-::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[24];
-const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto[2];
-constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fcommon_2eproto = nullptr;
-
-const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifier, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifier, project_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifier, domain_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifier, name_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityMetadata, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityMetadata, description_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityMetadata, state_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntity, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntity, resource_type_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntity, id_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntity, metadata_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Sort, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Sort, key_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Sort, direction_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, project_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, domain_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, limit_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, token_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, sort_by_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierListRequest, filters_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, resource_type_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, project_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, domain_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, limit_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, token_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, sort_by_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityListRequest, filters_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierList, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierList, entities_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityIdentifierList, token_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityList, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityList, entities_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityList, token_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityGetRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityGetRequest, resource_type_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityGetRequest, id_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityUpdateRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityUpdateRequest, resource_type_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityUpdateRequest, id_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityUpdateRequest, metadata_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::NamedEntityUpdateResponse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ObjectGetRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ObjectGetRequest, id_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, id_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, limit_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, token_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, filters_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ResourceListRequest, sort_by_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::EmailNotification, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::EmailNotification, recipients_email_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::PagerDutyNotification, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::PagerDutyNotification, recipients_email_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::SlackNotification, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::SlackNotification, recipients_email_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Notification, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Notification, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Notification, phases_),
- offsetof(::flyteidl::admin::NotificationDefaultTypeInternal, email_),
- offsetof(::flyteidl::admin::NotificationDefaultTypeInternal, pager_duty_),
- offsetof(::flyteidl::admin::NotificationDefaultTypeInternal, slack_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Notification, type_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::UrlBlob, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::UrlBlob, url_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::UrlBlob, bytes_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels_ValuesEntry_DoNotUse, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels_ValuesEntry_DoNotUse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels_ValuesEntry_DoNotUse, key_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels_ValuesEntry_DoNotUse, value_),
- 0,
- 1,
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Labels, values_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse, key_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse, value_),
- 0,
- 1,
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Annotations, values_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::AuthRole, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::AuthRole, assumable_iam_role_),
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::AuthRole, kubernetes_service_account_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::RawOutputDataConfig, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::flyteidl::admin::RawOutputDataConfig, output_location_prefix_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::flyteidl::admin::NamedEntityIdentifier)},
- { 8, -1, sizeof(::flyteidl::admin::NamedEntityMetadata)},
- { 15, -1, sizeof(::flyteidl::admin::NamedEntity)},
- { 23, -1, sizeof(::flyteidl::admin::Sort)},
- { 30, -1, sizeof(::flyteidl::admin::NamedEntityIdentifierListRequest)},
- { 41, -1, sizeof(::flyteidl::admin::NamedEntityListRequest)},
- { 53, -1, sizeof(::flyteidl::admin::NamedEntityIdentifierList)},
- { 60, -1, sizeof(::flyteidl::admin::NamedEntityList)},
- { 67, -1, sizeof(::flyteidl::admin::NamedEntityGetRequest)},
- { 74, -1, sizeof(::flyteidl::admin::NamedEntityUpdateRequest)},
- { 82, -1, sizeof(::flyteidl::admin::NamedEntityUpdateResponse)},
- { 87, -1, sizeof(::flyteidl::admin::ObjectGetRequest)},
- { 93, -1, sizeof(::flyteidl::admin::ResourceListRequest)},
- { 103, -1, sizeof(::flyteidl::admin::EmailNotification)},
- { 109, -1, sizeof(::flyteidl::admin::PagerDutyNotification)},
- { 115, -1, sizeof(::flyteidl::admin::SlackNotification)},
- { 121, -1, sizeof(::flyteidl::admin::Notification)},
- { 131, -1, sizeof(::flyteidl::admin::UrlBlob)},
- { 138, 145, sizeof(::flyteidl::admin::Labels_ValuesEntry_DoNotUse)},
- { 147, -1, sizeof(::flyteidl::admin::Labels)},
- { 153, 160, sizeof(::flyteidl::admin::Annotations_ValuesEntry_DoNotUse)},
- { 162, -1, sizeof(::flyteidl::admin::Annotations)},
- { 168, -1, sizeof(::flyteidl::admin::AuthRole)},
- { 175, -1, sizeof(::flyteidl::admin::RawOutputDataConfig)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast(&::flyteidl::admin::_NamedEntityIdentifier_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityMetadata_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntity_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Sort_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityIdentifierListRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityListRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityIdentifierList_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityList_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityGetRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityUpdateRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_NamedEntityUpdateResponse_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_ObjectGetRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_ResourceListRequest_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_EmailNotification_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_PagerDutyNotification_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_SlackNotification_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Notification_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_UrlBlob_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Labels_ValuesEntry_DoNotUse_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Labels_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Annotations_ValuesEntry_DoNotUse_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_Annotations_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_AuthRole_default_instance_),
- reinterpret_cast(&::flyteidl::admin::_RawOutputDataConfig_default_instance_),
-};
-
-::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto = {
- {}, AddDescriptors_flyteidl_2fadmin_2fcommon_2eproto, "flyteidl/admin/common.proto", schemas,
- file_default_instances, TableStruct_flyteidl_2fadmin_2fcommon_2eproto::offsets,
- file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto, 24, file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fcommon_2eproto,
-};
-
-const char descriptor_table_protodef_flyteidl_2fadmin_2fcommon_2eproto[] =
- "\n\033flyteidl/admin/common.proto\022\016flyteidl."
- "admin\032\035flyteidl/core/execution.proto\032\036fl"
- "yteidl/core/identifier.proto\032\037google/pro"
- "tobuf/timestamp.proto\"F\n\025NamedEntityIden"
- "tifier\022\017\n\007project\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022"
- "\014\n\004name\030\003 \001(\t\"[\n\023NamedEntityMetadata\022\023\n\013"
- "description\030\001 \001(\t\022/\n\005state\030\002 \001(\0162 .flyte"
- "idl.admin.NamedEntityState\"\253\001\n\013NamedEnti"
- "ty\0222\n\rresource_type\030\001 \001(\0162\033.flyteidl.cor"
- "e.ResourceType\0221\n\002id\030\002 \001(\0132%.flyteidl.ad"
- "min.NamedEntityIdentifier\0225\n\010metadata\030\003 "
- "\001(\0132#.flyteidl.admin.NamedEntityMetadata"
- "\"r\n\004Sort\022\013\n\003key\030\001 \001(\t\0221\n\tdirection\030\002 \001(\016"
- "2\036.flyteidl.admin.Sort.Direction\"*\n\tDire"
- "ction\022\016\n\nDESCENDING\020\000\022\r\n\tASCENDING\020\001\"\231\001\n"
- " NamedEntityIdentifierListRequest\022\017\n\007pro"
- "ject\030\001 \001(\t\022\016\n\006domain\030\002 \001(\t\022\r\n\005limit\030\003 \001("
- "\r\022\r\n\005token\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.flyt"
- "eidl.admin.Sort\022\017\n\007filters\030\006 \001(\t\"\303\001\n\026Nam"
- "edEntityListRequest\0222\n\rresource_type\030\001 \001"
- "(\0162\033.flyteidl.core.ResourceType\022\017\n\007proje"
- "ct\030\002 \001(\t\022\016\n\006domain\030\003 \001(\t\022\r\n\005limit\030\004 \001(\r\022"
- "\r\n\005token\030\005 \001(\t\022%\n\007sort_by\030\006 \001(\0132\024.flytei"
- "dl.admin.Sort\022\017\n\007filters\030\007 \001(\t\"c\n\031NamedE"
- "ntityIdentifierList\0227\n\010entities\030\001 \003(\0132%."
- "flyteidl.admin.NamedEntityIdentifier\022\r\n\005"
- "token\030\002 \001(\t\"O\n\017NamedEntityList\022-\n\010entiti"
- "es\030\001 \003(\0132\033.flyteidl.admin.NamedEntity\022\r\n"
- "\005token\030\002 \001(\t\"~\n\025NamedEntityGetRequest\0222\n"
- "\rresource_type\030\001 \001(\0162\033.flyteidl.core.Res"
- "ourceType\0221\n\002id\030\002 \001(\0132%.flyteidl.admin.N"
- "amedEntityIdentifier\"\270\001\n\030NamedEntityUpda"
- "teRequest\0222\n\rresource_type\030\001 \001(\0162\033.flyte"
- "idl.core.ResourceType\0221\n\002id\030\002 \001(\0132%.flyt"
- "eidl.admin.NamedEntityIdentifier\0225\n\010meta"
- "data\030\003 \001(\0132#.flyteidl.admin.NamedEntityM"
- "etadata\"\033\n\031NamedEntityUpdateResponse\"9\n\020"
- "ObjectGetRequest\022%\n\002id\030\001 \001(\0132\031.flyteidl."
- "core.Identifier\"\236\001\n\023ResourceListRequest\022"
- "1\n\002id\030\001 \001(\0132%.flyteidl.admin.NamedEntity"
- "Identifier\022\r\n\005limit\030\002 \001(\r\022\r\n\005token\030\003 \001(\t"
- "\022\017\n\007filters\030\004 \001(\t\022%\n\007sort_by\030\005 \001(\0132\024.fly"
- "teidl.admin.Sort\"-\n\021EmailNotification\022\030\n"
- "\020recipients_email\030\001 \003(\t\"1\n\025PagerDutyNoti"
- "fication\022\030\n\020recipients_email\030\001 \003(\t\"-\n\021Sl"
- "ackNotification\022\030\n\020recipients_email\030\001 \003("
- "\t\"\363\001\n\014Notification\0226\n\006phases\030\001 \003(\0162&.fly"
- "teidl.core.WorkflowExecution.Phase\0222\n\005em"
- "ail\030\002 \001(\0132!.flyteidl.admin.EmailNotifica"
- "tionH\000\022;\n\npager_duty\030\003 \001(\0132%.flyteidl.ad"
- "min.PagerDutyNotificationH\000\0222\n\005slack\030\004 \001"
- "(\0132!.flyteidl.admin.SlackNotificationH\000B"
- "\006\n\004type\")\n\007UrlBlob\022\013\n\003url\030\001 \001(\t\022\r\n\005bytes"
- "\030\002 \001(\003:\002\030\001\"k\n\006Labels\0222\n\006values\030\001 \003(\0132\".f"
- "lyteidl.admin.Labels.ValuesEntry\032-\n\013Valu"
- "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\""
- "u\n\013Annotations\0227\n\006values\030\001 \003(\0132\'.flyteid"
- "l.admin.Annotations.ValuesEntry\032-\n\013Value"
- "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"N"
- "\n\010AuthRole\022\032\n\022assumable_iam_role\030\001 \001(\t\022\""
- "\n\032kubernetes_service_account\030\002 \001(\t:\002\030\001\"5"
- "\n\023RawOutputDataConfig\022\036\n\026output_location"
- "_prefix\030\001 \001(\t*\\\n\020NamedEntityState\022\027\n\023NAM"
- "ED_ENTITY_ACTIVE\020\000\022\031\n\025NAMED_ENTITY_ARCHI"
- "VED\020\001\022\024\n\020SYSTEM_GENERATED\020\002B7Z5github.co"
- "m/flyteorg/flyteidl/gen/pb-go/flyteidl/a"
- "dminb\006proto3"
- ;
-::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fcommon_2eproto = {
- false, InitDefaults_flyteidl_2fadmin_2fcommon_2eproto,
- descriptor_table_protodef_flyteidl_2fadmin_2fcommon_2eproto,
- "flyteidl/admin/common.proto", &assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto, 2652,
-};
-
-void AddDescriptors_flyteidl_2fadmin_2fcommon_2eproto() {
- static constexpr ::google::protobuf::internal::InitFunc deps[3] =
- {
- ::AddDescriptors_flyteidl_2fcore_2fexecution_2eproto,
- ::AddDescriptors_flyteidl_2fcore_2fidentifier_2eproto,
- ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto,
- };
- ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fadmin_2fcommon_2eproto, deps, 3);
-}
-
-// Force running AddDescriptors() at dynamic initialization time.
-static bool dynamic_init_dummy_flyteidl_2fadmin_2fcommon_2eproto = []() { AddDescriptors_flyteidl_2fadmin_2fcommon_2eproto(); return true; }();
-namespace flyteidl {
-namespace admin {
-const ::google::protobuf::EnumDescriptor* Sort_Direction_descriptor() {
- ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto[0];
-}
-bool Sort_Direction_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- return true;
- default:
- return false;
- }
-}
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const Sort_Direction Sort::DESCENDING;
-const Sort_Direction Sort::ASCENDING;
-const Sort_Direction Sort::Direction_MIN;
-const Sort_Direction Sort::Direction_MAX;
-const int Sort::Direction_ARRAYSIZE;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-const ::google::protobuf::EnumDescriptor* NamedEntityState_descriptor() {
- ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return file_level_enum_descriptors_flyteidl_2fadmin_2fcommon_2eproto[1];
-}
-bool NamedEntityState_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- return true;
- default:
- return false;
- }
-}
-
-
-// ===================================================================
-
-void NamedEntityIdentifier::InitAsDefaultInstance() {
-}
-class NamedEntityIdentifier::HasBitSetters {
- public:
-};
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int NamedEntityIdentifier::kProjectFieldNumber;
-const int NamedEntityIdentifier::kDomainFieldNumber;
-const int NamedEntityIdentifier::kNameFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-NamedEntityIdentifier::NamedEntityIdentifier()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.NamedEntityIdentifier)
-}
-NamedEntityIdentifier::NamedEntityIdentifier(const NamedEntityIdentifier& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.project().size() > 0) {
- project_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_);
- }
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.domain().size() > 0) {
- domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
- }
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.name().size() > 0) {
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.NamedEntityIdentifier)
-}
-
-void NamedEntityIdentifier::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-NamedEntityIdentifier::~NamedEntityIdentifier() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.NamedEntityIdentifier)
- SharedDtor();
-}
-
-void NamedEntityIdentifier::SharedDtor() {
- project_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void NamedEntityIdentifier::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const NamedEntityIdentifier& NamedEntityIdentifier::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_NamedEntityIdentifier_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void NamedEntityIdentifier::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.NamedEntityIdentifier)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- project_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* NamedEntityIdentifier::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // string project = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifier.project");
- object = msg->mutable_project();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // string domain = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifier.domain");
- object = msg->mutable_domain();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // string name = 3;
- case 3: {
- if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifier.name");
- object = msg->mutable_name();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NamedEntityIdentifier::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.NamedEntityIdentifier)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string project = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_project()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifier.project"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string domain = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_domain()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifier.domain"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string name = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifier.name"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.NamedEntityIdentifier)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.NamedEntityIdentifier)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NamedEntityIdentifier::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.NamedEntityIdentifier)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.project");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->project(), output);
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.domain");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->domain(), output);
- }
-
- // string name = 3;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.name");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->name(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.NamedEntityIdentifier)
-}
-
-::google::protobuf::uint8* NamedEntityIdentifier::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.NamedEntityIdentifier)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.project");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->project(), target);
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.domain");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->domain(), target);
- }
-
- // string name = 3;
- if (this->name().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast(this->name().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifier.name");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->name(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.NamedEntityIdentifier)
- return target;
-}
-
-size_t NamedEntityIdentifier::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.NamedEntityIdentifier)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->project());
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->domain());
- }
-
- // string name = 3;
- if (this->name().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->name());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void NamedEntityIdentifier::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.NamedEntityIdentifier)
- GOOGLE_DCHECK_NE(&from, this);
- const NamedEntityIdentifier* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.NamedEntityIdentifier)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.NamedEntityIdentifier)
- MergeFrom(*source);
- }
-}
-
-void NamedEntityIdentifier::MergeFrom(const NamedEntityIdentifier& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.NamedEntityIdentifier)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.project().size() > 0) {
-
- project_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_);
- }
- if (from.domain().size() > 0) {
-
- domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
- }
- if (from.name().size() > 0) {
-
- name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
-}
-
-void NamedEntityIdentifier::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.NamedEntityIdentifier)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void NamedEntityIdentifier::CopyFrom(const NamedEntityIdentifier& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.NamedEntityIdentifier)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool NamedEntityIdentifier::IsInitialized() const {
- return true;
-}
-
-void NamedEntityIdentifier::Swap(NamedEntityIdentifier* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void NamedEntityIdentifier::InternalSwap(NamedEntityIdentifier* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- project_.Swap(&other->project_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- domain_.Swap(&other->domain_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
-
-::google::protobuf::Metadata NamedEntityIdentifier::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void NamedEntityMetadata::InitAsDefaultInstance() {
-}
-class NamedEntityMetadata::HasBitSetters {
- public:
-};
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int NamedEntityMetadata::kDescriptionFieldNumber;
-const int NamedEntityMetadata::kStateFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-NamedEntityMetadata::NamedEntityMetadata()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.NamedEntityMetadata)
-}
-NamedEntityMetadata::NamedEntityMetadata(const NamedEntityMetadata& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.description().size() > 0) {
- description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_);
- }
- state_ = from.state_;
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.NamedEntityMetadata)
-}
-
-void NamedEntityMetadata::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto.base);
- description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- state_ = 0;
-}
-
-NamedEntityMetadata::~NamedEntityMetadata() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.NamedEntityMetadata)
- SharedDtor();
-}
-
-void NamedEntityMetadata::SharedDtor() {
- description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void NamedEntityMetadata::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const NamedEntityMetadata& NamedEntityMetadata::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_NamedEntityMetadata_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void NamedEntityMetadata::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.NamedEntityMetadata)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- state_ = 0;
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* NamedEntityMetadata::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // string description = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityMetadata.description");
- object = msg->mutable_description();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // .flyteidl.admin.NamedEntityState state = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
- ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
- msg->set_state(static_cast<::flyteidl::admin::NamedEntityState>(val));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NamedEntityMetadata::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.NamedEntityMetadata)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string description = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_description()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->description().data(), static_cast(this->description().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityMetadata.description"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.NamedEntityState state = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
- int value = 0;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_state(static_cast< ::flyteidl::admin::NamedEntityState >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.NamedEntityMetadata)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.NamedEntityMetadata)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NamedEntityMetadata::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.NamedEntityMetadata)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string description = 1;
- if (this->description().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->description().data(), static_cast(this->description().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityMetadata.description");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->description(), output);
- }
-
- // .flyteidl.admin.NamedEntityState state = 2;
- if (this->state() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 2, this->state(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.NamedEntityMetadata)
-}
-
-::google::protobuf::uint8* NamedEntityMetadata::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.NamedEntityMetadata)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string description = 1;
- if (this->description().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->description().data(), static_cast(this->description().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityMetadata.description");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->description(), target);
- }
-
- // .flyteidl.admin.NamedEntityState state = 2;
- if (this->state() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 2, this->state(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.NamedEntityMetadata)
- return target;
-}
-
-size_t NamedEntityMetadata::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.NamedEntityMetadata)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // string description = 1;
- if (this->description().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->description());
- }
-
- // .flyteidl.admin.NamedEntityState state = 2;
- if (this->state() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void NamedEntityMetadata::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.NamedEntityMetadata)
- GOOGLE_DCHECK_NE(&from, this);
- const NamedEntityMetadata* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.NamedEntityMetadata)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.NamedEntityMetadata)
- MergeFrom(*source);
- }
-}
-
-void NamedEntityMetadata::MergeFrom(const NamedEntityMetadata& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.NamedEntityMetadata)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.description().size() > 0) {
-
- description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_);
- }
- if (from.state() != 0) {
- set_state(from.state());
- }
-}
-
-void NamedEntityMetadata::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.NamedEntityMetadata)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void NamedEntityMetadata::CopyFrom(const NamedEntityMetadata& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.NamedEntityMetadata)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool NamedEntityMetadata::IsInitialized() const {
- return true;
-}
-
-void NamedEntityMetadata::Swap(NamedEntityMetadata* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void NamedEntityMetadata::InternalSwap(NamedEntityMetadata* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(state_, other->state_);
-}
-
-::google::protobuf::Metadata NamedEntityMetadata::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void NamedEntity::InitAsDefaultInstance() {
- ::flyteidl::admin::_NamedEntity_default_instance_._instance.get_mutable()->id_ = const_cast< ::flyteidl::admin::NamedEntityIdentifier*>(
- ::flyteidl::admin::NamedEntityIdentifier::internal_default_instance());
- ::flyteidl::admin::_NamedEntity_default_instance_._instance.get_mutable()->metadata_ = const_cast< ::flyteidl::admin::NamedEntityMetadata*>(
- ::flyteidl::admin::NamedEntityMetadata::internal_default_instance());
-}
-class NamedEntity::HasBitSetters {
- public:
- static const ::flyteidl::admin::NamedEntityIdentifier& id(const NamedEntity* msg);
- static const ::flyteidl::admin::NamedEntityMetadata& metadata(const NamedEntity* msg);
-};
-
-const ::flyteidl::admin::NamedEntityIdentifier&
-NamedEntity::HasBitSetters::id(const NamedEntity* msg) {
- return *msg->id_;
-}
-const ::flyteidl::admin::NamedEntityMetadata&
-NamedEntity::HasBitSetters::metadata(const NamedEntity* msg) {
- return *msg->metadata_;
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int NamedEntity::kResourceTypeFieldNumber;
-const int NamedEntity::kIdFieldNumber;
-const int NamedEntity::kMetadataFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-NamedEntity::NamedEntity()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.NamedEntity)
-}
-NamedEntity::NamedEntity(const NamedEntity& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- if (from.has_id()) {
- id_ = new ::flyteidl::admin::NamedEntityIdentifier(*from.id_);
- } else {
- id_ = nullptr;
- }
- if (from.has_metadata()) {
- metadata_ = new ::flyteidl::admin::NamedEntityMetadata(*from.metadata_);
- } else {
- metadata_ = nullptr;
- }
- resource_type_ = from.resource_type_;
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.NamedEntity)
-}
-
-void NamedEntity::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto.base);
- ::memset(&id_, 0, static_cast(
- reinterpret_cast(&resource_type_) -
- reinterpret_cast(&id_)) + sizeof(resource_type_));
-}
-
-NamedEntity::~NamedEntity() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.NamedEntity)
- SharedDtor();
-}
-
-void NamedEntity::SharedDtor() {
- if (this != internal_default_instance()) delete id_;
- if (this != internal_default_instance()) delete metadata_;
-}
-
-void NamedEntity::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const NamedEntity& NamedEntity::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_NamedEntity_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void NamedEntity::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.NamedEntity)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- if (GetArenaNoVirtual() == nullptr && id_ != nullptr) {
- delete id_;
- }
- id_ = nullptr;
- if (GetArenaNoVirtual() == nullptr && metadata_ != nullptr) {
- delete metadata_;
- }
- metadata_ = nullptr;
- resource_type_ = 0;
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* NamedEntity::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // .flyteidl.core.ResourceType resource_type = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
- ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
- msg->set_resource_type(static_cast<::flyteidl::core::ResourceType>(val));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- // .flyteidl.admin.NamedEntityIdentifier id = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- parser_till_end = ::flyteidl::admin::NamedEntityIdentifier::_InternalParse;
- object = msg->mutable_id();
- if (size > end - ptr) goto len_delim_till_end;
- ptr += size;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
- {parser_till_end, object}, ptr - size, ptr));
- break;
- }
- // .flyteidl.admin.NamedEntityMetadata metadata = 3;
- case 3: {
- if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- parser_till_end = ::flyteidl::admin::NamedEntityMetadata::_InternalParse;
- object = msg->mutable_metadata();
- if (size > end - ptr) goto len_delim_till_end;
- ptr += size;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
- {parser_till_end, object}, ptr - size, ptr));
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NamedEntity::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.NamedEntity)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .flyteidl.core.ResourceType resource_type = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
- int value = 0;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_resource_type(static_cast< ::flyteidl::core::ResourceType >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.NamedEntityIdentifier id = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_id()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.NamedEntityMetadata metadata = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_metadata()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.NamedEntity)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.NamedEntity)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NamedEntity::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.NamedEntity)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .flyteidl.core.ResourceType resource_type = 1;
- if (this->resource_type() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 1, this->resource_type(), output);
- }
-
- // .flyteidl.admin.NamedEntityIdentifier id = 2;
- if (this->has_id()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, HasBitSetters::id(this), output);
- }
-
- // .flyteidl.admin.NamedEntityMetadata metadata = 3;
- if (this->has_metadata()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, HasBitSetters::metadata(this), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.NamedEntity)
-}
-
-::google::protobuf::uint8* NamedEntity::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.NamedEntity)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .flyteidl.core.ResourceType resource_type = 1;
- if (this->resource_type() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 1, this->resource_type(), target);
- }
-
- // .flyteidl.admin.NamedEntityIdentifier id = 2;
- if (this->has_id()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, HasBitSetters::id(this), target);
- }
-
- // .flyteidl.admin.NamedEntityMetadata metadata = 3;
- if (this->has_metadata()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, HasBitSetters::metadata(this), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.NamedEntity)
- return target;
-}
-
-size_t NamedEntity::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.NamedEntity)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // .flyteidl.admin.NamedEntityIdentifier id = 2;
- if (this->has_id()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *id_);
- }
-
- // .flyteidl.admin.NamedEntityMetadata metadata = 3;
- if (this->has_metadata()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *metadata_);
- }
-
- // .flyteidl.core.ResourceType resource_type = 1;
- if (this->resource_type() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->resource_type());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void NamedEntity::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.NamedEntity)
- GOOGLE_DCHECK_NE(&from, this);
- const NamedEntity* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.NamedEntity)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.NamedEntity)
- MergeFrom(*source);
- }
-}
-
-void NamedEntity::MergeFrom(const NamedEntity& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.NamedEntity)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.has_id()) {
- mutable_id()->::flyteidl::admin::NamedEntityIdentifier::MergeFrom(from.id());
- }
- if (from.has_metadata()) {
- mutable_metadata()->::flyteidl::admin::NamedEntityMetadata::MergeFrom(from.metadata());
- }
- if (from.resource_type() != 0) {
- set_resource_type(from.resource_type());
- }
-}
-
-void NamedEntity::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.NamedEntity)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void NamedEntity::CopyFrom(const NamedEntity& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.NamedEntity)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool NamedEntity::IsInitialized() const {
- return true;
-}
-
-void NamedEntity::Swap(NamedEntity* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void NamedEntity::InternalSwap(NamedEntity* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(id_, other->id_);
- swap(metadata_, other->metadata_);
- swap(resource_type_, other->resource_type_);
-}
-
-::google::protobuf::Metadata NamedEntity::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void Sort::InitAsDefaultInstance() {
-}
-class Sort::HasBitSetters {
- public:
-};
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Sort::kKeyFieldNumber;
-const int Sort::kDirectionFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Sort::Sort()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.Sort)
-}
-Sort::Sort(const Sort& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.key().size() > 0) {
- key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
- }
- direction_ = from.direction_;
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.Sort)
-}
-
-void Sort::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base);
- key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- direction_ = 0;
-}
-
-Sort::~Sort() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.Sort)
- SharedDtor();
-}
-
-void Sort::SharedDtor() {
- key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void Sort::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const Sort& Sort::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_Sort_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void Sort::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.Sort)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- direction_ = 0;
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* Sort::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // string key = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.Sort.key");
- object = msg->mutable_key();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // .flyteidl.admin.Sort.Direction direction = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
- ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
- msg->set_direction(static_cast<::flyteidl::admin::Sort_Direction>(val));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool Sort::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.Sort)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string key = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_key()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->key().data(), static_cast(this->key().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.Sort.key"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.Sort.Direction direction = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
- int value = 0;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_direction(static_cast< ::flyteidl::admin::Sort_Direction >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.Sort)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.Sort)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void Sort::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.Sort)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string key = 1;
- if (this->key().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->key().data(), static_cast(this->key().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.Sort.key");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->key(), output);
- }
-
- // .flyteidl.admin.Sort.Direction direction = 2;
- if (this->direction() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 2, this->direction(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.Sort)
-}
-
-::google::protobuf::uint8* Sort::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.Sort)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string key = 1;
- if (this->key().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->key().data(), static_cast(this->key().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.Sort.key");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->key(), target);
- }
-
- // .flyteidl.admin.Sort.Direction direction = 2;
- if (this->direction() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 2, this->direction(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.Sort)
- return target;
-}
-
-size_t Sort::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.Sort)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // string key = 1;
- if (this->key().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->key());
- }
-
- // .flyteidl.admin.Sort.Direction direction = 2;
- if (this->direction() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->direction());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void Sort::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.Sort)
- GOOGLE_DCHECK_NE(&from, this);
- const Sort* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.Sort)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.Sort)
- MergeFrom(*source);
- }
-}
-
-void Sort::MergeFrom(const Sort& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.Sort)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.key().size() > 0) {
-
- key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
- }
- if (from.direction() != 0) {
- set_direction(from.direction());
- }
-}
-
-void Sort::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.Sort)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Sort::CopyFrom(const Sort& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.Sort)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Sort::IsInitialized() const {
- return true;
-}
-
-void Sort::Swap(Sort* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void Sort::InternalSwap(Sort* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(direction_, other->direction_);
-}
-
-::google::protobuf::Metadata Sort::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void NamedEntityIdentifierListRequest::InitAsDefaultInstance() {
- ::flyteidl::admin::_NamedEntityIdentifierListRequest_default_instance_._instance.get_mutable()->sort_by_ = const_cast< ::flyteidl::admin::Sort*>(
- ::flyteidl::admin::Sort::internal_default_instance());
-}
-class NamedEntityIdentifierListRequest::HasBitSetters {
- public:
- static const ::flyteidl::admin::Sort& sort_by(const NamedEntityIdentifierListRequest* msg);
-};
-
-const ::flyteidl::admin::Sort&
-NamedEntityIdentifierListRequest::HasBitSetters::sort_by(const NamedEntityIdentifierListRequest* msg) {
- return *msg->sort_by_;
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int NamedEntityIdentifierListRequest::kProjectFieldNumber;
-const int NamedEntityIdentifierListRequest::kDomainFieldNumber;
-const int NamedEntityIdentifierListRequest::kLimitFieldNumber;
-const int NamedEntityIdentifierListRequest::kTokenFieldNumber;
-const int NamedEntityIdentifierListRequest::kSortByFieldNumber;
-const int NamedEntityIdentifierListRequest::kFiltersFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-NamedEntityIdentifierListRequest::NamedEntityIdentifierListRequest()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.NamedEntityIdentifierListRequest)
-}
-NamedEntityIdentifierListRequest::NamedEntityIdentifierListRequest(const NamedEntityIdentifierListRequest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.project().size() > 0) {
- project_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_);
- }
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.domain().size() > 0) {
- domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
- }
- token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.token().size() > 0) {
- token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.token_);
- }
- filters_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.filters().size() > 0) {
- filters_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.filters_);
- }
- if (from.has_sort_by()) {
- sort_by_ = new ::flyteidl::admin::Sort(*from.sort_by_);
- } else {
- sort_by_ = nullptr;
- }
- limit_ = from.limit_;
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.NamedEntityIdentifierListRequest)
-}
-
-void NamedEntityIdentifierListRequest::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_NamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&sort_by_, 0, static_cast(
- reinterpret_cast(&limit_) -
- reinterpret_cast(&sort_by_)) + sizeof(limit_));
-}
-
-NamedEntityIdentifierListRequest::~NamedEntityIdentifierListRequest() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.NamedEntityIdentifierListRequest)
- SharedDtor();
-}
-
-void NamedEntityIdentifierListRequest::SharedDtor() {
- project_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete sort_by_;
-}
-
-void NamedEntityIdentifierListRequest::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const NamedEntityIdentifierListRequest& NamedEntityIdentifierListRequest::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_NamedEntityIdentifierListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void NamedEntityIdentifierListRequest::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- project_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == nullptr && sort_by_ != nullptr) {
- delete sort_by_;
- }
- sort_by_ = nullptr;
- limit_ = 0u;
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* NamedEntityIdentifierListRequest::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // string project = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifierListRequest.project");
- object = msg->mutable_project();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // string domain = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifierListRequest.domain");
- object = msg->mutable_domain();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // uint32 limit = 3;
- case 3: {
- if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
- msg->set_limit(::google::protobuf::internal::ReadVarint(&ptr));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- // string token = 4;
- case 4: {
- if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifierListRequest.token");
- object = msg->mutable_token();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // .flyteidl.admin.Sort sort_by = 5;
- case 5: {
- if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- parser_till_end = ::flyteidl::admin::Sort::_InternalParse;
- object = msg->mutable_sort_by();
- if (size > end - ptr) goto len_delim_till_end;
- ptr += size;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
- {parser_till_end, object}, ptr - size, ptr));
- break;
- }
- // string filters = 6;
- case 6: {
- if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityIdentifierListRequest.filters");
- object = msg->mutable_filters();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NamedEntityIdentifierListRequest::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string project = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_project()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.project"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string domain = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_domain()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.domain"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // uint32 limit = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &limit_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string token = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_token()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.token"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.Sort sort_by = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_sort_by()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string filters = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_filters()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast(this->filters().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.filters"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.NamedEntityIdentifierListRequest)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.NamedEntityIdentifierListRequest)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NamedEntityIdentifierListRequest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.project");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->project(), output);
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.domain");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->domain(), output);
- }
-
- // uint32 limit = 3;
- if (this->limit() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->limit(), output);
- }
-
- // string token = 4;
- if (this->token().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.token");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 4, this->token(), output);
- }
-
- // .flyteidl.admin.Sort sort_by = 5;
- if (this->has_sort_by()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, HasBitSetters::sort_by(this), output);
- }
-
- // string filters = 6;
- if (this->filters().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast(this->filters().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.filters");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 6, this->filters(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.NamedEntityIdentifierListRequest)
-}
-
-::google::protobuf::uint8* NamedEntityIdentifierListRequest::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.project");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->project(), target);
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.domain");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->domain(), target);
- }
-
- // uint32 limit = 3;
- if (this->limit() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->limit(), target);
- }
-
- // string token = 4;
- if (this->token().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.token");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 4, this->token(), target);
- }
-
- // .flyteidl.admin.Sort sort_by = 5;
- if (this->has_sort_by()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, HasBitSetters::sort_by(this), target);
- }
-
- // string filters = 6;
- if (this->filters().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast(this->filters().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityIdentifierListRequest.filters");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 6, this->filters(), target);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.NamedEntityIdentifierListRequest)
- return target;
-}
-
-size_t NamedEntityIdentifierListRequest::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- size_t total_size = 0;
-
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- // string project = 1;
- if (this->project().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->project());
- }
-
- // string domain = 2;
- if (this->domain().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->domain());
- }
-
- // string token = 4;
- if (this->token().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->token());
- }
-
- // string filters = 6;
- if (this->filters().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->filters());
- }
-
- // .flyteidl.admin.Sort sort_by = 5;
- if (this->has_sort_by()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *sort_by_);
- }
-
- // uint32 limit = 3;
- if (this->limit() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->limit());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
-}
-
-void NamedEntityIdentifierListRequest::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- GOOGLE_DCHECK_NE(&from, this);
- const NamedEntityIdentifierListRequest* source =
- ::google::protobuf::DynamicCastToGenerated(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.NamedEntityIdentifierListRequest)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.NamedEntityIdentifierListRequest)
- MergeFrom(*source);
- }
-}
-
-void NamedEntityIdentifierListRequest::MergeFrom(const NamedEntityIdentifierListRequest& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.project().size() > 0) {
-
- project_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_);
- }
- if (from.domain().size() > 0) {
-
- domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
- }
- if (from.token().size() > 0) {
-
- token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.token_);
- }
- if (from.filters().size() > 0) {
-
- filters_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.filters_);
- }
- if (from.has_sort_by()) {
- mutable_sort_by()->::flyteidl::admin::Sort::MergeFrom(from.sort_by());
- }
- if (from.limit() != 0) {
- set_limit(from.limit());
- }
-}
-
-void NamedEntityIdentifierListRequest::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void NamedEntityIdentifierListRequest::CopyFrom(const NamedEntityIdentifierListRequest& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.NamedEntityIdentifierListRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool NamedEntityIdentifierListRequest::IsInitialized() const {
- return true;
-}
-
-void NamedEntityIdentifierListRequest::Swap(NamedEntityIdentifierListRequest* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void NamedEntityIdentifierListRequest::InternalSwap(NamedEntityIdentifierListRequest* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- project_.Swap(&other->project_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- domain_.Swap(&other->domain_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- token_.Swap(&other->token_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- filters_.Swap(&other->filters_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(sort_by_, other->sort_by_);
- swap(limit_, other->limit_);
-}
-
-::google::protobuf::Metadata NamedEntityIdentifierListRequest::GetMetadata() const {
- ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fcommon_2eproto);
- return ::file_level_metadata_flyteidl_2fadmin_2fcommon_2eproto[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void NamedEntityListRequest::InitAsDefaultInstance() {
- ::flyteidl::admin::_NamedEntityListRequest_default_instance_._instance.get_mutable()->sort_by_ = const_cast< ::flyteidl::admin::Sort*>(
- ::flyteidl::admin::Sort::internal_default_instance());
-}
-class NamedEntityListRequest::HasBitSetters {
- public:
- static const ::flyteidl::admin::Sort& sort_by(const NamedEntityListRequest* msg);
-};
-
-const ::flyteidl::admin::Sort&
-NamedEntityListRequest::HasBitSetters::sort_by(const NamedEntityListRequest* msg) {
- return *msg->sort_by_;
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int NamedEntityListRequest::kResourceTypeFieldNumber;
-const int NamedEntityListRequest::kProjectFieldNumber;
-const int NamedEntityListRequest::kDomainFieldNumber;
-const int NamedEntityListRequest::kLimitFieldNumber;
-const int NamedEntityListRequest::kTokenFieldNumber;
-const int NamedEntityListRequest::kSortByFieldNumber;
-const int NamedEntityListRequest::kFiltersFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-NamedEntityListRequest::NamedEntityListRequest()
- : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:flyteidl.admin.NamedEntityListRequest)
-}
-NamedEntityListRequest::NamedEntityListRequest(const NamedEntityListRequest& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.project().size() > 0) {
- project_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_);
- }
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.domain().size() > 0) {
- domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
- }
- token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.token().size() > 0) {
- token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.token_);
- }
- filters_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.filters().size() > 0) {
- filters_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.filters_);
- }
- if (from.has_sort_by()) {
- sort_by_ = new ::flyteidl::admin::Sort(*from.sort_by_);
- } else {
- sort_by_ = nullptr;
- }
- ::memcpy(&resource_type_, &from.resource_type_,
- static_cast(reinterpret_cast(&limit_) -
- reinterpret_cast(&resource_type_)) + sizeof(limit_));
- // @@protoc_insertion_point(copy_constructor:flyteidl.admin.NamedEntityListRequest)
-}
-
-void NamedEntityListRequest::SharedCtor() {
- ::google::protobuf::internal::InitSCC(
- &scc_info_NamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- project_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::memset(&sort_by_, 0, static_cast(
- reinterpret_cast(&limit_) -
- reinterpret_cast(&sort_by_)) + sizeof(limit_));
-}
-
-NamedEntityListRequest::~NamedEntityListRequest() {
- // @@protoc_insertion_point(destructor:flyteidl.admin.NamedEntityListRequest)
- SharedDtor();
-}
-
-void NamedEntityListRequest::SharedDtor() {
- project_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete sort_by_;
-}
-
-void NamedEntityListRequest::SetCachedSize(int size) const {
- _cached_size_.Set(size);
-}
-const NamedEntityListRequest& NamedEntityListRequest::default_instance() {
- ::google::protobuf::internal::InitSCC(&::scc_info_NamedEntityListRequest_flyteidl_2fadmin_2fcommon_2eproto.base);
- return *internal_default_instance();
-}
-
-
-void NamedEntityListRequest::Clear() {
-// @@protoc_insertion_point(message_clear_start:flyteidl.admin.NamedEntityListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- project_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- filters_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == nullptr && sort_by_ != nullptr) {
- delete sort_by_;
- }
- sort_by_ = nullptr;
- ::memset(&resource_type_, 0, static_cast(
- reinterpret_cast(&limit_) -
- reinterpret_cast(&resource_type_)) + sizeof(limit_));
- _internal_metadata_.Clear();
-}
-
-#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-const char* NamedEntityListRequest::_InternalParse(const char* begin, const char* end, void* object,
- ::google::protobuf::internal::ParseContext* ctx) {
- auto msg = static_cast(object);
- ::google::protobuf::int32 size; (void)size;
- int depth; (void)depth;
- ::google::protobuf::uint32 tag;
- ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
- auto ptr = begin;
- while (ptr < end) {
- ptr = ::google::protobuf::io::Parse32(ptr, &tag);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- switch (tag >> 3) {
- // .flyteidl.core.ResourceType resource_type = 1;
- case 1: {
- if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
- ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
- msg->set_resource_type(static_cast<::flyteidl::core::ResourceType>(val));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- // string project = 2;
- case 2: {
- if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityListRequest.project");
- object = msg->mutable_project();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // string domain = 3;
- case 3: {
- if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityListRequest.domain");
- object = msg->mutable_domain();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // uint32 limit = 4;
- case 4: {
- if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual;
- msg->set_limit(::google::protobuf::internal::ReadVarint(&ptr));
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- break;
- }
- // string token = 5;
- case 5: {
- if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityListRequest.token");
- object = msg->mutable_token();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- // .flyteidl.admin.Sort sort_by = 6;
- case 6: {
- if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- parser_till_end = ::flyteidl::admin::Sort::_InternalParse;
- object = msg->mutable_sort_by();
- if (size > end - ptr) goto len_delim_till_end;
- ptr += size;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
- {parser_till_end, object}, ptr - size, ptr));
- break;
- }
- // string filters = 7;
- case 7: {
- if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual;
- ptr = ::google::protobuf::io::ReadSize(ptr, &size);
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
- ctx->extra_parse_data().SetFieldName("flyteidl.admin.NamedEntityListRequest.filters");
- object = msg->mutable_filters();
- if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
- parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
- goto string_till_end;
- }
- GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
- ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
- ptr += size;
- break;
- }
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->EndGroup(tag);
- return ptr;
- }
- auto res = UnknownFieldParse(tag, {_InternalParse, msg},
- ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
- ptr = res.first;
- GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
- if (res.second) return ptr;
- }
- } // switch
- } // while
- return ptr;
-string_till_end:
- static_cast<::std::string*>(object)->clear();
- static_cast<::std::string*>(object)->reserve(size);
- goto len_delim_till_end;
-len_delim_till_end:
- return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
- {parser_till_end, object}, size);
-}
-#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-bool NamedEntityListRequest::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:flyteidl.admin.NamedEntityListRequest)
- for (;;) {
- ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .flyteidl.core.ResourceType resource_type = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
- int value = 0;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_resource_type(static_cast< ::flyteidl::core::ResourceType >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string project = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_project()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityListRequest.project"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string domain = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_domain()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityListRequest.domain"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // uint32 limit = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &limit_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string token = 5;
- case 5: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_token()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityListRequest.token"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .flyteidl.admin.Sort sort_by = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_sort_by()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string filters = 7;
- case 7: {
- if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_filters()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast(this->filters().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "flyteidl.admin.NamedEntityListRequest.filters"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:flyteidl.admin.NamedEntityListRequest)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:flyteidl.admin.NamedEntityListRequest)
- return false;
-#undef DO_
-}
-#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
-
-void NamedEntityListRequest::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:flyteidl.admin.NamedEntityListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .flyteidl.core.ResourceType resource_type = 1;
- if (this->resource_type() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 1, this->resource_type(), output);
- }
-
- // string project = 2;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.project");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->project(), output);
- }
-
- // string domain = 3;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.domain");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->domain(), output);
- }
-
- // uint32 limit = 4;
- if (this->limit() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->limit(), output);
- }
-
- // string token = 5;
- if (this->token().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.token");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 5, this->token(), output);
- }
-
- // .flyteidl.admin.Sort sort_by = 6;
- if (this->has_sort_by()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, HasBitSetters::sort_by(this), output);
- }
-
- // string filters = 7;
- if (this->filters().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast(this->filters().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.filters");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 7, this->filters(), output);
- }
-
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:flyteidl.admin.NamedEntityListRequest)
-}
-
-::google::protobuf::uint8* NamedEntityListRequest::InternalSerializeWithCachedSizesToArray(
- ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.NamedEntityListRequest)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .flyteidl.core.ResourceType resource_type = 1;
- if (this->resource_type() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 1, this->resource_type(), target);
- }
-
- // string project = 2;
- if (this->project().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->project().data(), static_cast(this->project().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.project");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->project(), target);
- }
-
- // string domain = 3;
- if (this->domain().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->domain().data(), static_cast(this->domain().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.domain");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->domain(), target);
- }
-
- // uint32 limit = 4;
- if (this->limit() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->limit(), target);
- }
-
- // string token = 5;
- if (this->token().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->token().data(), static_cast(this->token().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "flyteidl.admin.NamedEntityListRequest.token");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 5, this->token(), target);
- }
-
- // .flyteidl.admin.Sort sort_by = 6;
- if (this->has_sort_by()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, HasBitSetters::sort_by(this), target);
- }
-
- // string filters = 7;
- if (this->filters().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->filters().data(), static_cast