diff --git a/Makefile b/Makefile index 8957d2a0..574a09d8 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,10 @@ default: clean test bins TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1) TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true) -COMMIT := $(shell git rev-parse --short HEAD) -DATE := $(shell git log -1 --format=%cd --date=format:"%Y%m%d") +COMMIT := $(shell git rev-parse --short=12 HEAD) +DATE := $(shell git log -1 --format=%cd --date=iso-strict) APPPKG := $(PROJECT_ROOT)/app -LINKER_FLAGS := -X $(APPPKG).BuildDate=$(DATE) -X $(APPPKG).Commit=$(COMMIT) -X $(APPPKG).Version=$(TAG) +LINKER_FLAGS := -X $(APPPKG).date=$(DATE) -X $(APPPKG).commit=$(COMMIT) -X $(APPPKG).version=$(TAG) ALL_SRC := $(shell find . -name "*.go") @@ -19,7 +19,7 @@ COVER_ROOT := ./.coverage SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary_coverprofile.out tcld: - @go build -ldflags "$(LINKER_FLAGS)" -o tcld ./cmd/tcld/*.go + @go build -ldflags "$(LINKER_FLAGS)" -o tcld ./cmd/tcld bins: clean tcld @@ -33,7 +33,7 @@ clean: define build @echo "building release for $(1) $(2) $(3)..." @mkdir -p releases - @GOOS=$(2) GOARCH=$(3) go build -ldflags "-w $(LINKER_FLAGS)" -o releases/$(1)_$(2)_$(3)$(4) ./cmd/tcld/*.go + @GOOS=$(2) GOARCH=$(3) go build -ldflags "-w $(LINKER_FLAGS)" -o releases/$(1)_$(2)_$(3)$(4) ./cmd/tcld @tar -cvzf releases/$(1)_$(2)_$(3).tar.gz releases/$(1)_$(2)_$(3)$(4) &>/dev/null endef diff --git a/README.md b/README.md index d0e862cc..83731102 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,62 @@ tcld version ``` # Authentication and Login +### User login authentication: In order to use the cli you must first login by running the following command: ``` tcld login ``` You will be sent a link to confirm your device code and login. After logging in, you are now authenticated and can make requests with this cli. +### API Key based authentication: +You can use API keys to authenticate with the cli by passing the `--api-key` flag or setting the `TEMPORAL_CLOUD_API_KEY` environment variable. +``` +tcld --api-key ... +``` + +``` +export TEMPORAL_CLOUD_API_KEY= +tcld ... +``` + +# API Key Management (Preview) +*The API Key feature is currently in "Preview Release". Customers must be invited to use this feature. Please reach out to Temporal Cloud support for more information.* + +API Keys provide machine based authentication for Temporal Control Plane APIs. These keys are generated for and inherit the roles and permissions of the current user. API Keys are required to have a duration / expiry for preview within 1 to 90 days. We recommend to always set a duration / expiry for your API keys. This will allow you to rotate your API keys frequently and minimize the exposure of a token in case it is compromised. +### Creating an API Key: +*Make sure to copy the secret or else you will not be able to retrieve it again.* + +Create an API key by running the following command (duration must be within 1 to 90 days): +``` +tcld apikey create --name --description --duration +``` +### List API Keys for the current user: +``` +tcld apikey list +``` +### Delete an API Key: +``` +tcld apikey delete --id +``` + +### Enable or Disable an API Key: +If you determine there is a need to temporarily disable API Key access but want to enable it in the future, run the following commands: +``` +tcld apikey disable --id +tcld apikey enable --id +``` + +### Performing an API Key rotation: +1. Generate the new API key to rotate to. +``` +tcld apikey create --name --description --duration +``` +2. Update temporal clients to use the new API key and monitor deployments to make sure all old API key usage is gone. +3. Delete the old API key. +``` +tcld apikey delete --id +``` + # Namespace Management ### List namespaces user has access to: @@ -62,7 +112,7 @@ It is important to do a rollover process when updating your CA certificates. Thi tcld namespace accepted-client-ca add -n --ca-certificate-file ``` -3. Update temporal clients to use the new certificates and monitor deployements to make sure all old certificate usage is phased out. +3. Update temporal clients to use the new certificates and monitor deployments to make sure all old certificate usage is phased out. 4. Run the `accepted-client-ca remove` command to remove the old certificates. ``` tcld namespace accepted-client-ca remove -n --ca-certificate-file @@ -85,6 +135,49 @@ tcld namespace search-attributes rename -n --existing-name :warning: Any workflows that are using the old search attribute name will fail after the update. +# User Management +### List users: +``` +tcld user list +``` + +### Get user information: +``` +tcld user get -e +``` + +### Invite users to your account: +To invite users to your account, you must specify the email and account role. Namespace permissions are optional. You can invite multiple emails at once. An invitation email will be sent to the emails specified. Users should accept the invitation from the email to confirm being added to the account. +``` +tcld user invite -e --ar -p -p +``` + +### Reinvite users to your account: +If a user has been invited to your account but has not accepted the invite, you can reinvite them using the following command. This command will send a new invite email to the user. The previous email invitation link will become invalid. +``` +tcld user resend-invite -e +``` + +### Delete user from your account: +To delete a user from your account, run the following command. The user will be removed from your account and have all permissions revoked. +``` +tcld user delete -e +``` + +### Update user permissions: +Run the following command to update a user's account role. A user is only assigned one account role at a time. The admin role gives the user access to all namespaces. +``` +tcld user set-account-role -e --ar +``` +Run the following command to update a user's namespace permissions. This is a set operation, which requires assigning the full set of permissions each time. To get the current set of namespace permissions run the `tcld user get` command. Permissions not specified will be effectively removed. Do not run this command if the user is already an account admin, since they already have access to all namespaces. +``` +# get list of current namespace permissions +tcld user get -e | jq -r '.spec.namespacePermissions' + +# set new user namespace permissions, make sure to include any permissions from the previous command +tcld user set-namespace-permissions -e -p -p +``` + # Asynchronous Operations Any update operations making changes to the namespaces hosted on Temporal Cloud are asynchronous. Such operations are tracked using a `request-id` that can be passed in when invoking the update operation or will be auto-generated by the server if one is not specified. Once an asynchronous request is initiated, a `request-id` is returned. Use the `request get` command to query the status of an asynchronous request. ``` diff --git a/api/temporalcloudapi/accountservicemock/v1/service.pb.mock.go b/api/temporalcloudapi/accountservicemock/v1/service.pb.mock.go deleted file mode 100644 index 52998363..00000000 --- a/api/temporalcloudapi/accountservicemock/v1/service.pb.mock.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: api/accountservice/v1/service.pb.go - -// Package apimock is a generated GoMock package. -package accountservicemock - -import ( - context "context" - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - accountservice "github.com/temporalio/tcld/protogen/api/accountservice/v1" - grpc "google.golang.org/grpc" -) - -// MockAccountServiceClient is a mock of AccountServiceClient interface. -type MockAccountServiceClient struct { - ctrl *gomock.Controller - recorder *MockAccountServiceClientMockRecorder -} - -// MockAccountServiceClientMockRecorder is the mock recorder for MockAccountServiceClient. -type MockAccountServiceClientMockRecorder struct { - mock *MockAccountServiceClient -} - -// NewMockAccountServiceClient creates a new mock instance. -func NewMockAccountServiceClient(ctrl *gomock.Controller) *MockAccountServiceClient { - mock := &MockAccountServiceClient{ctrl: ctrl} - mock.recorder = &MockAccountServiceClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAccountServiceClient) EXPECT() *MockAccountServiceClientMockRecorder { - return m.recorder -} - -// GetAccount mocks base method. -func (m *MockAccountServiceClient) GetAccount(ctx context.Context, in *accountservice.GetAccountRequest, opts ...grpc.CallOption) (*accountservice.GetAccountResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetAccount", varargs...) - ret0, _ := ret[0].(*accountservice.GetAccountResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountServiceClientMockRecorder) GetAccount(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountServiceClient)(nil).GetAccount), varargs...) -} - -// GetAccountUsage mocks base method. -func (m *MockAccountServiceClient) GetAccountUsage(ctx context.Context, in *accountservice.GetAccountUsageRequest, opts ...grpc.CallOption) (*accountservice.GetAccountUsageResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetAccountUsage", varargs...) - ret0, _ := ret[0].(*accountservice.GetAccountUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAccountUsage indicates an expected call of GetAccountUsage. -func (mr *MockAccountServiceClientMockRecorder) GetAccountUsage(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountUsage", reflect.TypeOf((*MockAccountServiceClient)(nil).GetAccountUsage), varargs...) -} - -// GetNamespaceUsage mocks base method. -func (m *MockAccountServiceClient) GetNamespaceUsage(ctx context.Context, in *accountservice.GetNamespaceUsageRequest, opts ...grpc.CallOption) (*accountservice.GetNamespaceUsageResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetNamespaceUsage", varargs...) - ret0, _ := ret[0].(*accountservice.GetNamespaceUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNamespaceUsage indicates an expected call of GetNamespaceUsage. -func (mr *MockAccountServiceClientMockRecorder) GetNamespaceUsage(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespaceUsage", reflect.TypeOf((*MockAccountServiceClient)(nil).GetNamespaceUsage), varargs...) -} - -// GetNamespacesUsage mocks base method. -func (m *MockAccountServiceClient) GetNamespacesUsage(ctx context.Context, in *accountservice.GetNamespacesUsageRequest, opts ...grpc.CallOption) (*accountservice.GetNamespacesUsageResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetNamespacesUsage", varargs...) - ret0, _ := ret[0].(*accountservice.GetNamespacesUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNamespacesUsage indicates an expected call of GetNamespacesUsage. -func (mr *MockAccountServiceClientMockRecorder) GetNamespacesUsage(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespacesUsage", reflect.TypeOf((*MockAccountServiceClient)(nil).GetNamespacesUsage), varargs...) -} - -// UpdateAccount mocks base method. -func (m *MockAccountServiceClient) UpdateAccount(ctx context.Context, in *accountservice.UpdateAccountRequest, opts ...grpc.CallOption) (*accountservice.UpdateAccountResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "UpdateAccount", varargs...) - ret0, _ := ret[0].(*accountservice.UpdateAccountResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// UpdateAccount indicates an expected call of UpdateAccount. -func (mr *MockAccountServiceClientMockRecorder) UpdateAccount(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockAccountServiceClient)(nil).UpdateAccount), varargs...) -} - -// MockAccountServiceServer is a mock of AccountServiceServer interface. -type MockAccountServiceServer struct { - ctrl *gomock.Controller - recorder *MockAccountServiceServerMockRecorder -} - -// MockAccountServiceServerMockRecorder is the mock recorder for MockAccountServiceServer. -type MockAccountServiceServerMockRecorder struct { - mock *MockAccountServiceServer -} - -// NewMockAccountServiceServer creates a new mock instance. -func NewMockAccountServiceServer(ctrl *gomock.Controller) *MockAccountServiceServer { - mock := &MockAccountServiceServer{ctrl: ctrl} - mock.recorder = &MockAccountServiceServerMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAccountServiceServer) EXPECT() *MockAccountServiceServerMockRecorder { - return m.recorder -} - -// GetAccount mocks base method. -func (m *MockAccountServiceServer) GetAccount(arg0 context.Context, arg1 *accountservice.GetAccountRequest) (*accountservice.GetAccountResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount", arg0, arg1) - ret0, _ := ret[0].(*accountservice.GetAccountResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountServiceServerMockRecorder) GetAccount(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountServiceServer)(nil).GetAccount), arg0, arg1) -} - -// GetAccountUsage mocks base method. -func (m *MockAccountServiceServer) GetAccountUsage(arg0 context.Context, arg1 *accountservice.GetAccountUsageRequest) (*accountservice.GetAccountUsageResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountUsage", arg0, arg1) - ret0, _ := ret[0].(*accountservice.GetAccountUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAccountUsage indicates an expected call of GetAccountUsage. -func (mr *MockAccountServiceServerMockRecorder) GetAccountUsage(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountUsage", reflect.TypeOf((*MockAccountServiceServer)(nil).GetAccountUsage), arg0, arg1) -} - -// GetNamespaceUsage mocks base method. -func (m *MockAccountServiceServer) GetNamespaceUsage(arg0 context.Context, arg1 *accountservice.GetNamespaceUsageRequest) (*accountservice.GetNamespaceUsageResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNamespaceUsage", arg0, arg1) - ret0, _ := ret[0].(*accountservice.GetNamespaceUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNamespaceUsage indicates an expected call of GetNamespaceUsage. -func (mr *MockAccountServiceServerMockRecorder) GetNamespaceUsage(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespaceUsage", reflect.TypeOf((*MockAccountServiceServer)(nil).GetNamespaceUsage), arg0, arg1) -} - -// GetNamespacesUsage mocks base method. -func (m *MockAccountServiceServer) GetNamespacesUsage(arg0 context.Context, arg1 *accountservice.GetNamespacesUsageRequest) (*accountservice.GetNamespacesUsageResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNamespacesUsage", arg0, arg1) - ret0, _ := ret[0].(*accountservice.GetNamespacesUsageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNamespacesUsage indicates an expected call of GetNamespacesUsage. -func (mr *MockAccountServiceServerMockRecorder) GetNamespacesUsage(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespacesUsage", reflect.TypeOf((*MockAccountServiceServer)(nil).GetNamespacesUsage), arg0, arg1) -} - -// UpdateAccount mocks base method. -func (m *MockAccountServiceServer) UpdateAccount(arg0 context.Context, arg1 *accountservice.UpdateAccountRequest) (*accountservice.UpdateAccountResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateAccount", arg0, arg1) - ret0, _ := ret[0].(*accountservice.UpdateAccountResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// UpdateAccount indicates an expected call of UpdateAccount. -func (mr *MockAccountServiceServerMockRecorder) UpdateAccount(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockAccountServiceServer)(nil).UpdateAccount), arg0, arg1) -} diff --git a/app/account.go b/app/account.go index 89612a5e..ab3f42e7 100644 --- a/app/account.go +++ b/app/account.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "sort" "github.com/temporalio/tcld/protogen/api/account/v1" "github.com/temporalio/tcld/protogen/api/accountservice/v1" @@ -16,6 +17,11 @@ type AccountClient struct { ctx context.Context } +type regionInfo struct { + CloudProviderRegion string + CloudProvider string +} + func NewAccountClient(ctx context.Context, conn *grpc.ClientConn) *AccountClient { return &AccountClient{ client: accountservice.NewAccountServiceClient(conn), @@ -47,6 +53,31 @@ func (c *AccountClient) getAccount() (*account.Account, error) { return res.Account, nil } +func (c *AccountClient) listRegions() ([]regionInfo, error) { + resp, err := c.client.GetRegions(c.ctx, &accountservice.GetRegionsRequest{}) + if err != nil { + return nil, fmt.Errorf("unable to get regions: %w", err) + } + + var regions []regionInfo + for _, r := range resp.Regions { + regions = append(regions, regionInfo{ + CloudProviderRegion: r.GetName(), + CloudProvider: r.GetCloudProvider(), + }) + } + + sort.SliceStable(regions, func(i, j int) bool { + if regions[i].CloudProvider < regions[j].CloudProvider { + return true + } + + return regions[i].CloudProviderRegion < regions[j].CloudProviderRegion + }) + + return regions, nil +} + func (c *AccountClient) updateAccount(ctx *cli.Context, a *account.Account) error { resourceVersion := a.ResourceVersion if v := ctx.String(ResourceVersionFlagName); v != "" { @@ -107,6 +138,18 @@ func NewAccountCommand(getAccountClientFn GetAccountClientFn) (CommandOut, error return PrintProto(n) }, }, + { + Name: "list-regions", + Usage: "Lists all regions where the account can provision namespaces", + Aliases: []string{"l"}, + Action: func(ctx *cli.Context) error { + regionInfos, err := c.listRegions() + if err != nil { + return err + } + return PrintObj(regionInfos) + }, + }, { Name: "metrics", Usage: "Configures the metrics endpoint for the Temporal Cloud Account", diff --git a/app/account_test.go b/app/account_test.go index 34583e11..91dec5b6 100644 --- a/app/account_test.go +++ b/app/account_test.go @@ -12,10 +12,11 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - "github.com/temporalio/tcld/api/temporalcloudapi/accountservicemock/v1" "github.com/temporalio/tcld/protogen/api/account/v1" "github.com/temporalio/tcld/protogen/api/accountservice/v1" + "github.com/temporalio/tcld/protogen/api/common/v1" "github.com/temporalio/tcld/protogen/api/request/v1" + accountservicemock "github.com/temporalio/tcld/protogen/apimock/accountservice/v1" "github.com/urfave/cli/v2" ) @@ -72,6 +73,18 @@ func (s *AccountTestSuite) TestGet() { s.NoError(s.RunCmd("account", "get")) } +func (s *AccountTestSuite) TestListRegions() { + s.mockService.EXPECT().GetRegions(gomock.Any(), gomock.Any()).Return(nil, errors.New("some error")).Times(1) + s.Error(s.RunCmd("account", "list-regions")) + + s.mockService.EXPECT().GetRegions(gomock.Any(), gomock.Any()).Return(&accountservice.GetRegionsResponse{ + Regions: []*common.Region{ + {CloudProvider: "aws", Name: "us-west-2"}, + }, + }, nil).Times(1) + s.NoError(s.RunCmd("account", "list-regions")) +} + func (s *AccountTestSuite) TestEnable() { type morphGetResp func(*accountservice.GetAccountResponse) type morphUpdateReq func(*accountservice.UpdateAccountRequest) diff --git a/app/apikey.go b/app/apikey.go new file mode 100644 index 00000000..eff340a4 --- /dev/null +++ b/app/apikey.go @@ -0,0 +1,327 @@ +package app + +import ( + "context" + "fmt" + "time" + + "github.com/gogo/protobuf/types" + "github.com/temporalio/tcld/protogen/api/auth/v1" + "github.com/temporalio/tcld/protogen/api/authservice/v1" + "github.com/temporalio/tcld/utils" + "github.com/urfave/cli/v2" +) + +type ( + APIKeyClient struct { + client authservice.AuthServiceClient + ctx context.Context + } + GetAPIKeyClientFn func(ctx *cli.Context) (*APIKeyClient, error) +) + +func GetAPIKeyClient(ctx *cli.Context) (*APIKeyClient, error) { + ct, conn, err := GetServerConnection(ctx) + if err != nil { + return nil, err + } + return &APIKeyClient{ + client: authservice.NewAuthServiceClient(conn), + ctx: ct, + }, nil +} + +func (s *APIKeyClient) createAPIKey( + displayName string, + description string, + expiry time.Time, + requestID string, +) error { + expiryts, err := types.TimestampProto(expiry) + if err != nil { + return fmt.Errorf("failed to convert timestamp to proto: %w", err) + } + resp, err := s.client.CreateAPIKey(s.ctx, &authservice.CreateAPIKeyRequest{ + Spec: &auth.APIKeySpec{ + AccessType: auth.APIKEY_ACCESS_TYPE_INHERIT_OWNER_ACCESS, + Disabled: false, + DisplayName: displayName, + Description: description, + ExpiryTime: expiryts, + }, + RequestId: requestID, + }) + if err != nil { + return err + } + return PrintProto(resp) +} + +func (s *APIKeyClient) listAPIKey() error { + + totalRes := &authservice.GetAPIKeysResponse{} + pageToken := "" + for { + resp, err := s.client.GetAPIKeys(s.ctx, &authservice.GetAPIKeysRequest{ + PageToken: pageToken, + }) + if err != nil { + return err + } + totalRes.ApiKeys = append(totalRes.ApiKeys, resp.ApiKeys...) + // Check if we should continue paging + pageToken = resp.NextPageToken + if len(pageToken) == 0 { + return PrintProto(totalRes) + } + } +} + +func (s *APIKeyClient) getAPIKey( + id string, +) (*auth.APIKey, error) { + resp, err := s.client.GetAPIKey(s.ctx, &authservice.GetAPIKeyRequest{ + Id: id, + }) + if err != nil { + return nil, err + } + return resp.ApiKey, nil +} + +func (s *APIKeyClient) updateAPIKey( + id string, + spec *auth.APIKeySpec, + resourceVersion string, + requestID string, +) error { + resp, err := s.client.UpdateAPIKey(s.ctx, &authservice.UpdateAPIKeyRequest{ + Id: id, + Spec: spec, + ResourceVersion: resourceVersion, + RequestId: requestID, + }) + if err != nil { + return err + } + return PrintProto(resp) +} + +func (s *APIKeyClient) deleteAPIKey( + id string, + resourceVersion string, + requestID string, +) error { + resp, err := s.client.DeleteAPIKey(s.ctx, &authservice.DeleteAPIKeyRequest{ + Id: id, + ResourceVersion: resourceVersion, + RequestId: requestID, + }) + if err != nil { + return err + } + return PrintProto(resp) +} + +func NewAPIKeyCommand(getAPIKeyClientFn GetAPIKeyClientFn) (CommandOut, error) { + var c *APIKeyClient + return CommandOut{ + Command: &cli.Command{ + Name: "apikey", + Aliases: []string{"ak"}, + Usage: "APIKey operations", + Before: func(ctx *cli.Context) error { + var err error + c, err = getAPIKeyClientFn(ctx) + return err + }, + Subcommands: []*cli.Command{ + { + Name: "create", + Usage: "Create an apikey. Make sure to copy the secret or else you will not be able to retrieve it again.", + Aliases: []string{"c"}, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "name", + Usage: "the display name of the apikey", + Required: true, + Aliases: []string{"n"}, + }, + &cli.StringFlag{ + Name: "description", + Usage: "the description of the apikey", + Aliases: []string{"desc"}, + }, + &cli.StringFlag{ + Name: "duration", + Usage: "the duration from now when the apikey will expire, will be ignored if expiry flag is set, examples: '2.5y', '30d', '4d12h'", + Aliases: []string{"d"}, + }, + &cli.TimestampFlag{ + Name: "expiry", + Usage: fmt.Sprintf("the absolute timestamp (RFC3339) when the apikey will expire, example: '%s'", time.Now().Format(time.RFC3339)), + Aliases: []string{"e"}, + Layout: time.RFC3339, + }, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + expiry := ctx.Timestamp("expiry") + if expiry == nil || expiry.IsZero() { + expiryPeriod := ctx.String("duration") + if expiryPeriod == "" { + return fmt.Errorf("no expiry was set") + } + d, err := utils.ParseDuration(expiryPeriod) + if err != nil { + return fmt.Errorf("failed to parse duration: %w", err) + } + if d <= 0 { + return fmt.Errorf("expiration must be positive: %s", expiryPeriod) + } + e := time.Now().UTC().Add(d) + expiry = &e + } + return c.createAPIKey( + ctx.String("name"), + ctx.String("description"), + *expiry, + ctx.String(RequestIDFlagName), + ) + }, + }, + { + Name: "get", + Usage: "Get an apikey", + Aliases: []string{"g"}, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "id", + Usage: "The id of the apikey to get", + Required: true, + Aliases: []string{"i"}, + }, + }, + Action: func(ctx *cli.Context) error { + apikey, err := c.getAPIKey(ctx.String("id")) + if err != nil { + return err + } + return PrintProto(apikey) + }, + }, + { + Name: "list", + Usage: "List apikeys", + Aliases: []string{"l"}, + Flags: []cli.Flag{}, + Action: func(ctx *cli.Context) error { + return c.listAPIKey() + }, + }, + { + Name: "delete", + Usage: "Delete an apikey", + Aliases: []string{"d"}, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "id", + Usage: "The id of the apikey to delete", + Required: true, + Aliases: []string{"i"}, + }, + ResourceVersionFlag, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + rv := ctx.String(ResourceVersionFlagName) + if rv == "" { + apikey, err := c.getAPIKey(ctx.String("id")) + if err != nil { + return err + } + rv = apikey.ResourceVersion + } + return c.deleteAPIKey( + ctx.String("id"), + rv, + ctx.String(RequestIDFlagName), + ) + }, + }, + { + Name: "disable", + Usage: "Disable an apikey", + Aliases: []string{"da"}, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "id", + Usage: "The id of the apikey to disable", + Required: true, + Aliases: []string{"i"}, + }, + ResourceVersionFlag, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + apikey, err := c.getAPIKey(ctx.String("id")) + if err != nil { + return err + } + spec := apikey.Spec + if spec.Disabled { + return fmt.Errorf("apikey is already disabled") + } + spec.Disabled = true + rv := ctx.String(ResourceVersionFlagName) + if rv == "" { + rv = apikey.ResourceVersion + } + return c.updateAPIKey( + ctx.String("id"), + spec, + rv, + ctx.String(RequestIDFlagName), + ) + }, + }, + { + Name: "enable", + Usage: "Enable a disabled apikey", + Aliases: []string{"ea"}, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "id", + Usage: "The id of the apikey to enable", + Required: true, + Aliases: []string{"i"}, + }, + ResourceVersionFlag, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + apikey, err := c.getAPIKey(ctx.String("id")) + if err != nil { + return err + } + spec := apikey.Spec + if !spec.Disabled { + return fmt.Errorf("apikey is already enabled") + } + spec.Disabled = false + rv := ctx.String(ResourceVersionFlagName) + if rv == "" { + rv = apikey.ResourceVersion + } + return c.updateAPIKey( + ctx.String("id"), + spec, + rv, + ctx.String(RequestIDFlagName), + ) + }, + }, + }, + }, + }, nil +} diff --git a/app/apikey_test.go b/app/apikey_test.go new file mode 100644 index 00000000..27e9800e --- /dev/null +++ b/app/apikey_test.go @@ -0,0 +1,170 @@ +package app + +import ( + "context" + "errors" + "testing" + "time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + "github.com/temporalio/tcld/protogen/api/auth/v1" + "github.com/temporalio/tcld/protogen/api/authservice/v1" + "github.com/temporalio/tcld/protogen/api/request/v1" + authservicemock "github.com/temporalio/tcld/protogen/apimock/authservice/v1" + "github.com/urfave/cli/v2" +) + +func TestAPIKey(t *testing.T) { + suite.Run(t, new(APIKeyTestSuite)) +} + +type APIKeyTestSuite struct { + suite.Suite + cliApp *cli.App + mockCtrl *gomock.Controller + mockAuthService *authservicemock.MockAuthServiceClient +} + +func (s *APIKeyTestSuite) SetupTest() { + s.mockCtrl = gomock.NewController(s.T()) + s.mockAuthService = authservicemock.NewMockAuthServiceClient(s.mockCtrl) + out, err := NewAPIKeyCommand(func(ctx *cli.Context) (*APIKeyClient, error) { + return &APIKeyClient{ + ctx: context.TODO(), + client: s.mockAuthService, + }, nil + }) + s.Require().NoError(err) + AutoConfirmFlag.Value = true + s.cliApp = &cli.App{ + Name: "test", + Commands: []*cli.Command{out.Command}, + Flags: []cli.Flag{ + AutoConfirmFlag, + }, + } +} + +func (s *APIKeyTestSuite) RunCmd(args ...string) error { + return s.cliApp.Run(append([]string{"tcld"}, args...)) +} + +func (s *APIKeyTestSuite) AfterTest(suiteName, testName string) { + s.mockCtrl.Finish() +} + +func (s *APIKeyTestSuite) TestGet() { + s.Error(s.RunCmd("apikey", "get")) + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("get apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "get", "--id", "test-apikey-id")) + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{}, nil).Times(1) + s.Error(s.RunCmd("apikey", "get", "--id", "test-apikey-id")) + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{ + Id: "test-apikey-id", + }, + }, nil).Times(1) + s.NoError(s.RunCmd("apikey", "get", "--id", "test-apikey-id")) +} + +func (s *APIKeyTestSuite) TestList() { + s.mockAuthService.EXPECT().GetAPIKeys(gomock.Any(), gomock.Any()).Return(nil, errors.New("get apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "list")) + s.mockAuthService.EXPECT().GetAPIKeys(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeysResponse{ + ApiKeys: []*auth.APIKey{ + { + Id: "test-apikey-id-1", + }, + }, + NextPageToken: "token1", + }, nil).Times(1) + s.mockAuthService.EXPECT().GetAPIKeys(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeysResponse{ + ApiKeys: []*auth.APIKey{ + { + Id: "test-apikey-id-2", + }, + }, + }, nil).Times(1) + s.NoError(s.RunCmd("apikey", "list")) +} + +func (s *APIKeyTestSuite) TestCreate() { + s.Error(s.RunCmd("apikey", "create")) + s.Error(s.RunCmd("apikey", "create", "--name", "test1")) + s.Error(s.RunCmd("apikey", "create", "--name", "test1", "--duration", "-24h")) + s.Error(s.RunCmd("apikey", "create", "--name", "test1", "--duration", "0d")) + s.mockAuthService.EXPECT().CreateAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("create apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "create", "--name", "test1", "--duration", "30d")) + s.mockAuthService.EXPECT().CreateAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.CreateAPIKeyResponse{ + Id: "id1", + SecretKey: "secret1", + RequestStatus: &request.RequestStatus{ + RequestId: "rid", + }, + }, nil).Times(1) + s.NoError(s.RunCmd("apikey", "create", "--name", "test1", "--duration", "30d")) + s.mockAuthService.EXPECT().CreateAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.CreateAPIKeyResponse{ + Id: "id1", + SecretKey: "secret1", + RequestStatus: &request.RequestStatus{ + RequestId: "rid", + }, + }, nil).Times(1) + s.NoError(s.RunCmd("apikey", "create", "--name", "test1", "--expiry", time.Now().Add(time.Hour).Format(time.RFC3339))) +} + +func (s *APIKeyTestSuite) TestDelete() { + s.Error(s.RunCmd("apikey", "delete")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("get apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "delete", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1"}, + }, nil).Times(1) + s.mockAuthService.EXPECT().DeleteAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("delete apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "delete", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1"}, + }, nil).Times(1) + s.mockAuthService.EXPECT().DeleteAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.DeleteAPIKeyResponse{}, nil) + s.NoError(s.RunCmd("apikey", "delete", "--id", "test1")) +} + +func (s *APIKeyTestSuite) TestDisable() { + s.Error(s.RunCmd("apikey", "disable")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("get apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "disable", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1", Spec: &auth.APIKeySpec{Disabled: true}}, + }, nil).Times(1) + s.Error(s.RunCmd("apikey", "disable", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1", Spec: &auth.APIKeySpec{Disabled: false}}, + }, nil).Times(1) + s.mockAuthService.EXPECT().UpdateAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("delete apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "disable", "--id", "test1")) +} + +func (s *APIKeyTestSuite) TestEnable() { + s.Error(s.RunCmd("apikey", "enable")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("get apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "enable", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1", Spec: &auth.APIKeySpec{Disabled: false}}, + }, nil).Times(1) + s.Error(s.RunCmd("apikey", "enable", "--id", "test1")) + + s.mockAuthService.EXPECT().GetAPIKey(gomock.Any(), gomock.Any()).Return(&authservice.GetAPIKeyResponse{ + ApiKey: &auth.APIKey{Id: "test-apikey-id", ResourceVersion: "ver1", Spec: &auth.APIKeySpec{Disabled: true}}, + }, nil).Times(1) + s.mockAuthService.EXPECT().UpdateAPIKey(gomock.Any(), gomock.Any()).Return(nil, errors.New("delete apikey error")).Times(1) + s.Error(s.RunCmd("apikey", "enable", "--id", "test1")) +} diff --git a/app/app.go b/app/app.go index db8d6ee8..3a3c883f 100644 --- a/app/app.go +++ b/app/app.go @@ -23,8 +23,16 @@ func NewApp(params AppParams) (*cli.App, error) { ServerFlag, ConfigDirFlag, AutoConfirmFlag, + APIKeyFlag, + InsecureConnectionFlag, + EnableDebugLogsFlag, }, } - app.Commands = params.Commands + for _, c := range params.Commands { + if !IsFeatureEnabled(APIKeyFeatureFlag) && c.Name == "apikey" { + continue + } + app.Commands = append(app.Commands, c) + } return app, nil } diff --git a/app/certificates.go b/app/certificates.go index f560f909..1a62ee4a 100644 --- a/app/certificates.go +++ b/app/certificates.go @@ -11,7 +11,6 @@ import ( "encoding/pem" "errors" "fmt" - "io/ioutil" "math/big" "os" "time" @@ -141,8 +140,9 @@ func generateCACertificate( } type generateEndEntityCertificateInput struct { - Organization string `validate:"required"` - OrganizationUnit string + Organization string `validate:"required"` + OrganizationalUnit string + CommonName string ValidityPeriod time.Duration CaPem []byte `validate:"required"` @@ -204,7 +204,8 @@ func generateEndEntityCertificate( } subject := pkix.Name{ Organization: []string{input.Organization}, - OrganizationalUnit: []string{input.OrganizationUnit}, + OrganizationalUnit: []string{input.OrganizationalUnit}, + CommonName: input.CommonName, } now := time.Now().UTC() @@ -366,7 +367,11 @@ func NewCertificatesCommand() (CommandOut, error) { }, &cli.StringFlag{ Name: "organization-unit", - Usage: "The name of the organization unit (optional)", + Usage: "The name of the organizational unit (optional)", + }, + &cli.StringFlag{ + Name: "common-name", + Usage: "The common name (optional)", }, &cli.StringFlag{ Name: "validity-period", @@ -413,17 +418,18 @@ func NewCertificatesCommand() (CommandOut, error) { return err } } - caPem, err := ioutil.ReadFile(ctx.Path(CaCertificateFileFlagName)) + caPem, err := os.ReadFile(ctx.Path(CaCertificateFileFlagName)) if err != nil { return fmt.Errorf("failed to read %s: %w", CaCertificateFileFlagName, err) } - caPrivKey, err := ioutil.ReadFile(ctx.Path(caPrivateKeyFileFlagName)) + caPrivKey, err := os.ReadFile(ctx.Path(caPrivateKeyFileFlagName)) if err != nil { return fmt.Errorf("failed to read %s: %w", caPrivateKeyFileFlagName, err) } certPem, certPrivKey, err := generateEndEntityCertificate(generateEndEntityCertificateInput{ - Organization: ctx.String("organization"), - OrganizationUnit: ctx.String("organization-unit"), + Organization: ctx.String("organization"), + OrganizationalUnit: ctx.String("organization-unit"), + CommonName: ctx.String("common-name"), ValidityPeriod: validityPeriod, CaPem: caPem, @@ -487,12 +493,12 @@ func writeCertificates(ctx *cli.Context, typ string, cert, key []byte, certPath, if !yes { return nil } - err = ioutil.WriteFile(certPath, cert, 0644) + err = os.WriteFile(certPath, cert, 0644) if err != nil { return fmt.Errorf("failed to write end-entity certificate: %w", err) } - err = ioutil.WriteFile(keyPath, key, 0600) + err = os.WriteFile(keyPath, key, 0600) if err != nil { return fmt.Errorf("failed to write end-entity key: %w", err) } diff --git a/app/certificates_test.go b/app/certificates_test.go index cc45d12a..98c5be40 100644 --- a/app/certificates_test.go +++ b/app/certificates_test.go @@ -50,6 +50,8 @@ func (s *CertificatesTestSuite) TestCertificateGenerateCore() { caValidityPeriod time.Duration endEntityValidityPeriod time.Duration organization string + organizationalUnit string + commonName string } tests := []struct { name string @@ -73,6 +75,8 @@ func (s *CertificatesTestSuite) TestCertificateGenerateCore() { organization: "test-certificate", caValidityPeriod: 365 * 24 * time.Hour, endEntityValidityPeriod: 24 * time.Hour, + organizationalUnit: "test-organizational-unit", + commonName: "test-common-name.com", }, "", "", @@ -112,10 +116,12 @@ func (s *CertificatesTestSuite) TestCertificateGenerateCore() { } certBytes, certKeyBytes, err := generateEndEntityCertificate(generateEndEntityCertificateInput{ - Organization: tt.args.organization + "-leaf", - ValidityPeriod: tt.args.endEntityValidityPeriod, - CaPem: caPem, - CaPrivateKeyPEM: caPrivKeyPem, + Organization: tt.args.organization + "-leaf", + OrganizationalUnit: tt.args.organizationalUnit, + CommonName: tt.args.commonName, + ValidityPeriod: tt.args.endEntityValidityPeriod, + CaPem: caPem, + CaPrivateKeyPEM: caPrivKeyPem, }) if tt.endEntityGenerationErrMsg == "" { diff --git a/app/common.go b/app/common.go new file mode 100644 index 00000000..465f78a2 --- /dev/null +++ b/app/common.go @@ -0,0 +1,61 @@ +package app + +import ( + "fmt" + "regexp" +) + +var ( + assumedRolePattern = regexp.MustCompile(`^arn:aws:iam::([0-9]{12}):role/(\S+)$`) + saPrincipalPattern = regexp.MustCompile(`^(\S+)@(\S+).iam.gserviceaccount.com$`) +) + +func IsFeatureEnabled(feature string) bool { + jsonData, err := getFeatureFlags() + + if err != nil { + return false + } + + for _, featureFlag := range jsonData { + if featureFlag.Name == feature { + return featureFlag.Value + } + } + + return false +} + +func parseAssumedRole(assumedRole string) (string, string, error) { + var accountID, roleName string + re := assumedRolePattern + submatch := re.FindStringSubmatch(assumedRole) + + if len(submatch) != 3 { + return "", "", fmt.Errorf("invalid assumed role: %s", assumedRole) + } + + accountID = submatch[1] + roleName = submatch[2] + + return accountID, roleName, nil +} + +func parseSAPrincipal(saPrincipal string) (string, string, error) { + var gcpProjectName, saName string + re := saPrincipalPattern + submatch := re.FindStringSubmatch(saPrincipal) + + if len(submatch) != 3 { + return "", "", fmt.Errorf("invalid SA principal: %s", saPrincipal) + } + + saName = submatch[1] + gcpProjectName = submatch[2] + + return saName, gcpProjectName, nil +} + +func getAssumedRoleArn(awsAccountId string, awsRoleName string) string { + return fmt.Sprintf("arn:aws:iam::%s:role/%s", awsAccountId, awsRoleName) +} diff --git a/app/connection.go b/app/connection.go index 877ff070..282c00cf 100644 --- a/app/connection.go +++ b/app/connection.go @@ -4,8 +4,10 @@ import ( "context" "crypto/tls" "fmt" - "strings" + "net/url" + "github.com/temporalio/tcld/app/credentials/apikey" + "github.com/temporalio/tcld/app/credentials/oauth" "github.com/urfave/cli/v2" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -13,44 +15,91 @@ import ( "google.golang.org/grpc/metadata" ) -func GetServerConnection(c *cli.Context, opts ...grpc.DialOption) (context.Context, *grpc.ClientConn, error) { - - serverAddr := c.String(ServerFlagName) - var credentialOption grpc.DialOption - parts := strings.Split(serverAddr, ":") +const ( + VersionHeader = "tcld-version" + CommitHeader = "tcld-commit" + TemporalCloudAPIVersionHeader = "temporal-cloud-api-version" + TemporalCloudAPIVersion = "2023-07-26-01" +) - if len(parts) != 2 { - return nil, nil, fmt.Errorf("unable to parse hostname: %s", serverAddr) +func GetServerConnection(c *cli.Context, opts ...grpc.DialOption) (context.Context, *grpc.ClientConn, error) { + addr, err := url.Parse(c.String(ServerFlagName)) + if err != nil { + return nil, nil, fmt.Errorf("unable to parse server address: %s", err) } - hostname := parts[0] - switch hostname { - case "localhost": - credentialOption = grpc.WithTransportCredentials(insecure.NewCredentials()) - default: - credentialOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{ - MinVersion: tls.VersionTLS12, - ServerName: hostname, - })) + defaultOpts, err := defaultDialOptions(c, addr) + if err != nil { + return nil, nil, fmt.Errorf("failed to generate default dial options: %s", err) } + conn, err := grpc.Dial( - serverAddr, - append(opts, credentialOption)..., + addr.String(), + append(defaultOpts, opts...)..., ) if err != nil { - return nil, nil, err + return nil, nil, fmt.Errorf("failed to dial `%s`: %v", addr.String(), err) } - tokens, err := loadLoginConfig(c) + + buildInfo := NewBuildInfo() + + ctx := context.Background() + ctx = metadata.AppendToOutgoingContext(ctx, VersionHeader, buildInfo.Version) + ctx = metadata.AppendToOutgoingContext(ctx, CommitHeader, buildInfo.Commit) + ctx = metadata.AppendToOutgoingContext(ctx, TemporalCloudAPIVersionHeader, TemporalCloudAPIVersion) + + return ctx, conn, nil +} + +func defaultDialOptions(c *cli.Context, addr *url.URL) ([]grpc.DialOption, error) { + var opts []grpc.DialOption + + creds, err := newRPCCredential(c) if err != nil { - return nil, nil, err + return []grpc.DialOption{}, err + } else if creds != nil { + opts = append(opts, grpc.WithPerRPCCredentials(creds)) } - ctx := context.Background() - ctx = metadata.AppendToOutgoingContext(ctx, "tcld-version", getVersion()) - ctx = metadata.AppendToOutgoingContext(ctx, "tcld-commit", Commit) + transport := credentials.NewTLS(&tls.Config{ + MinVersion: tls.VersionTLS12, + ServerName: addr.Hostname(), + }) + if c.Bool(InsecureConnectionFlagName) { + transport = insecure.NewCredentials() + } + opts = append(opts, grpc.WithTransportCredentials(transport)) + + // Set max message size to 50MB. Messages should never be this large, but useful in a pinch. + maxMsgSize := 50 * 1000 * 1000 + opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize), grpc.MaxCallSendMsgSize(maxMsgSize))) + + return opts, nil +} + +func newRPCCredential(c *cli.Context) (credentials.PerRPCCredentials, error) { + insecure := c.Bool(InsecureConnectionFlagName) + + apiKey := c.String(APIKeyFlagName) + if len(apiKey) > 0 { + return apikey.NewCredential( + apiKey, + apikey.WithInsecureTransport(insecure), + ) + } + + tokens, err := loadLoginConfig(c) + if err != nil { + return nil, err + } if len(tokens.AccessToken) > 0 { - ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+tokens.AccessToken) + return oauth.NewCredential( + tokens.AccessToken, + oauth.WithInsecureTransport(insecure), + ) } - return ctx, conn, nil + + // Use no credentials for this connection. + return nil, nil } diff --git a/app/connection_test.go b/app/connection_test.go index 742ca132..4e46ea34 100644 --- a/app/connection_test.go +++ b/app/connection_test.go @@ -1,98 +1,212 @@ package app import ( + "context" "encoding/json" - "io/ioutil" + "flag" + "fmt" + "io" + "net" "os" "path" "testing" - "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/temporalio/tcld/app/credentials/apikey" + "github.com/temporalio/tcld/app/credentials/oauth" + "github.com/temporalio/tcld/protogen/api/request/v1" + "github.com/temporalio/tcld/protogen/api/requestservice/v1" "github.com/urfave/cli/v2" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/test/bufconn" ) -func TestServerConnection(t *testing.T) { - suite.Run(t, new(ServerConnectionTestSuite)) +const ( + testAPIKey = "testprefix_testid_testsecret" + testAccessToken = "test-token" +) + +type testServer struct { + requestservice.UnimplementedRequestServiceServer + + receivedMD metadata.MD +} + +func (s *testServer) GetRequestStatus(ctx context.Context, req *requestservice.GetRequestStatusRequest) (*requestservice.GetRequestStatusResponse, error) { + md, _ := metadata.FromIncomingContext(ctx) + s.receivedMD = md.Copy() + + return &requestservice.GetRequestStatusResponse{ + RequestStatus: &request.RequestStatus{ + RequestId: "test-request-id", + State: request.STATE_FULFILLED, + }, + }, nil } type ServerConnectionTestSuite struct { suite.Suite - mockCtrl *gomock.Controller + configDir string + listener *bufconn.Listener + grpcSrv *grpc.Server + testService *testServer +} + +func TestServerConnection(t *testing.T) { + suite.Run(t, new(ServerConnectionTestSuite)) } func (s *ServerConnectionTestSuite) SetupTest() { - s.mockCtrl = gomock.NewController(s.T()) + s.configDir = s.T().TempDir() + data, err := json.Marshal(OAuthTokenResponse{ + AccessToken: testAccessToken, + }) + require.NoError(s.T(), err) + + err = os.WriteFile(path.Join(s.configDir, tokenFileName), data, 0600) + require.NoError(s.T(), err) + + s.listener = bufconn.Listen(1024 * 1024) + s.grpcSrv = grpc.NewServer() + s.testService = &testServer{} + requestservice.RegisterRequestServiceServer(s.grpcSrv, s.testService) + go func() { + err := s.grpcSrv.Serve(s.listener) + require.NoError(s.T(), err) + }() } -func (s *ServerConnectionTestSuite) AfterTest(suiteName, testName string) { - s.mockCtrl.Finish() +func (s *ServerConnectionTestSuite) TeardownTest() { + s.grpcSrv.Stop() + s.listener.Close() } -func (s *ServerConnectionTestSuite) TestServerName() { - - testConfDir := "testconfig" - testHostname := "saas-api.tmprl.cloud:443" - testToken := "some-testing-token" - tests := []struct { - name string - hostname string - configDir string - token string - expectErr bool - }{{ - name: "invalid hostname", - hostname: "invalidhostname", - expectErr: true, - }, { - name: "success", - hostname: testHostname, - configDir: testConfDir, - }} - for _, tc := range tests { +func (s *ServerConnectionTestSuite) TestGetServerConnection() { + testcases := []struct { + name string + args map[string]string + expectedHeaders map[string]string + expectedErr error + }{ + { + name: "ErrorInvalidHostname", + args: map[string]string{ + ServerFlagName: "localhost%%0", + }, + expectedErr: fmt.Errorf("unable to parse server address"), + }, + { + name: "ErrorOAuthInsecureConnection", + args: map[string]string{ + // don't include insecure flag, as this is an accidental insecure connection. + }, + expectedErr: fmt.Errorf("the credentials require transport level security"), + }, + { + name: "ErrorAPIKeyInsecureConnection", + args: map[string]string{ + APIKeyFlagName: testAPIKey, + // don't include insecure flag, as this is an accidental insecure connection. + }, + expectedErr: fmt.Errorf("the credentials require transport level security"), + }, + { + name: "OAuthSucess", + args: map[string]string{ + InsecureConnectionFlagName: "", // required for bufconn + }, + expectedHeaders: map[string]string{ + oauth.Header: "Bearer " + testAccessToken, + }, + }, + { + name: "APIKeySucess", + args: map[string]string{ + InsecureConnectionFlagName: "", // required for bufconn + APIKeyFlagName: testAPIKey, + }, + expectedHeaders: map[string]string{ + apikey.AuthorizationHeader: "Bearer " + testAPIKey, + }, + }, + } + for _, tc := range testcases { s.Run(tc.name, func() { + fs := flag.NewFlagSet(tc.name, flag.ContinueOnError) - err := os.MkdirAll(testConfDir, 0755) - s.Require().NoError(err) - defer os.RemoveAll(testConfDir) + flags := []cli.Flag{ + ServerFlag, + ConfigDirFlag, + APIKeyFlag, + InsecureConnectionFlag, + } + for _, f := range flags { + require.NoError(s.T(), f.Apply(fs)) + } + fs.SetOutput(io.Discard) - data, err := json.Marshal(OauthTokenResponse{ - AccessToken: testToken, - }) - s.Require().NoError(err) - err = ioutil.WriteFile(path.Join(testConfDir, tokenFileName), data, 0644) - s.Require().NoError(err) - - cmd := cli.Command{ - Name: "test", - Before: func(ctx *cli.Context) error { - c, conn, err := GetServerConnection(ctx) - if tc.expectErr { - s.Error(err) - return nil - } - s.NoError(err) - s.NotNil(c) - md, ok := metadata.FromOutgoingContext(c) - s.True(ok) - s.Contains(md["authorization"], "Bearer "+testToken) - - s.NotNil(conn) - s.Equal(conn.Target(), testHostname) - return nil - }, + cCtx := cli.NewContext(nil, fs, nil) + args := []string{ + "--" + ConfigDirFlagName, s.configDir, + "--" + ServerFlagName, "bufnet", + } + for k, v := range tc.args { + args = append(args, "--"+k) + if len(v) > 0 { + args = append(args, v) + } } - cliApp := &cli.App{ - Name: "test", - Commands: []*cli.Command{&cmd}, - Flags: []cli.Flag{ - ServerFlag, - ConfigDirFlag, - }, + require.NoError(s.T(), fs.Parse(args)) + + opts := []grpc.DialOption{ + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { + return s.listener.Dial() + }), + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithBlock(), + } + connCtx, conn, err := GetServerConnection(cCtx, opts...) + if tc.expectedErr != nil { + require.ErrorContains(s.T(), err, tc.expectedErr.Error()) + return // fin test. } - err = cliApp.Run([]string{"tcld", "-s", tc.hostname, "--config-dir", testConfDir, "test"}) + require.NoError(s.T(), err) + defer conn.Close() + + client := requestservice.NewRequestServiceClient(conn) + _, err = client.GetRequestStatus(connCtx, &requestservice.GetRequestStatusRequest{ + RequestId: "test-request-id", + }) s.NoError(err) + md := s.testService.receivedMD + + buildInfo := NewBuildInfo() + version := getHeaderValue(md, VersionHeader) + s.Equal(buildInfo.Version, version) + + commit := getHeaderValue(md, CommitHeader) + s.Equal(buildInfo.Commit, commit) + + _, usingAPIKeys := tc.args[APIKeyFlagName] + if usingAPIKeys { + authHeader := getHeaderValue(md, apikey.AuthorizationHeader) + s.Equal("Bearer "+testAPIKey, authHeader) + } else { + token := getHeaderValue(md, oauth.Header) + s.Equal("Bearer "+testAccessToken, token) + } }) } } + +func getHeaderValue(md metadata.MD, key string) string { + vals := md.Get(key) + if len(vals) > 0 { + return vals[0] + } + return "" +} diff --git a/app/credentials/apikey/apikey.go b/app/credentials/apikey/apikey.go new file mode 100644 index 00000000..f24c3ea5 --- /dev/null +++ b/app/credentials/apikey/apikey.go @@ -0,0 +1,66 @@ +package apikey + +import ( + "context" + "fmt" + + "google.golang.org/grpc/credentials" +) + +const ( + AuthorizationHeader = "Authorization" + AuthorizationHeaderPrefix = "Bearer" + Separator = "_" +) + +type Credential struct { + Key string + allowInsecureTransport bool +} + +type Option = func(c *Credential) + +func WithInsecureTransport(insecure bool) Option { + return func(c *Credential) { + c.allowInsecureTransport = insecure + } +} + +func NewCredential(key string, opts ...Option) (Credential, error) { + if len(key) == 0 { + return Credential{}, fmt.Errorf("an empty API key was provided") + } + + c := Credential{ + Key: key, + } + for _, opt := range opts { + opt(&c) + } + + return c, nil +} + +func (c Credential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + ri, ok := credentials.RequestInfoFromContext(ctx) + if !ok { + return nil, fmt.Errorf("failed to retrieve request info from context") + } + + if !c.allowInsecureTransport { + // Ensure the API key, AKA bearer token, is sent over a secure connection - meaning TLS. + if err := credentials.CheckSecurityLevel(ri.AuthInfo, credentials.PrivacyAndIntegrity); err != nil { + return nil, fmt.Errorf("the connection's transport security level is too low for API keys: %v", err) + } + } + + return map[string]string{ + AuthorizationHeader: fmt.Sprintf("%s %s", AuthorizationHeaderPrefix, c.Key), + }, nil +} + +func (c Credential) RequireTransportSecurity() bool { + return !c.allowInsecureTransport +} + +var _ credentials.PerRPCCredentials = (*Credential)(nil) diff --git a/app/credentials/oauth/oauth.go b/app/credentials/oauth/oauth.go new file mode 100644 index 00000000..e09e9adb --- /dev/null +++ b/app/credentials/oauth/oauth.go @@ -0,0 +1,68 @@ +package oauth + +import ( + "context" + "fmt" + + "google.golang.org/grpc/credentials" +) + +const ( + Header = "authorization" +) + +var _ credentials.PerRPCCredentials = (*Credential)(nil) + +type Option = func(c *Credential) + +func WithInsecureTransport(insecure bool) Option { + return func(c *Credential) { + c.allowInsecureTransport = insecure + } +} + +type Credential struct { + accessToken string // keep unexported to prevent accidental leakage of the token. + allowInsecureTransport bool +} + +func NewCredential(accessToken string, opts ...Option) (Credential, error) { + if len(accessToken) == 0 { + return Credential{}, fmt.Errorf("an empty access token was provided") + } + + c := Credential{ + accessToken: accessToken, + } + for _, opt := range opts { + opt(&c) + } + + return c, nil +} + +func (c Credential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + ri, ok := credentials.RequestInfoFromContext(ctx) + if !ok { + return nil, fmt.Errorf("failed to retrieve request info from context") + } + + if !c.allowInsecureTransport { + // Ensure the bearer token is sent over a secure connection - meaning TLS. + if err := credentials.CheckSecurityLevel(ri.AuthInfo, credentials.PrivacyAndIntegrity); err != nil { + return nil, fmt.Errorf("the connection's transport security level is too low for OAuth: %v", err) + } + } + + return map[string]string{ + Header: c.token(), + }, nil +} + +func (c Credential) RequireTransportSecurity() bool { + return !c.allowInsecureTransport +} + +func (c Credential) token() string { + return "Bearer " + c.accessToken +} diff --git a/app/feature.go b/app/feature.go new file mode 100644 index 00000000..8657169c --- /dev/null +++ b/app/feature.go @@ -0,0 +1,162 @@ +package app + +import ( + "encoding/json" + "fmt" + "log" + "os" + "path/filepath" + + "github.com/urfave/cli/v2" +) + +var ( + APIKeyFeatureFlag = "enable-apikey" + GCPSinkFeatureFlag = "enable-gcp-sink" + featureflagFileName = "feature.json" +) + +var supportFeatureFlags = []string{APIKeyFeatureFlag, GCPSinkFeatureFlag} + +type FeatureFlag struct { + Name string `json:"Name"` + Value bool `json:"Value"` +} + +func getFeatureFlags() ([]FeatureFlag, error) { + featureFlagConfigPath := getFeatureFlagConfigFilePath() + return getFeatureFlagsFromConfigFile(featureFlagConfigPath) +} + +func getFeatureFlagConfigFilePath() string { + return filepath.Join(ConfigDirFlag.Value, featureflagFileName) +} + +func contains(f FeatureFlag, ffs []string) bool { + for _, ff := range ffs { + if f.Name == ff { + return true + } + } + + return false +} + +func getFeatureFlagsFromConfigFile(featureFlagConfigPath string) ([]FeatureFlag, error) { + // create config file if not exist + if _, err := os.Stat(featureFlagConfigPath); err != nil { + if err := os.WriteFile(featureFlagConfigPath, []byte("[]"), 0644); err != nil { + return nil, err + } + } + content, err := os.ReadFile(featureFlagConfigPath) + if err != nil { + return nil, err + } + + var featureFlags []FeatureFlag + err = json.Unmarshal(content, &featureFlags) + if err != nil { + return nil, err + } + + var validfeatureflags []FeatureFlag + for _, featureflag := range featureFlags { + if contains(featureflag, supportFeatureFlags) { + validfeatureflags = append(validfeatureflags, featureflag) + } + } + + return validfeatureflags, nil +} + +func toggleFeature(feature string) error { + featureFlagConfigPath := getFeatureFlagConfigFilePath() + return toggleFeatureSaveToPath(feature, featureFlagConfigPath) +} + +func toggleFeatureSaveToPath(feature string, path string) error { + featureFlags, err := getFeatureFlagsFromConfigFile(path) + + if err != nil { + return err + } + + found := false + for i, featureflag := range featureFlags { + if featureflag.Name == feature { + featureFlags[i].Value = !featureflag.Value + found = true + println("Feature flag", feature, "is now", featureFlags[i].Value) + } + } + + if !found { + featureFlags = append(featureFlags, FeatureFlag{ + Name: feature, + Value: true, + }) + println("Feature flag", feature, "is now", true) + } + + output, err := json.Marshal(featureFlags) + + if err != nil { + return err + } + + if err := os.WriteFile(path, output, 0644); err != nil { + return err + } + return nil +} + +func NewFeatureCommand() (CommandOut, error) { + return CommandOut{ + Command: &cli.Command{ + Name: "feature", + Aliases: []string{"f"}, + Usage: "feature commands", + Hidden: true, + Subcommands: []*cli.Command{ + { + Name: "toggle-apikey", + Aliases: []string{"tak"}, + Usage: "switch api keys on/off", + Action: func(c *cli.Context) error { + return toggleFeature(APIKeyFeatureFlag) + }, + }, + { + Name: "toggle-gcp-sink", + Aliases: []string{"tgs"}, + Usage: "switch gcp sink on/off", + Action: func(c *cli.Context) error { + return toggleFeature(GCPSinkFeatureFlag) + }, + }, + { + Name: "get", + Aliases: []string{"g"}, + Usage: "get all feature flags Value", + Action: func(c *cli.Context) error { + featureFlags, err := getFeatureFlags() + + if err != nil { + return err + } + + // MarshalIndent the feature flags into a pretty JSON + prettyJSON, err := json.MarshalIndent(featureFlags, "", " ") + if err != nil { + log.Fatalf("Failed to generate json: %s", err) + } + + fmt.Printf("%s\n", prettyJSON) + return nil + }, + }, + }, + }, + }, nil +} diff --git a/app/feature_test.go b/app/feature_test.go new file mode 100644 index 00000000..55ac114b --- /dev/null +++ b/app/feature_test.go @@ -0,0 +1,56 @@ +package app + +import ( + "os" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" +) + +func TestToggleFeatureAndRead(t *testing.T) { + testFileName := uuid.NewString() + ".json" + _, err := getFeatureFlagsFromConfigFile(testFileName) + if err != nil { + t.Fatal(err) + } + defer os.Remove(testFileName) // clean up + + // Toggle test feature on + test_feature_flag := "test-feature" + + err = toggleFeatureSaveToPath(test_feature_flag, testFileName) + if err != nil { + t.Fatal(err) + } + + // Read the file. + jsonData, err := getFeatureFlagsFromConfigFile(testFileName) + + if err != nil { + t.Fatal(err) + } + + for _, feature := range jsonData { + assert.Equal(t, test_feature_flag, feature.Name) + assert.Equal(t, true, feature.Value) + } + + // Toggle test feature off + err = toggleFeatureSaveToPath(test_feature_flag, testFileName) + if err != nil { + t.Fatal(err) + } + + // Read the file. + jsonData, err = getFeatureFlagsFromConfigFile(testFileName) + + if err != nil { + t.Fatal(err) + } + + for _, feature := range jsonData { + assert.Equal(t, test_feature_flag, feature.Name) + assert.Equal(t, false, feature.Value) + } +} diff --git a/app/flags.go b/app/flags.go index 284b5bba..747b62e0 100644 --- a/app/flags.go +++ b/app/flags.go @@ -8,12 +8,19 @@ import ( ) const ( - ServerFlagName = "server" - ConfigDirFlagName = "config-dir" - RetentionDaysFlagName = "retention-days" - NamespaceFlagName = "namespace" - RequestIDFlagName = "request-id" - ResourceVersionFlagName = "resource-version" + ServerFlagName = "server" + ConfigDirFlagName = "config-dir" + RetentionDaysFlagName = "retention-days" + NamespaceFlagName = "namespace" + RequestIDFlagName = "request-id" + ResourceVersionFlagName = "resource-version" + APIKeyFlagName = "api-key" + InsecureConnectionFlagName = "insecure" + EnableDebugLogsFlagName = "enable-debug-logs" + AuthenticationFlagCategory = "Authentication:" + + // APIKeyVersionTag indicates the state of API keys. This should be removed when fully released. + APIKeyVersionTag = "preview" ) var ( @@ -30,6 +37,7 @@ var ( Name: ConfigDirFlagName, Value: filepath.Join(os.Getenv("HOME"), ".config", "tcld"), Usage: "The config directory to use", + EnvVars: []string{"TEMPORAL_CLOUD_CONFIG_DIR"}, Hidden: true, Required: false, } @@ -57,4 +65,25 @@ var ( Usage: "The resource-version (etag) to update from, if not set the cli will use the latest (optional)", Aliases: []string{"v"}, } + APIKeyFlag = &cli.StringFlag{ + Name: APIKeyFlagName, + Usage: "The API Key used for authentication (" + APIKeyVersionTag + ")", + EnvVars: []string{"TEMPORAL_CLOUD_API_KEY"}, + Category: AuthenticationFlagCategory, + } + InsecureConnectionFlag = &cli.BoolFlag{ + Name: InsecureConnectionFlagName, + Usage: "Use an insecure transport for connection, recommended to avoid this option unless necessary", + EnvVars: []string{"TEMPORAL_CLOUD_INSECURE_CONNECTION"}, + Category: AuthenticationFlagCategory, + // Hide the insecure flag because credentials should not be sent over an insecure connections. However some + // users may be using a service mesh or local proxy, which is insecure locally but uses TLS off the host, + // and thus may require the use of this. + Hidden: true, + } + EnableDebugLogsFlag = &cli.BoolFlag{ + Name: EnableDebugLogsFlagName, + Usage: "A flag to enable debug logs", + EnvVars: []string{"TEMPORAL_CLOUD_ENABLE_DEBUG_LOGS"}, + } ) diff --git a/app/login.go b/app/login.go index 71789c86..837fdb70 100644 --- a/app/login.go +++ b/app/login.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "os" @@ -62,7 +62,7 @@ type ( loginService services.LoginService } - OauthDeviceCodeResponse struct { + OAuthDeviceCodeResponse struct { DeviceCode string `json:"device_code"` UserCode string `json:"user_code"` VerificationURI string `json:"verification_uri"` @@ -71,7 +71,7 @@ type ( Interval int `json:"interval"` } - OauthTokenResponse struct { + OAuthTokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` IDToken string `json:"id_token"` @@ -86,9 +86,9 @@ func getTokenConfigPath(ctx *cli.Context) string { } // TODO: support login config on windows -func loadLoginConfig(ctx *cli.Context) (OauthTokenResponse, error) { +func loadLoginConfig(ctx *cli.Context) (OAuthTokenResponse, error) { - tokens := OauthTokenResponse{} + tokens := OAuthTokenResponse{} configDir := ctx.Path(ConfigDirFlagName) // Create config dir if it does not exist if err := os.MkdirAll(configDir, 0700); err != nil { @@ -104,7 +104,7 @@ func loadLoginConfig(ctx *cli.Context) (OauthTokenResponse, error) { return tokens, err } - tokenConfigBytes, err := ioutil.ReadFile(tokenConfig) + tokenConfigBytes, err := os.ReadFile(tokenConfig) if err != nil { return tokens, err } @@ -116,67 +116,93 @@ func loadLoginConfig(ctx *cli.Context) (OauthTokenResponse, error) { return tokens, nil } -func getURLFromDomain(domain string) (string, error) { - u, err := url.Parse(domain) +func parseURL(s string) (*url.URL, error) { + // Without a scheme, url.Parse would interpret the path as a relative file path. + if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") { + s = fmt.Sprintf("%s%s", "https://", s) + } + + u, err := url.ParseRequestURI(s) if err != nil { - return domain, err + return nil, err } + if u.Scheme == "" { - return fmt.Sprintf("https://%s", domain), nil + u.Scheme = "https" } - return domain, nil + + return u, err } func (c *LoginClient) login(ctx *cli.Context, domain string, audience string, clientID string, disablePopUp bool) error { // Get device code - oauthDeviceCodeResponse := OauthDeviceCodeResponse{} - domain, err := getURLFromDomain(domain) + domainURL, err := parseURL(domain) if err != nil { return err } - if err := postRequest( - fmt.Sprintf("%s/oauth/device/code", domain), - fmt.Sprintf("client_id=%s&scope=%s&audience=%s", clientID, scope, audience), - &oauthDeviceCodeResponse, + + codeResp := OAuthDeviceCodeResponse{} + if err := postFormRequest( + domainURL.JoinPath("oauth", "device", "code").String(), + url.Values{ + "client_id": {clientID}, + "scope": {scope}, + "audience": {audience}, + }, + &codeResp, ); err != nil { return err } - fmt.Printf("Login via this url: %s\n", oauthDeviceCodeResponse.VerificationURIComplete) + verificationURL, err := parseURL(codeResp.VerificationURIComplete) + if err != nil { + return fmt.Errorf("failed to parse verification URL: %w", err) + } else if verificationURL.Hostname() != domainURL.Hostname() { + // We expect the verification URL to be the same host as the domain URL. + // Otherwise the response could have us POST to any arbitrary URL. + return fmt.Errorf("domain URL `%s` does not match verification URL `%s` in response", domainURL.Hostname(), verificationURL.Hostname()) + } + + fmt.Printf("Login via this url: %s\n", verificationURL.String()) if !disablePopUp { - if err := c.loginService.OpenBrowser(oauthDeviceCodeResponse.VerificationURIComplete); err != nil { + if err := c.loginService.OpenBrowser(verificationURL.String()); err != nil { fmt.Println("Unable to open browser, please open url manually.") } } + // According to RFC, we should set a default polling interval if not provided. + // https://tools.ietf.org/html/draft-ietf-oauth-device-flow-07#section-3.5 + if codeResp.Interval == 0 { + codeResp.Interval = 10 + } + // Get access token - oauthTokenResponse := OauthTokenResponse{} - for len(oauthTokenResponse.AccessToken) == 0 { - time.Sleep(time.Duration(oauthDeviceCodeResponse.Interval) * time.Second) - - if err := postRequest( - fmt.Sprintf("%s/oauth/token", domain), - fmt.Sprintf( - "grant_type=%s&device_code=%s&client_id=%s", - "urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Adevice_code", - oauthDeviceCodeResponse.DeviceCode, - clientID, - ), - &oauthTokenResponse, + tokenResp := OAuthTokenResponse{} + for len(tokenResp.AccessToken) == 0 { + time.Sleep(time.Duration(codeResp.Interval) * time.Second) + + if err := postFormRequest( + domainURL.JoinPath("oauth", "token").String(), + url.Values{ + "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"}, + "device_code": {codeResp.DeviceCode}, + "client_id": {clientID}, + }, + &tokenResp, ); err != nil { return err } } - oauthTokenResponseJson, err := FormatJson(oauthTokenResponse) + tokenRespJson, err := FormatJson(tokenResp) if err != nil { return err } fmt.Println("Successfully logged in!") // Save token info locally - return c.loginService.WriteToConfigFile(getTokenConfigPath(ctx), oauthTokenResponseJson) + return c.loginService.WriteToConfigFile(getTokenConfigPath(ctx), tokenRespJson) } func NewLoginCommand(c *LoginClient) (CommandOut, error) { @@ -201,19 +227,14 @@ func NewLoginCommand(c *LoginClient) (CommandOut, error) { }}, nil } -func postRequest(url string, formData string, resStruct interface{}) error { - payload := strings.NewReader(formData) - req, err := http.NewRequest("POST", url, payload) - if err != nil { - return err - } - req.Header.Add("content-type", "application/x-www-form-urlencoded") - res, err := http.DefaultClient.Do(req) +func postFormRequest(url string, values url.Values, resStruct interface{}) error { + res, err := http.PostForm(url, values) if err != nil { return err } defer res.Body.Close() - body, err := ioutil.ReadAll(res.Body) + + body, err := io.ReadAll(res.Body) if err != nil { return err } diff --git a/app/login_test.go b/app/login_test.go index 8fadf225..15ccbd89 100644 --- a/app/login_test.go +++ b/app/login_test.go @@ -1,6 +1,7 @@ package app import ( + "encoding/json" "net/http" "net/http/httptest" "testing" @@ -11,23 +12,6 @@ import ( "github.com/urfave/cli/v2" ) -var validOauthDeviceCodeResponse = `{ - "device_code": "ABCD-EFGH", - "user_code": "ABCD-EFGH", - "verification_uri": "verification/uri", - "verification_uri_complete": "", - "interval": 0, - "expires_in": 0 -}` - -var validOauthTokenResponse = `{ - "access_token": "EabWErgdh", - "refresh_token": "eWKjhgT", - "id_token": "iJktYuVk", - "token_type": "Bearer", - "expires_in": 1234 -}` - func TestLogin(t *testing.T) { suite.Run(t, new(LoginTestSuite)) } @@ -76,8 +60,8 @@ func (l *LoginTestSuite) runCmd(args ...string) error { func (l *LoginTestSuite) TestLoginSuccessful() { l.mockService.EXPECT().OpenBrowser(gomock.Any()).Return(nil) l.mockService.EXPECT().WriteToConfigFile(gomock.Any(), gomock.Any()).Return(nil) - l.registerPath("/oauth/device/code", validOauthDeviceCodeResponse) - l.registerPath("/oauth/token", validOauthTokenResponse) + l.registerPath("/oauth/device/code", validCodeResponse(l.T(), l.server.URL)) + l.registerPath("/oauth/token", validTokenResponse(l.T(), l.server.URL)) resp := l.runCmd("login", "--domain", l.server.URL) l.NoError(resp) } @@ -89,18 +73,59 @@ func (l *LoginTestSuite) TestLoginFailureAtDeviceVerification() { func (l *LoginTestSuite) TestLoginFailureAtTokenResponse() { l.mockService.EXPECT().OpenBrowser(gomock.Any()).Return(nil) - l.registerPath("/oauth/device/code", validOauthDeviceCodeResponse) + l.registerPath("/oauth/device/code", validCodeResponse(l.T(), l.server.URL)) l.registerPath("/oauth/token", ``) l.Error(l.runCmd("login", "--domain", l.server.URL)) } func (l *LoginTestSuite) TestLoginWithInvalidDomain() { - l.registerPath("/oauth/device/code", validOauthDeviceCodeResponse) - l.registerPath("/oauth/token", validOauthTokenResponse) + l.registerPath("/oauth/device/code", validCodeResponse(l.T(), l.server.URL)) + l.registerPath("/oauth/token", validTokenResponse(l.T(), l.server.URL)) l.Error(l.runCmd("login", "--domain", "test")) } +func (l *LoginTestSuite) TestLoginWithInvalidCodeResponseURL() { + l.registerPath("/oauth/device/code", validCodeResponse(l.T(), "temporal.io")) + l.registerPath("/oauth/token", validTokenResponse(l.T(), "temporal.io")) + l.Error(l.runCmd("login", "--domain", l.server.URL)) +} + func (l *LoginTestSuite) AfterTest(_, _ string) { l.mockCtrl.Finish() l.server.Close() } + +func validCodeResponse(t *testing.T, domain string) string { + resp := OAuthDeviceCodeResponse{ + DeviceCode: "ABCD-EFGH", + UserCode: "ABCD-EFGH", + VerificationURI: domain, + VerificationURIComplete: domain, + ExpiresIn: 30, + Interval: 1, + } + + json, err := json.Marshal(resp) + if err != nil { + t.Fatalf("failed to marshal device code response: %v", err) + } + + return string(json) +} + +func validTokenResponse(t *testing.T, domain string) string { + resp := OAuthTokenResponse{ + AccessToken: "EabWErgdh", + RefreshToken: "eWKjhgT", + IDToken: "iJktYuVk", + TokenType: "Bearer", + ExpiresIn: 3600, + } + + json, err := json.Marshal(resp) + if err != nil { + t.Fatalf("failed to marshal device code response: %v", err) + } + + return string(json) +} diff --git a/app/namespace.go b/app/namespace.go index a173d6f4..25d37c73 100644 --- a/app/namespace.go +++ b/app/namespace.go @@ -5,19 +5,23 @@ import ( "encoding/base64" "errors" "fmt" - "io/ioutil" "net/mail" + "os" + "strconv" "strings" - "github.com/temporalio/tcld/protogen/api/auth/v1" "go.uber.org/multierr" + "github.com/temporalio/tcld/protogen/api/auth/v1" + "github.com/temporalio/tcld/protogen/api/sink/v1" + "github.com/kylelemons/godebug/diff" + "github.com/urfave/cli/v2" + "google.golang.org/grpc" + "github.com/temporalio/tcld/protogen/api/authservice/v1" "github.com/temporalio/tcld/protogen/api/namespace/v1" "github.com/temporalio/tcld/protogen/api/namespaceservice/v1" - "github.com/urfave/cli/v2" - "google.golang.org/grpc" ) const ( @@ -27,6 +31,9 @@ const ( caCertificateFingerprintFlagName = "ca-certificate-fingerprint" searchAttributeFlagName = "search-attribute" userNamespacePermissionFlagName = "user-namespace-permission" + codecEndpointFlagName = "endpoint" + codecPassAccessTokenFlagName = "pass-access-token" + codecIncludeCredentialsFlagName = "include-credentials" ) var ( @@ -45,16 +52,71 @@ var ( Usage: "The fingerprint of to the ca certificate", Aliases: []string{"fp"}, } - namespaceRegions = []string{ - "ap-northeast-1", - "ap-southeast-1", - "ap-southeast-2", - "ca-central-1", - "eu-central-1", - "eu-west-1", - "eu-west-2", - "us-east-1", - "us-west-2", + + sinkNameFlag = &cli.StringFlag{ + Name: "sink-name", + Usage: "Provide a name for the export sink", + Required: true, + } + sinkAssumedRoleFlagOptional = &cli.StringFlag{ + Name: "role-arn", + Usage: "Provide role arn for the IAM Role", + } + sinkAssumedRoleFlagRequired = &cli.StringFlag{ + Name: "role-arn", + Usage: "Provide role arn for the IAM Role", + Required: true, + } + s3BucketFlagOptional = &cli.StringFlag{ + Name: "s3-bucket-name", + Usage: "Provide the name of an AWS S3 bucket that Temporal will send closed workflow histories to", + } + s3BucketFlagRequired = &cli.StringFlag{ + Name: "s3-bucket-name", + Usage: "Provide the name of an AWS S3 bucket that Temporal will send closed workflow histories to", + Required: true, + } + sinkEnabledFlag = &cli.StringFlag{ + Name: "enabled", + Usage: "Whether export is enabled", + } + kmsArnFlag = &cli.StringFlag{ + Name: "kms-arn", + Usage: "Provide the ARN of the KMS key to use for encryption. Note: If the KMS ARN needs to be added or updated, user should create the IAM Role with KMS or modify the created IAM Role accordingly. Provided it as part of the input won't help", + } + pageSizeFlag = &cli.IntFlag{ + Name: "page-size", + Usage: "The page size for list operations", + Value: 100, + } + pageTokenFlag = &cli.StringFlag{ + Name: "page-token", + Usage: "The page token for list operations", + } + codecIncludeCredentialsFlag = &cli.BoolFlag{ + Name: codecIncludeCredentialsFlagName, + Usage: "Include cross-origin credentials", + Aliases: []string{"ic"}, + } + codecPassAccessTokenFlag = &cli.BoolFlag{ + Name: codecPassAccessTokenFlagName, + Usage: "Pass the user access token to the remote endpoint", + Aliases: []string{"pat"}, + } + codecEndpointFlag = &cli.StringFlag{ + Name: codecEndpointFlagName, + Usage: "The codec server endpoint to decode payloads for all users interacting with this Namespace, must be https", + Aliases: []string{"e"}, + } + serviceAccountPrincipalFlag = &cli.StringFlag{ + Name: "service-account-principal", + Usage: "service account that has access to the sink", + Required: true, + } + gcsBucketFlag = &cli.StringFlag{ + Name: "gcs-bucket", + Usage: "gcs bucket of the sink", + Required: true, } ) @@ -82,6 +144,78 @@ func GetNamespaceClient(ctx *cli.Context) (*NamespaceClient, error) { return NewNamespaceClient(ct, conn), nil } +func (c *NamespaceClient) getExportSink(ctx *cli.Context, namespaceName, sinkName string) (*sink.ExportSink, error) { + getRequest := &namespaceservice.GetExportSinkRequest{ + Namespace: namespaceName, + SinkName: sinkName, + } + + getResp, err := c.client.GetExportSink(c.ctx, getRequest) + if err != nil { + return nil, fmt.Errorf("failed to get export sink: %w", err) + } + return getResp.Sink, nil +} + +func (c *NamespaceClient) selectExportSinkResourceVersion(ctx *cli.Context, sink *sink.ExportSink) string { + if ctx.String(ResourceVersionFlagName) != "" { + return ctx.String(ResourceVersionFlagName) + } + return sink.ResourceVersion +} + +func (c *NamespaceClient) isS3BucketChange(ctx *cli.Context, sink *sink.ExportSink) bool { + if !ctx.IsSet(s3BucketFlagRequired.Name) { + return false + } + + return sink.GetSpec().GetS3Sink().GetBucketName() != ctx.String(s3BucketFlagRequired.Name) +} + +func (c *NamespaceClient) isAssumedRoleChange(ctx *cli.Context, sink *sink.ExportSink) bool { + if !ctx.IsSet(sinkAssumedRoleFlagRequired.Name) { + return false + } + + roleArn := getAssumedRoleArn(sink.GetSpec().GetS3Sink().GetAwsAccountId(), sink.GetSpec().GetS3Sink().GetRoleName()) + return roleArn != ctx.String(sinkAssumedRoleFlagRequired.Name) + +} + +func (c *NamespaceClient) isKmsArnChange(ctx *cli.Context, sink *sink.ExportSink) bool { + if !ctx.IsSet(kmsArnFlag.Name) { + return false + } + + return sink.GetSpec().GetS3Sink().GetKmsArn() != ctx.String(kmsArnFlag.Name) +} + +func (c *NamespaceClient) isSinkEnabledChange(ctx *cli.Context, sink *sink.ExportSink) (bool, error) { + if !ctx.IsSet(sinkEnabledFlag.Name) { + return false, nil + } + + enabledValue, err := strconv.ParseBool(ctx.String(sinkEnabledFlag.Name)) + if err != nil { + return false, fmt.Errorf("invalid value for enabled flag: %w. Only allowed true or false", err) + } + + if sink.GetSpec().GetEnabled() == enabledValue { + return false, nil + } + return true, nil +} + +func (c *NamespaceClient) getExportSinkResourceVersion(ctx *cli.Context, namespaceName, sinkName string) (string, error) { + sink, err := c.getExportSink(ctx, namespaceName, sinkName) + if err != nil { + return "", err + } + + resourceVersion := c.selectExportSinkResourceVersion(ctx, sink) + + return resourceVersion, nil +} func (c *NamespaceClient) deleteNamespace(ctx *cli.Context, n *namespace.Namespace) error { resourceVersion := n.ResourceVersion if v := ctx.String(ResourceVersionFlagName); v != "" { @@ -238,7 +372,7 @@ func ReadCACerts(ctx *cli.Context) (string, error) { cert := ctx.String(CaCertificateFlagName) if cert == "" { if ctx.Path(CaCertificateFileFlagName) != "" { - data, err := ioutil.ReadFile(ctx.Path(CaCertificateFileFlagName)) + data, err := os.ReadFile(ctx.Path(CaCertificateFileFlagName)) if err != nil { return "", err } @@ -260,7 +394,7 @@ func ReadCertFilters(ctx *cli.Context) ([]byte, error) { var certFilterBytes []byte var err error if len(certFilterFilepath) > 0 { - certFilterBytes, err = ioutil.ReadFile(certFilterFilepath) + certFilterBytes, err = os.ReadFile(certFilterFilepath) if err != nil { return nil, err } @@ -273,194 +407,681 @@ func ReadCertFilters(ctx *cli.Context) ([]byte, error) { func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, error) { var c *NamespaceClient - return CommandOut{ - Command: &cli.Command{ - Name: "namespace", - Aliases: []string{"n"}, - Usage: "Namespace operations", - Before: func(ctx *cli.Context) error { - var err error - c, err = getNamespaceClientFn(ctx) - return err + subCommands := []*cli.Command{ + { + Name: "create", + Usage: "Create a temporal namespace", + Aliases: []string{"c"}, + Flags: []cli.Flag{ + RequestIDFlag, + CaCertificateFlag, + &cli.StringFlag{ + Name: NamespaceFlagName, + Usage: "The namespace hosted on temporal cloud", + Aliases: []string{"n"}, + Required: true, + }, + &cli.StringSliceFlag{ + Name: namespaceRegionFlagName, + Usage: "Create namespace in specified regions; if multiple regions are selected, the first one will be the active region. See 'tcld account list-regions' to get a list of available regions for your account", + Aliases: []string{"re"}, + Required: true, + }, + &cli.IntFlag{ + Name: RetentionDaysFlagName, + Usage: "The retention of the namespace in days", + Aliases: []string{"rd"}, + Value: 30, + }, + &cli.PathFlag{ + Name: CaCertificateFileFlagName, + Usage: "The path to the ca pem file", + Aliases: []string{"cf"}, + }, + &cli.PathFlag{ + Name: certificateFilterFileFlagName, + Usage: `Path to a JSON file that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"cff"}, + }, + &cli.StringFlag{ + Name: certificateFilterInputFlagName, + Usage: `JSON that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"cfi"}, + }, + &cli.StringSliceFlag{ + Name: searchAttributeFlagName, + Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"name=type\"; valid types are: %v", getSearchAttributeTypes()), + Aliases: []string{"sa"}, + }, + &cli.StringSliceFlag{ + Name: userNamespacePermissionFlagName, + Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"email=permission\"; valid permissions are: %v", getNamespacePermissionTypes()), + Aliases: []string{"p"}, + }, + codecEndpointFlag, + codecPassAccessTokenFlag, + codecIncludeCredentialsFlag, + }, + Action: func(ctx *cli.Context) error { + n := &namespace.Namespace{ + RequestId: ctx.String(RequestIDFlagName), + Namespace: ctx.String(NamespaceFlagName), + } + + n.Spec = &namespace.NamespaceSpec{ + Region: ctx.String(namespaceRegionFlagName), + } + regions := ctx.StringSlice(namespaceRegionFlagName) + if len(regions) == 0 { + return fmt.Errorf("namespace region is required") + } + if len(regions) > 2 { + return fmt.Errorf("namespace can only be replicated up to 2 regions") + } + n.Spec = &namespace.NamespaceSpec{ + Region: regions[0], + PassiveRegions: regions[1:], + } + + // certs (required) + cert, err := ReadCACerts(ctx) + if err != nil { + return err + } + n.Spec.AcceptedClientCa = cert + + // retention (required) + retention := ctx.Int(RetentionDaysFlagName) + if retention < 1 { + return fmt.Errorf("retention cannot be 0 or negative") + } + n.Spec.RetentionDays = int32(retention) + + // user namespace permissions (optional) + var unp []*auth.UserNamespacePermissions + userNamespacePermissionFlags := ctx.StringSlice(userNamespacePermissionFlagName) + if len(userNamespacePermissionFlags) > 0 { + unpMap, err := toUserNamespacePermissionsMap(userNamespacePermissionFlags) + if err != nil { + return err + } + unp, err = c.toUserNamespacePermissions(unpMap) + if err != nil { + return err + } + } + + // cert filters (optional) + certFilterBytes, err := ReadCertFilters(ctx) + if err != nil { + return err + } + if len(certFilterBytes) > 0 { + newFilters, err := parseCertificateFilters(certFilterBytes) + if err != nil { + return err + } + n.Spec.CertificateFilters = append(n.Spec.CertificateFilters, newFilters.toSpec()...) + } + + // search attributes (optional) + searchAttributes := ctx.StringSlice(searchAttributeFlagName) + if len(searchAttributes) > 0 { + csa, err := toSearchAttributes(searchAttributes) + if err != nil { + return err + } + if n.Spec.SearchAttributes == nil { + n.Spec.SearchAttributes = make(map[string]namespace.SearchAttributeType) + } + for attrName, attrType := range csa { + if _, ok := n.Spec.SearchAttributes[attrName]; ok { + return fmt.Errorf("attribute with name '%s' already exists", attrName) + } else { + n.Spec.SearchAttributes[attrName] = attrType + } + } + } + + codecEndpoint := ctx.String(codecEndpointFlagName) + // codec server spec is optional, if specified, we need to create the spec and pass along to the API + if codecEndpoint != "" { + err = validateCodecEndpoint(codecEndpoint) + if err != nil { + return err + } + n.Spec.CodecSpec = &namespace.CodecServerPropertySpec{ + Endpoint: codecEndpoint, + PassAccessToken: ctx.Bool(codecPassAccessTokenFlagName), + IncludeCredentials: ctx.Bool(codecIncludeCredentialsFlagName), + } + } else { + if ctx.Bool(codecPassAccessTokenFlagName) || ctx.Bool(codecIncludeCredentialsFlagName) { + return errors.New("pass-access-token or include-credentials cannot be specified when codec endpoint is not specified") + } + } + + return c.createNamespace(n, unp) + }, + }, + { + Name: "delete", + Usage: "Delete a temporal namespace", + Aliases: []string{"d"}, + Flags: []cli.Flag{ + RequestIDFlag, + ResourceVersionFlag, + &cli.StringFlag{ + Name: NamespaceFlagName, + Usage: "The namespace hosted on temporal cloud", + Aliases: []string{"n"}, + Required: true, + }, }, + Action: func(ctx *cli.Context) error { + namespaceName := ctx.String(NamespaceFlagName) + yes, err := ConfirmPrompt(ctx, + fmt.Sprintf( + "Deleting a namespace will remove it completely and is not reversible.\nDo you still want to delete namespace \"%s\"?", + namespaceName, + ), + ) + if err != nil { + return err + } + if !yes { + return nil + } + n, err := c.getNamespace(namespaceName) + if err != nil { + return err + } + return c.deleteNamespace(ctx, n) + }, + }, + { + Name: "list", + Usage: "List all known namespaces", + Aliases: []string{"l"}, + Flags: []cli.Flag{}, + Action: func(ctx *cli.Context) error { + return c.listNamespaces() + }, + }, + { + Name: "get", + Usage: "Get namespace information", + Aliases: []string{"g"}, + Flags: []cli.Flag{ + NamespaceFlag, + }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + return PrintProto(n) + }, + }, + { + Name: "accepted-client-ca", + Usage: "Manage client ca certificate used to verify client connections", + Aliases: []string{"ca"}, Subcommands: []*cli.Command{ { - Name: "create", - Usage: "Create a temporal namespace", - Aliases: []string{"c"}, + Name: "list", + Aliases: []string{"l"}, + Usage: "List the accepted client ca certificates currently configured for the namespace", Flags: []cli.Flag{ + NamespaceFlag, + }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + out, err := parseCertificates(n.Spec.AcceptedClientCa) + if err != nil { + return err + } + return PrintObj(out) + }, + }, + { + Name: "add", + Aliases: []string{"a"}, + Usage: "Add a new ca accepted client ca certificate", + Flags: []cli.Flag{ + NamespaceFlag, RequestIDFlag, + ResourceVersionFlag, CaCertificateFlag, - &cli.StringFlag{ - Name: NamespaceFlagName, - Usage: "The namespace hosted on temporal cloud", - Aliases: []string{"n"}, - Required: true, - }, - &cli.StringFlag{ - Name: namespaceRegionFlagName, - Usage: fmt.Sprintf("Create namespace in this region; valid regions are: %v", namespaceRegions), - Aliases: []string{"re"}, - Required: true, - }, - &cli.IntFlag{ - Name: RetentionDaysFlagName, - Usage: "The retention of the namespace in days", - Aliases: []string{"rd"}, - Value: 30, - }, - &cli.PathFlag{ - Name: CaCertificateFileFlagName, - Usage: "The path to the ca pem file", - Aliases: []string{"cf"}, - }, + CaCertificateFileFlag, + }, + Action: func(ctx *cli.Context) error { + newCerts, err := readAndParseCACerts(ctx) + if err != nil { + return err + } + n, existingCerts, err := c.parseExistingCerts(ctx) + if err != nil { + return err + } + existingCerts, err = addCerts(existingCerts, newCerts) + if err != nil { + return err + } + bundle, err := existingCerts.bundle() + if err != nil { + return err + } + if n.Spec.AcceptedClientCa == bundle { + return errors.New("nothing to change") + } + n.Spec.AcceptedClientCa = bundle + return c.updateNamespace(ctx, n) + }, + }, + { + Name: "remove", + Aliases: []string{"r"}, + Usage: "Remove existing certificates", + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + CaCertificateFlag, + CaCertificateFileFlag, + caCertificateFingerprintFlag, + }, + Action: func(ctx *cli.Context) error { + n, existingCerts, err := c.parseExistingCerts(ctx) + if err != nil { + return err + } + var certs caCerts + if ctx.String(caCertificateFingerprintFlagName) != "" { + certs, err = removeCertWithFingerprint( + existingCerts, + ctx.String(caCertificateFingerprintFlagName), + ) + if err != nil { + return err + } + } else { + readCerts, err := readAndParseCACerts(ctx) + if err != nil { + return err + } + certs, err = removeCerts(existingCerts, readCerts) + if err != nil { + return err + } + } + bundle, err := certs.bundle() + if err != nil { + return err + } + if n.Spec.AcceptedClientCa == bundle { + return errors.New("nothing to change") + } + n.Spec.AcceptedClientCa = bundle + y, err := ConfirmPrompt(ctx, "removing ca certificates can cause connectivity disruption if there are any clients using certificates that cannot be verified. confirm remove?") + if err != nil || !y { + return err + } + return c.updateNamespace(ctx, n) + }, + }, + { + Name: "set", + Aliases: []string{"s"}, + Usage: "Set the accepted client ca certificate", + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + CaCertificateFlag, + CaCertificateFileFlag, + }, + Action: func(ctx *cli.Context) error { + cert, err := ReadCACerts(ctx) + if err != nil { + return err + } + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + if n.Spec.AcceptedClientCa == cert { + return errors.New("nothing to change") + } + n.Spec.AcceptedClientCa = cert + return c.updateNamespace(ctx, n) + }, + }, + }, + }, + { + Name: "certificate-filters", + Usage: "Manage optional certificate filters used by namespace to authorize client certificates based on distinguished name fields", + Aliases: []string{"cf"}, + Subcommands: []*cli.Command{ + { + Name: "import", + Usage: "Sets the certificate filters on the namespace. Existing filters will be replaced.", + Aliases: []string{"imp"}, + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, &cli.PathFlag{ Name: certificateFilterFileFlagName, - Usage: `Path to a JSON file that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"cff"}, + Usage: `Path to a JSON file that defines the certificate filters that will be configured on the namespace. This will replace the existing filter configuration. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"file", "f"}, }, &cli.StringFlag{ Name: certificateFilterInputFlagName, - Usage: `JSON that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"cfi"}, - }, - &cli.StringSliceFlag{ - Name: searchAttributeFlagName, - Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"name=type\"; valid types are: %v", getSearchAttributeTypes()), - Aliases: []string{"sa"}, - }, - &cli.StringSliceFlag{ - Name: userNamespacePermissionFlagName, - Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"email=permission\"; valid permissions are: %v", getNamespacePermissionTypes()), - Aliases: []string{"p"}, + Usage: `JSON that defines the certificate filters that will be configured on the namespace. This will replace the existing filter configuration. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"input", "i"}, }, }, Action: func(ctx *cli.Context) error { - n := &namespace.Namespace{ - RequestId: ctx.String(RequestIDFlagName), - Namespace: ctx.String(NamespaceFlagName), + fileFlagSet := ctx.Path(certificateFilterFileFlagName) != "" + inputFlagSet := ctx.String(certificateFilterInputFlagName) != "" + + if fileFlagSet == inputFlagSet { + return errors.New("exactly one of the certificate-filter-file or certificate-filter-input flags must be specified") + } + + var jsonBytes []byte + var err error + + if fileFlagSet { + jsonBytes, err = os.ReadFile(ctx.Path(certificateFilterFileFlagName)) + if err != nil { + return err + } + } + + if inputFlagSet { + jsonBytes = []byte(ctx.String(certificateFilterInputFlagName)) } - // region (required) - region := ctx.String(namespaceRegionFlagName) - if err := validateNamespaceRegion(region); err != nil { + replacementFilters, err := parseCertificateFilters(jsonBytes) + if err != nil { return err } - n.Spec = &namespace.NamespaceSpec{ - Region: region, + + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err } - // certs (required) - cert, err := ReadCACerts(ctx) + difference, err := compareCertificateFilters(fromSpec(n.Spec.CertificateFilters), replacementFilters) if err != nil { return err } - n.Spec.AcceptedClientCa = cert - // retention (required) - retention := ctx.Int(RetentionDaysFlagName) - if retention < 1 { - return fmt.Errorf("retention cannot be 0 or negative") + fmt.Println("this import will result in the following changes to certificate filters:") + fmt.Println(difference) + + confirmed, err := ConfirmPrompt(ctx, "confirm certificate filter import operation") + if err != nil { + return err } - n.Spec.RetentionDays = int32(retention) - // user namespace permissions (optional) - var unp []*auth.UserNamespacePermissions - userNamespacePermissionFlags := ctx.StringSlice(userNamespacePermissionFlagName) - if len(userNamespacePermissionFlags) > 0 { - unpMap, err := toUserNamespacePermissionsMap(userNamespacePermissionFlags) - if err != nil { - return err - } - unp, err = c.toUserNamespacePermissions(unpMap) - if err != nil { - return err - } + if confirmed { + n.Spec.CertificateFilters = replacementFilters.toSpec() + return c.updateNamespace(ctx, n) } - // cert filters (optional) - certFilterBytes, err := ReadCertFilters(ctx) + fmt.Println("operation canceled") + return nil + }, + }, + { + Name: "export", + Usage: "Exports existing certificate filters on the namespace", + Aliases: []string{"exp"}, + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + &cli.PathFlag{ + Name: certificateFilterFileFlagName, + Usage: "Path to a JSON file where tcld will export the certificate filter configuration to", + Aliases: []string{"file", "f"}, + }, + }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) if err != nil { return err } - if len(certFilterBytes) > 0 { - newFilters, err := parseCertificateFilters(certFilterBytes) - if err != nil { - return err - } - n.Spec.CertificateFilters = append(n.Spec.CertificateFilters, newFilters.toSpec()...) + + filters := fromSpec(n.Spec.CertificateFilters) + if err := PrintObj(filters); err != nil { + return err } - // search attributes (optional) - searchAttributes := ctx.StringSlice(searchAttributeFlagName) - if len(searchAttributes) > 0 { - csa, err := toSearchAttributes(searchAttributes) - if err != nil { + jsonString, err := FormatJson(filters) + if err != nil { + return err + } + + exportFile := ctx.Path(certificateFilterFileFlagName) + if exportFile != "" { + if err := os.WriteFile(exportFile, []byte(jsonString), 0644); err != nil { return err } - if n.Spec.SearchAttributes == nil { - n.Spec.SearchAttributes = make(map[string]namespace.SearchAttributeType) - } - for attrName, attrType := range csa { - if _, ok := n.Spec.SearchAttributes[attrName]; ok { - return fmt.Errorf("attribute with name '%s' already exists", attrName) - } else { - n.Spec.SearchAttributes[attrName] = attrType - } - } } - return c.createNamespace(n, unp) + return nil + }, + }, + { + Name: "clear", + Usage: "Clears all certificate filters on the namespace. Note that this will allow *any* client certificate that chains up to a configured CA in the bundle to connect to the namespace", + Aliases: []string{"c"}, + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + + fmt.Println("all certificate filters will be removed:") + if err := PrintObj(fromSpec(n.Spec.CertificateFilters)); err != nil { + return err + } + + confirmed, err := ConfirmPrompt(ctx, "this will allow any client certificate that chains up to a configured CA in the bundle to connect to the namespace. confirm clear operation") + if err != nil { + return err + } + + if confirmed { + n.Spec.CertificateFilters = nil + return c.updateNamespace(ctx, n) + } + + fmt.Println("operation canceled") + return nil }, }, { - Name: "delete", - Usage: "Delete a temporal namespace", - Aliases: []string{"d"}, + Name: "add", + Usage: "Adds additional certificate filters to the namespace", + Aliases: []string{"a"}, Flags: []cli.Flag{ + NamespaceFlag, RequestIDFlag, ResourceVersionFlag, + &cli.PathFlag{ + Name: certificateFilterFileFlagName, + Usage: `Path to a JSON file that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"file", "f"}, + }, &cli.StringFlag{ - Name: NamespaceFlagName, - Usage: "The namespace hosted on temporal cloud", - Aliases: []string{"n"}, - Required: true, + Name: certificateFilterInputFlagName, + Usage: `JSON that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, + Aliases: []string{"input", "i"}, }, }, Action: func(ctx *cli.Context) error { - namespaceName := ctx.String(NamespaceFlagName) - yes, err := ConfirmPrompt(ctx, - fmt.Sprintf( - "Deleting a namespace will remove it completely and is not reversible.\nDo you still want to delete namespace \"%s\"?", - namespaceName, - ), - ) + fileFlagSet := ctx.Path(certificateFilterFileFlagName) != "" + inputFlagSet := ctx.String(certificateFilterInputFlagName) != "" + + if fileFlagSet == inputFlagSet { + return errors.New("exactly one of the certificate-filter-file or certificate-filter-input flags must be specified") + } + + var jsonBytes []byte + var err error + + if fileFlagSet { + jsonBytes, err = os.ReadFile(ctx.Path(certificateFilterFileFlagName)) + if err != nil { + return err + } + } + + if inputFlagSet { + jsonBytes = []byte(ctx.String(certificateFilterInputFlagName)) + } + + newFilters, err := parseCertificateFilters(jsonBytes) if err != nil { return err } - if !yes { - return nil + + if len(newFilters.toSpec()) == 0 { + return errors.New("no new filters to add") } - n, err := c.getNamespace(namespaceName) + + fmt.Println("the following certificate filters will be added to the namespace:") + if err := PrintObj(newFilters); err != nil { + return err + } + + confirmed, err := ConfirmPrompt(ctx, "confirm add operation") if err != nil { return err } - return c.deleteNamespace(ctx, n) + + if confirmed { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + + n.Spec.CertificateFilters = append(n.Spec.CertificateFilters, newFilters.toSpec()...) + return c.updateNamespace(ctx, n) + } + + fmt.Println("operation canceled") + return nil }, }, + }, + }, + { + Name: "update-codec-server", + Usage: "Update codec server config used to decode encoded payloads through remote endpoint", + Aliases: []string{"ucs"}, + Flags: []cli.Flag{ + NamespaceFlag, + &cli.StringFlag{ + Name: codecEndpointFlag.Name, + Usage: codecEndpointFlag.Usage, + Aliases: codecEndpointFlag.Aliases, + Required: true, + }, + codecPassAccessTokenFlag, + codecIncludeCredentialsFlag, + }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + + codecEndpoint := ctx.String(codecEndpointFlagName) + err = validateCodecEndpoint(codecEndpoint) + if err != nil { + return err + } + replacement := &namespace.CodecServerPropertySpec{ + Endpoint: codecEndpoint, + PassAccessToken: ctx.Bool(codecPassAccessTokenFlagName), + IncludeCredentials: ctx.Bool(codecIncludeCredentialsFlagName), + } + + difference, err := compareCodecSpec(n.Spec.CodecSpec, replacement) + if err != nil { + return err + } + + fmt.Println("this update will result in the following changes to the codec server config:") + fmt.Println(difference) + + confirmed, err := ConfirmPrompt(ctx, "confirm codec server update operation") + if err != nil { + return err + } + + if confirmed { + n.Spec.CodecSpec = replacement + return c.updateNamespace(ctx, n) + } + + fmt.Println("operation canceled") + return nil + }, + }, + { + Name: "retention", + Usage: "Manages configuration of the length of time (in days) a closed workflow will be preserved before deletion", + Aliases: []string{"r"}, + Subcommands: []*cli.Command{ { - Name: "list", - Usage: "List all known namespaces", - Aliases: []string{"l"}, - Flags: []cli.Flag{}, + Name: "set", + Aliases: []string{"s"}, + Usage: "Set the length of time (in days) a closed workflow will be preserved before deletion for a given namespace", + Flags: []cli.Flag{ + NamespaceFlag, + ResourceVersionFlag, + RetentionDaysFlag, + RequestIDFlag, + }, Action: func(ctx *cli.Context) error { - return c.listNamespaces() + retention := ctx.Int(RetentionDaysFlagName) + if retention == 0 { + return fmt.Errorf("retention must be at least 1 day in duration") + } + if retention < 0 { + return fmt.Errorf("retention cannot be negative") + } + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + if int32(retention) == n.Spec.RetentionDays { + return fmt.Errorf("retention for namespace is already set at %d days", ctx.Int(RetentionDaysFlagName)) + } + n.Spec.RetentionDays = int32(retention) + return c.updateNamespace(ctx, n) }, }, { Name: "get", - Usage: "Get namespace information", Aliases: []string{"g"}, + Usage: "Retrieve the length of time (in days) a closed workflow will be preserved before deletion for a given namespace", Flags: []cli.Flag{ NamespaceFlag, }, @@ -469,519 +1090,437 @@ func NewNamespaceCommand(getNamespaceClientFn GetNamespaceClientFn) (CommandOut, if err != nil { return err } - return PrintProto(n) + fmt.Println(n.Spec.RetentionDays) + return nil }, }, + }, + }, + { + Name: "search-attributes", + Usage: "Manage search attributes used by namespace", + Aliases: []string{"sa"}, + Subcommands: []*cli.Command{ { - Name: "accepted-client-ca", - Usage: "Manage client ca certificate used to verify client connections", - Aliases: []string{"ca"}, - Subcommands: []*cli.Command{ - { - Name: "list", - Aliases: []string{"l"}, - Usage: "List the accepted client ca certificates currently configured for the namespace", - Flags: []cli.Flag{ - NamespaceFlag, - }, - Action: func(ctx *cli.Context) error { - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - out, err := parseCertificates(n.Spec.AcceptedClientCa) - if err != nil { - return err - } - return PrintObj(out) - }, - }, - { - Name: "add", - Aliases: []string{"a"}, - Usage: "Add a new ca accepted client ca certificate", - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - CaCertificateFlag, - CaCertificateFileFlag, - }, - Action: func(ctx *cli.Context) error { - newCerts, err := readAndParseCACerts(ctx) - if err != nil { - return err - } - n, existingCerts, err := c.parseExistingCerts(ctx) - if err != nil { - return err - } - existingCerts, err = addCerts(existingCerts, newCerts) - if err != nil { - return err - } - bundle, err := existingCerts.bundle() - if err != nil { - return err - } - if n.Spec.AcceptedClientCa == bundle { - return errors.New("nothing to change") - } - n.Spec.AcceptedClientCa = bundle - return c.updateNamespace(ctx, n) - }, - }, - { - Name: "remove", - Aliases: []string{"r"}, - Usage: "Remove existing certificates", - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - CaCertificateFlag, - CaCertificateFileFlag, - caCertificateFingerprintFlag, - }, - Action: func(ctx *cli.Context) error { - n, existingCerts, err := c.parseExistingCerts(ctx) - if err != nil { - return err - } - var certs caCerts - if ctx.String(caCertificateFingerprintFlagName) != "" { - certs, err = removeCertWithFingerprint( - existingCerts, - ctx.String(caCertificateFingerprintFlagName), - ) - if err != nil { - return err - } - } else { - readCerts, err := readAndParseCACerts(ctx) - if err != nil { - return err - } - certs, err = removeCerts(existingCerts, readCerts) - if err != nil { - return err - } - } - bundle, err := certs.bundle() - if err != nil { - return err - } - if n.Spec.AcceptedClientCa == bundle { - return errors.New("nothing to change") - } - n.Spec.AcceptedClientCa = bundle - y, err := ConfirmPrompt(ctx, "removing ca certificates can cause connectivity disruption if there are any clients using certificates that cannot be verified. confirm remove?") - if err != nil || !y { - return err - } - return c.updateNamespace(ctx, n) - }, - }, - { - Name: "set", - Aliases: []string{"s"}, - Usage: "Set the accepted client ca certificate", - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - CaCertificateFlag, - CaCertificateFileFlag, - }, - Action: func(ctx *cli.Context) error { - cert, err := ReadCACerts(ctx) - if err != nil { - return err - } - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - if n.Spec.AcceptedClientCa == cert { - return errors.New("nothing to change") - } - n.Spec.AcceptedClientCa = cert - return c.updateNamespace(ctx, n) - }, + Name: "add", + Usage: "Add a new namespace custom search attribute", + Aliases: []string{"a"}, + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + &cli.StringSliceFlag{ + Name: "search-attribute", + Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"name=type\"; valid types are: %v", getSearchAttributeTypes()), + Aliases: []string{"sa"}, + Required: true, }, }, + Action: func(ctx *cli.Context) error { + csa, err := toSearchAttributes(ctx.StringSlice(searchAttributeFlagName)) + if err != nil { + return err + } + n, err := c.getNamespace(ctx.String(NamespaceFlagName)) + if err != nil { + return err + } + if n.Spec.SearchAttributes == nil { + n.Spec.SearchAttributes = make(map[string]namespace.SearchAttributeType) + } + for attrName, attrType := range csa { + if _, ok := n.Spec.SearchAttributes[attrName]; ok { + return fmt.Errorf("attribute with name '%s' already exists", attrName) + } else { + n.Spec.SearchAttributes[attrName] = attrType + } + } + + return c.updateNamespace(ctx, n) + }, }, { - Name: "certificate-filters", - Usage: "Manage optional certificate filters used by namespace to authorize client certificates based on distinguished name fields", - Aliases: []string{"cf"}, - Subcommands: []*cli.Command{ - { - Name: "import", - Usage: "Sets the certificate filters on the namespace. Existing filters will be replaced.", - Aliases: []string{"imp"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - &cli.PathFlag{ - Name: certificateFilterFileFlagName, - Usage: `Path to a JSON file that defines the certificate filters that will be configured on the namespace. This will replace the existing filter configuration. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"file", "f"}, - }, - &cli.StringFlag{ - Name: certificateFilterInputFlagName, - Usage: `JSON that defines the certificate filters that will be configured on the namespace. This will replace the existing filter configuration. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"input", "i"}, - }, - }, - Action: func(ctx *cli.Context) error { - fileFlagSet := ctx.Path(certificateFilterFileFlagName) != "" - inputFlagSet := ctx.String(certificateFilterInputFlagName) != "" - - if fileFlagSet == inputFlagSet { - return errors.New("exactly one of the certificate-filter-file or certificate-filter-input flags must be specified") - } - - var jsonBytes []byte - var err error - - if fileFlagSet { - jsonBytes, err = ioutil.ReadFile(ctx.Path(certificateFilterFileFlagName)) - if err != nil { - return err - } - } - - if inputFlagSet { - jsonBytes = []byte(ctx.String(certificateFilterInputFlagName)) - } - - replacementFilters, err := parseCertificateFilters(jsonBytes) - if err != nil { - return err - } - - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - - difference, err := compareCertificateFilters(fromSpec(n.Spec.CertificateFilters), replacementFilters) - if err != nil { - return err - } - - fmt.Println("this import will result in the following changes to certificate filters:") - fmt.Println(difference) - - confirmed, err := ConfirmPrompt(ctx, "confirm certificate filter import operation") - if err != nil { - return err - } - - if confirmed { - n.Spec.CertificateFilters = replacementFilters.toSpec() - return c.updateNamespace(ctx, n) - } - - fmt.Println("operation canceled") - return nil - }, - }, - { - Name: "export", - Usage: "Exports existing certificate filters on the namespace", - Aliases: []string{"exp"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - &cli.PathFlag{ - Name: certificateFilterFileFlagName, - Usage: "Path to a JSON file where tcld will export the certificate filter configuration to", - Aliases: []string{"file", "f"}, - }, - }, - Action: func(ctx *cli.Context) error { - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - - filters := fromSpec(n.Spec.CertificateFilters) - if err := PrintObj(filters); err != nil { - return err - } - - jsonString, err := FormatJson(filters) - if err != nil { - return err - } - - exportFile := ctx.Path(certificateFilterFileFlagName) - if exportFile != "" { - if err := ioutil.WriteFile(exportFile, []byte(jsonString), 0644); err != nil { - return err - } - } - - return nil - }, - }, - { - Name: "clear", - Usage: "Clears all certificate filters on the namespace. Note that this will allow *any* client certificate that chains up to a configured CA in the bundle to connect to the namespace", - Aliases: []string{"c"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - }, - Action: func(ctx *cli.Context) error { - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - - fmt.Println("all certificate filters will be removed:") - if err := PrintObj(fromSpec(n.Spec.CertificateFilters)); err != nil { - return err - } - - confirmed, err := ConfirmPrompt(ctx, "this will allow any client certificate that chains up to a configured CA in the bundle to connect to the namespace. confirm clear operation") - if err != nil { - return err - } - - if confirmed { - n.Spec.CertificateFilters = nil - return c.updateNamespace(ctx, n) - } - - fmt.Println("operation canceled") - return nil - }, + Name: "rename", + Usage: "Update the name of an existing custom search attribute", + Aliases: []string{"rn"}, + Flags: []cli.Flag{ + NamespaceFlag, + RequestIDFlag, + ResourceVersionFlag, + &cli.StringFlag{ + Name: "existing-name", + Usage: "The name of an existing search attribute", + Aliases: []string{"en"}, + Required: true, }, - { - Name: "add", - Usage: "Adds additional certificate filters to the namespace", - Aliases: []string{"a"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - &cli.PathFlag{ - Name: certificateFilterFileFlagName, - Usage: `Path to a JSON file that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"file", "f"}, - }, - &cli.StringFlag{ - Name: certificateFilterInputFlagName, - Usage: `JSON that defines the certificate filters that will be added to the namespace. Sample JSON: { "filters": [ { "commonName": "test1" } ] }`, - Aliases: []string{"input", "i"}, - }, - }, - Action: func(ctx *cli.Context) error { - fileFlagSet := ctx.Path(certificateFilterFileFlagName) != "" - inputFlagSet := ctx.String(certificateFilterInputFlagName) != "" - - if fileFlagSet == inputFlagSet { - return errors.New("exactly one of the certificate-filter-file or certificate-filter-input flags must be specified") - } - - var jsonBytes []byte - var err error - - if fileFlagSet { - jsonBytes, err = ioutil.ReadFile(ctx.Path(certificateFilterFileFlagName)) - if err != nil { - return err - } - } - - if inputFlagSet { - jsonBytes = []byte(ctx.String(certificateFilterInputFlagName)) - } - - newFilters, err := parseCertificateFilters(jsonBytes) - if err != nil { - return err - } - - if len(newFilters.toSpec()) == 0 { - return errors.New("no new filters to add") - } - - fmt.Println("the following certificate filters will be added to the namespace:") - if err := PrintObj(newFilters); err != nil { - return err - } - - confirmed, err := ConfirmPrompt(ctx, "confirm add operation") - if err != nil { - return err - } - - if confirmed { - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - - n.Spec.CertificateFilters = append(n.Spec.CertificateFilters, newFilters.toSpec()...) - return c.updateNamespace(ctx, n) - } - - fmt.Println("operation canceled") - return nil - }, + &cli.StringFlag{ + Name: "new-name", + Usage: "The new name for the search attribute", + Aliases: []string{"nn"}, + Required: true, }, }, + Action: func(ctx *cli.Context) error { + n, err := c.getNamespace( + ctx.String(NamespaceFlagName), + ) + if err != nil { + return err + } + existingName := ctx.String("existing-name") + if _, exists := n.Spec.SearchAttributes[existingName]; !exists { + return fmt.Errorf("search attribute with name '%s' does not exist", ctx.String("existing-name")) + } + newName := ctx.String("new-name") + if _, exists := n.Spec.SearchAttributes[newName]; exists { + return fmt.Errorf("search attribute with new name '%s' already exists", ctx.String("new-name")) + } + y, err := ConfirmPrompt(ctx, "renaming search attribute may cause failures if any worker is still using the old name of the search-attributes. confirm rename?") + if err != nil || !y { + return err + } + return c.renameSearchAttribute(ctx, n, existingName, newName) + }, }, - { - Name: "retention", - Usage: "Manages configuration of the length of time (in days) a closed workflow will be preserved before deletion", - Aliases: []string{"r"}, - Subcommands: []*cli.Command{ - { - Name: "set", - Aliases: []string{"s"}, - Usage: "Set the length of time (in days) a closed workflow will be preserved before deletion for a given namespace", - Flags: []cli.Flag{ - NamespaceFlag, - ResourceVersionFlag, - RetentionDaysFlag, - RequestIDFlag, - }, - Action: func(ctx *cli.Context) error { - retention := ctx.Int(RetentionDaysFlagName) - if retention == 0 { - return fmt.Errorf("retention must be at least 1 day in duration") - } - if retention < 0 { - return fmt.Errorf("retention cannot be negative") - } - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - if int32(retention) == n.Spec.RetentionDays { - return fmt.Errorf("retention for namespace is already set at %d days", ctx.Int(RetentionDaysFlagName)) - } - n.Spec.RetentionDays = int32(retention) - return c.updateNamespace(ctx, n) - }, - }, - { - Name: "get", - Aliases: []string{"g"}, - Usage: "Retrieve the length of time (in days) a closed workflow will be preserved before deletion for a given namespace", - Flags: []cli.Flag{ - NamespaceFlag, - }, - Action: func(ctx *cli.Context) error { - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - fmt.Println(n.Spec.RetentionDays) - return nil + }, + }, + } + + // Export Related Command + exportCommand := &cli.Command{ + Name: "export", + Usage: "Manage export", + Aliases: []string{"es"}, + } + + export_s3_commands := &cli.Command{ + Name: "s3", + Usage: "Manage S3 export sink", + Subcommands: []*cli.Command{ + { + Name: "create", + Aliases: []string{"c"}, + Usage: "Create export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + sinkAssumedRoleFlagRequired, + s3BucketFlagRequired, + RequestIDFlag, + kmsArnFlag, + }, + Action: func(ctx *cli.Context) error { + awsAccountID, roleName, err := parseAssumedRole(ctx.String(sinkAssumedRoleFlagRequired.Name)) + if err != nil { + return err + } + + namespace := ctx.String(NamespaceFlagName) + ns, err := c.getNamespace(namespace) + if err != nil { + return fmt.Errorf("unable to get namespace: %v", err) + } + + request := &namespaceservice.CreateExportSinkRequest{ + Namespace: namespace, + Spec: &sink.ExportSinkSpec{ + Name: ctx.String(sinkNameFlag.Name), + Enabled: true, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: roleName, + BucketName: ctx.String(s3BucketFlagRequired.Name), + Region: ns.Spec.Region, + KmsArn: ctx.String(kmsArnFlag.Name), + AwsAccountId: awsAccountID, }, }, - }, + RequestId: ctx.String(RequestIDFlagName), + } + + res, err := c.client.CreateExportSink(c.ctx, request) + if err != nil { + return err + } + + return PrintProto(res.RequestStatus) }, - { - Name: "search-attributes", - Usage: "Manage search attributes used by namespace", - Aliases: []string{"sa"}, - Subcommands: []*cli.Command{ - { - Name: "add", - Usage: "Add a new namespace custom search attribute", - Aliases: []string{"a"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - &cli.StringSliceFlag{ - Name: "search-attribute", - Usage: fmt.Sprintf("Flag can be used multiple times; value must be \"name=type\"; valid types are: %v", getSearchAttributeTypes()), - Aliases: []string{"sa"}, - Required: true, - }, - }, - Action: func(ctx *cli.Context) error { - csa, err := toSearchAttributes(ctx.StringSlice(searchAttributeFlagName)) - if err != nil { - return err - } - n, err := c.getNamespace(ctx.String(NamespaceFlagName)) - if err != nil { - return err - } - if n.Spec.SearchAttributes == nil { - n.Spec.SearchAttributes = make(map[string]namespace.SearchAttributeType) - } - for attrName, attrType := range csa { - if _, ok := n.Spec.SearchAttributes[attrName]; ok { - return fmt.Errorf("attribute with name '%s' already exists", attrName) - } else { - n.Spec.SearchAttributes[attrName] = attrType - } - } - - return c.updateNamespace(ctx, n) + }, + { + Name: "get", + Aliases: []string{"g"}, + Usage: "Get export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + }, + Action: func(ctx *cli.Context) error { + sink, err := c.getExportSink(ctx, ctx.String(NamespaceFlagName), ctx.String(sinkNameFlag.Name)) + + if err != nil { + return err + } + + return PrintProto(sink) + }, + }, + { + Name: "validate", + Usage: "Validate export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + sinkAssumedRoleFlagRequired, + s3BucketFlagRequired, + kmsArnFlag, + }, + Action: func(ctx *cli.Context) error { + namespace := ctx.String(NamespaceFlagName) + ns, err := c.getNamespace(namespace) + if err != nil { + return fmt.Errorf("validation failed: unable to get namespace: %v", err) + } + + awsAccountID, roleName, err := parseAssumedRole(ctx.String(sinkAssumedRoleFlagRequired.Name)) + if err != nil { + return fmt.Errorf("validation failed: %v", err) + } + + validateRequest := &namespaceservice.ValidateExportSinkRequest{ + Namespace: ctx.String(NamespaceFlagName), + Spec: &sink.ExportSinkSpec{ + Name: ctx.String(sinkNameFlag.Name), + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: roleName, + BucketName: ctx.String(s3BucketFlagRequired.Name), + Region: ns.Spec.Region, + KmsArn: ctx.String(kmsArnFlag.Name), + AwsAccountId: awsAccountID, }, }, - { - Name: "rename", - Usage: "Update the name of an existing custom search attribute", - Aliases: []string{"rn"}, - Flags: []cli.Flag{ - NamespaceFlag, - RequestIDFlag, - ResourceVersionFlag, - &cli.StringFlag{ - Name: "existing-name", - Usage: "The name of an existing search attribute", - Aliases: []string{"en"}, - Required: true, - }, - &cli.StringFlag{ - Name: "new-name", - Usage: "The new name for the search attribute", - Aliases: []string{"nn"}, - Required: true, - }, - }, - Action: func(ctx *cli.Context) error { - n, err := c.getNamespace( - ctx.String(NamespaceFlagName), - ) - if err != nil { - return err - } - existingName := ctx.String("existing-name") - if _, exists := n.Spec.SearchAttributes[existingName]; !exists { - return fmt.Errorf("search attribute with name '%s' does not exist", ctx.String("existing-name")) - } - newName := ctx.String("new-name") - if _, exists := n.Spec.SearchAttributes[newName]; exists { - return fmt.Errorf("search attribute with new name '%s' already exists", ctx.String("new-name")) - } - y, err := ConfirmPrompt(ctx, "renaming search attribute may cause failures if any worker is still using the old name of the search-attributes. confirm rename?") - if err != nil || !y { - return err - } - return c.renameSearchAttribute(ctx, n, existingName, newName) + } + + _, err = c.client.ValidateExportSink(c.ctx, validateRequest) + + if err != nil { + return fmt.Errorf("validation failed with error %v", err) + } + + fmt.Println("Temporal Cloud was able to write test data to the sink") + return nil + }, + }, + { + Name: "delete", + Aliases: []string{"d"}, + Usage: "Delete export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + ResourceVersionFlag, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + namespaceName := ctx.String(NamespaceFlagName) + sinkName := ctx.String(sinkNameFlag.Name) + resourceVersion, err := c.getExportSinkResourceVersion(ctx, namespaceName, sinkName) + if err != nil { + return err + } + + deleteRequest := &namespaceservice.DeleteExportSinkRequest{ + Namespace: namespaceName, + SinkName: sinkName, + ResourceVersion: resourceVersion, + RequestId: ctx.String(RequestIDFlagName), + } + + deleteResp, err := c.client.DeleteExportSink(c.ctx, deleteRequest) + if err != nil { + return err + } + + return PrintProto(deleteResp.RequestStatus) + }, + }, + { + Name: "list", + Aliases: []string{"l"}, + Usage: "List export sink", + Flags: []cli.Flag{ + NamespaceFlag, + pageSizeFlag, + pageTokenFlag, + }, + Action: func(ctx *cli.Context) error { + request := &namespaceservice.ListExportSinksRequest{ + Namespace: ctx.String(NamespaceFlagName), + PageSize: int32(pageSizeFlag.Value), + PageToken: ctx.String(pageTokenFlag.Name), + } + + resp, err := c.client.ListExportSinks(c.ctx, request) + if err != nil { + return err + } + + return PrintProto(resp) + }, + }, + { + Name: "update", + Aliases: []string{"u"}, + Usage: "Update export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + sinkEnabledFlag, + sinkAssumedRoleFlagOptional, + s3BucketFlagOptional, + ResourceVersionFlag, + kmsArnFlag, + RequestIDFlag, + }, + Action: func(ctx *cli.Context) error { + namespaceName := ctx.String(NamespaceFlagName) + sinkName := ctx.String(sinkNameFlag.Name) + sink, err := c.getExportSink(ctx, namespaceName, sinkName) + if err != nil { + return err + } + resourceVersion := c.selectExportSinkResourceVersion(ctx, sink) + + isEnabledChange, err := c.isSinkEnabledChange(ctx, sink) + if err != nil { + return err + } + + if !isEnabledChange && !c.isAssumedRoleChange(ctx, sink) && !c.isKmsArnChange(ctx, sink) && !c.isS3BucketChange(ctx, sink) { + fmt.Println("nothing to update") + return nil + } + + if isEnabledChange { + sink.Spec.Enabled = !sink.Spec.Enabled + } + + if c.isAssumedRoleChange(ctx, sink) { + awsAccountID, roleName, err := parseAssumedRole(ctx.String(sinkAssumedRoleFlagOptional.Name)) + if err != nil { + return err + } + sink.Spec.S3Sink.RoleName = roleName + sink.Spec.S3Sink.AwsAccountId = awsAccountID + } + + if c.isKmsArnChange(ctx, sink) { + sink.Spec.S3Sink.KmsArn = ctx.String(kmsArnFlag.Name) + } + + if c.isS3BucketChange(ctx, sink) { + sink.Spec.S3Sink.BucketName = ctx.String(s3BucketFlagOptional.Name) + } + + request := &namespaceservice.UpdateExportSinkRequest{ + Namespace: ctx.String(NamespaceFlagName), + Spec: sink.Spec, + ResourceVersion: resourceVersion, + RequestId: ctx.String(RequestIDFlagName), + } + + resp, err := c.client.UpdateExportSink(c.ctx, request) + if err != nil { + return err + } + + return PrintProto(resp.RequestStatus) + }, + }, + }, + } + + export_gcs_commands := &cli.Command{ + Name: "gcs", + Usage: "Manage GCS export sink", + Subcommands: []*cli.Command{ + { + Name: "validate", + Aliases: []string{"v"}, + Usage: "Validate gcs export sink", + Flags: []cli.Flag{ + NamespaceFlag, + sinkNameFlag, + serviceAccountPrincipalFlag, + gcsBucketFlag, + }, + Action: func(ctx *cli.Context) error { + namespace := ctx.String(NamespaceFlagName) + _, err := c.getNamespace(namespace) + if err != nil { + return fmt.Errorf("unable to get existing namespace: %v", err) + } + + saName, projectName, err := parseSAPrincipal(ctx.String(serviceAccountPrincipalFlag.Name)) + if err != nil { + return fmt.Errorf("validation failed: %v", err) + } + + validateRequest := &namespaceservice.ValidateExportSinkRequest{ + Namespace: namespace, + Spec: &sink.ExportSinkSpec{ + Name: ctx.String(sinkNameFlag.Name), + DestinationType: sink.EXPORT_DESTINATION_TYPE_GCS, + GcsSink: &sink.GCSSpec{ + GcpProjectName: projectName, + BucketName: ctx.String(gcsBucketFlag.Name), + SaName: saName, }, }, - }, + } + + _, err = c.client.ValidateExportSink(c.ctx, validateRequest) + + if err != nil { + return fmt.Errorf("validation failed with error %v", err) + } + + fmt.Println("Temporal Cloud was able to write test data to the sink") + return nil }, }, }, - }, nil + } + + exportCommand.Subcommands = append(exportCommand.Subcommands, export_s3_commands) + + // TODO: remove GCP sink feature flag check when out of private preview + if IsFeatureEnabled(GCPSinkFeatureFlag) { + exportCommand.Subcommands = append(exportCommand.Subcommands, export_gcs_commands) + } + + subCommands = append(subCommands, exportCommand) + + command := &cli.Command{ + Name: "namespace", + Aliases: []string{"n"}, + Usage: "Namespace operations", + Before: func(ctx *cli.Context) error { + var err error + c, err = getNamespaceClientFn(ctx) + return err + }, + Subcommands: subCommands, + } + + return CommandOut{Command: command}, nil +} + +func validateCodecEndpoint(codecEndpoint string) error { + if !strings.HasPrefix(codecEndpoint, "https://") { + return errors.New("field Endpoint has to use https") + } + return nil } func getSearchAttributeTypes() []string { @@ -1059,11 +1598,16 @@ func compareCertificateFilters(existing, replacement certificateFiltersConfig) ( return diff.Diff(string(existingBytes), string(replacementBytes)), nil } -func validateNamespaceRegion(region string) error { - for _, r := range namespaceRegions { - if r == region { - return nil - } +func compareCodecSpec(existing, replacement *namespace.CodecServerPropertySpec) (string, error) { + existingBytes, err := FormatJson(existing) + if err != nil { + return "", err } - return fmt.Errorf("namespace region: %s not allowed", region) + + replacementBytes, err := FormatJson(replacement) + if err != nil { + return "", err + } + + return diff.Diff(string(existingBytes), string(replacementBytes)), nil } diff --git a/app/namespace_test.go b/app/namespace_test.go index 69e1ab00..374c53d8 100644 --- a/app/namespace_test.go +++ b/app/namespace_test.go @@ -4,12 +4,14 @@ import ( "context" "encoding/base64" "errors" - "github.com/temporalio/tcld/protogen/api/auth/v1" - "github.com/temporalio/tcld/protogen/api/authservice/v1" "os" "strings" "testing" + "github.com/temporalio/tcld/protogen/api/auth/v1" + "github.com/temporalio/tcld/protogen/api/authservice/v1" + "github.com/temporalio/tcld/protogen/api/sink/v1" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" "github.com/temporalio/tcld/protogen/api/namespace/v1" @@ -33,6 +35,20 @@ type NamespaceTestSuite struct { } func (s *NamespaceTestSuite) SetupTest() { + feature, err := NewFeatureCommand() + s.Require().NoError(err) + + s.cliApp = &cli.App{ + Name: "test", + Commands: []*cli.Command{feature.Command}, + Flags: []cli.Flag{ + AutoConfirmFlag, + }, + } + + err = s.RunCmd("feature", "toggle-gcp-sink") + s.Require().NoError(err) + s.mockCtrl = gomock.NewController(s.T()) s.mockService = namespaceservicemock.NewMockNamespaceServiceClient(s.mockCtrl) s.mockAuthService = authservicemock.NewMockAuthServiceClient(s.mockCtrl) @@ -43,15 +59,10 @@ func (s *NamespaceTestSuite) SetupTest() { authClient: s.mockAuthService, }, nil }) + s.Require().NoError(err) AutoConfirmFlag.Value = true - s.cliApp = &cli.App{ - Name: "test", - Commands: []*cli.Command{out.Command}, - Flags: []cli.Flag{ - AutoConfirmFlag, - }, - } + s.cliApp.Commands = []*cli.Command{out.Command} } func (s *NamespaceTestSuite) RunCmd(args ...string) error { @@ -59,6 +70,7 @@ func (s *NamespaceTestSuite) RunCmd(args ...string) error { } func (s *NamespaceTestSuite) AfterTest(suiteName, testName string) { + defer os.Remove(getFeatureFlagConfigFilePath()) s.mockCtrl.Finish() } @@ -1063,6 +1075,108 @@ func (s *NamespaceTestSuite) TestClearCertificateFilters() { } } +func (s *NamespaceTestSuite) TestUpdateCodecServer() { + ns := "ns1" + type morphGetResp func(*namespaceservice.GetNamespaceResponse) + type morphUpdateReq func(*namespaceservice.UpdateNamespaceRequest) + + tests := []struct { + args []string + expectGet morphGetResp + expectErr bool + expectUpdate morphUpdateReq + }{ + { + + args: []string{"namespace", "update-codec-server"}, + expectErr: true, + }, + { + args: []string{"namespace", "update-codec-server", "--namespace", ns}, + expectErr: true, + }, + { + args: []string{"n", "ucs", "-n", ns, "-endpoint", "https://fakehost:9999"}, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + expectUpdate: func(r *namespaceservice.UpdateNamespaceRequest) { + r.Spec.CodecSpec = &namespace.CodecServerPropertySpec{Endpoint: "https://fakehost:9999"} + }, + }, + { + args: []string{"n", "ucs", "-n", ns, "-e", "https://fakehost:9999", "--pass-access-token"}, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + expectUpdate: func(r *namespaceservice.UpdateNamespaceRequest) { + r.Spec.CodecSpec = &namespace.CodecServerPropertySpec{ + Endpoint: "https://fakehost:9999", + PassAccessToken: true, + } + }, + }, + { + args: []string{"n", "ucs", "-n", ns, "-e", "https://fakehost:9999", "--pat", "--include-credentials"}, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + expectUpdate: func(r *namespaceservice.UpdateNamespaceRequest) { + r.Spec.CodecSpec = &namespace.CodecServerPropertySpec{ + Endpoint: "https://fakehost:9999", + PassAccessToken: true, + IncludeCredentials: true, + } + }, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + getResp := namespaceservice.GetNamespaceResponse{ + Namespace: &namespace.Namespace{ + Namespace: ns, + Spec: &namespace.NamespaceSpec{ + AcceptedClientCa: "cert1", + SearchAttributes: map[string]namespace.SearchAttributeType{ + "attr1": namespace.SEARCH_ATTRIBUTE_TYPE_BOOL, + }, + RetentionDays: 7, + CertificateFilters: []*namespace.CertificateFilterSpec{ + { + CommonName: "test0", + }, + }, + }, + State: namespace.STATE_ACTIVE, + ResourceVersion: "ver1", + }, + } + if tc.expectGet != nil { + tc.expectGet(&getResp) + s.mockService.EXPECT().GetNamespace(gomock.Any(), &namespaceservice.GetNamespaceRequest{ + Namespace: ns, + }).Return(&getResp, nil).Times(1) + } + + if tc.expectUpdate != nil { + spec := *(getResp.Namespace.Spec) + req := namespaceservice.UpdateNamespaceRequest{ + Namespace: ns, + Spec: &spec, + ResourceVersion: getResp.Namespace.ResourceVersion, + } + tc.expectUpdate(&req) + s.mockService.EXPECT().UpdateNamespace(gomock.Any(), &req). + Return(&namespaceservice.UpdateNamespaceResponse{ + RequestStatus: &request.RequestStatus{}, + }, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + func (s *NamespaceTestSuite) TestUpdateNamespaceRetention() { ns := "ns1" @@ -1284,6 +1398,56 @@ func (s *NamespaceTestSuite) TestCreate() { )) } +func (s *NamespaceTestSuite) TestCreateWithCodec() { + s.mockService.EXPECT().CreateNamespace(gomock.Any(), gomock.Any()).Return(&namespaceservice.CreateNamespaceResponse{ + RequestStatus: &request.RequestStatus{}, + }, nil).AnyTimes() + s.mockAuthService.EXPECT().GetUser(gomock.Any(), gomock.Any()).Return(&authservice.GetUserResponse{ + User: &auth.User{ + Id: "test-user-id", + Spec: &auth.UserSpec{ + Email: "testuser@testcompany.com", + }, + }, + }, nil).AnyTimes() + s.NoError(s.RunCmd( + "namespace", "create", + "--namespace", "ns1", + "--region", "us-west-2", + "--ca-certificate", "cert1", + "--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }", + "--search-attribute", "testsearchattribute=Keyword", + "--user-namespace-permission", "testuser@testcompany.com=Read", + "--endpoint", "https://test-endpoint.com", "--pass-access-token", "--include-credentials", "false", + )) + + err := s.RunCmd( + "namespace", "create", + "--namespace", "ns1", + "--region", "us-west-2", + "--ca-certificate", "cert1", + "--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }", + "--search-attribute", "testsearchattribute=Keyword", + "--user-namespace-permission", "testuser@testcompany.com=Read", + "--endpoint", "http://test-endpoint.com", "--pass-access-token", + ) + s.Error(err) + s.ErrorContains(err, "field Endpoint has to use https") + + err = s.RunCmd( + "namespace", "create", + "--namespace", "ns1", + "--region", "us-west-2", + "--ca-certificate", "cert1", + "--certificate-filter-input", "{ \"filters\": [ { \"commonName\": \"test1\" } ] }", + "--search-attribute", "testsearchattribute=Keyword", + "--user-namespace-permission", "testuser@testcompany.com=Read", + "--pass-access-token", + ) + s.Error(err) + s.ErrorContains(err, "pass-access-token or include-credentials cannot be specified when codec endpoint is not specified") +} + func (s *NamespaceTestSuite) TestDelete() { s.Error(s.RunCmd("namespace", "delete")) s.mockService.EXPECT().GetNamespace(gomock.Any(), gomock.Any()).Return(&namespaceservice.GetNamespaceResponse{ @@ -1296,3 +1460,537 @@ func (s *NamespaceTestSuite) TestDelete() { }, nil).Times(1) s.NoError(s.RunCmd("namespace", "delete", "--namespace", "ns1")) } + +func (s *NamespaceTestSuite) TestCreateExportSink() { + ns := "testNamespace" + type morphGetResp func(*namespaceservice.GetNamespaceResponse) + type morphCreateSinkReq func(*namespaceservice.CreateExportSinkRequest) + + tests := []struct { + name string + args []string + expectGet morphGetResp + expectRequest morphCreateSinkReq + expectErr bool + expectErrMsg string + }{ + { + name: "create export sink", + args: []string{"namespace", "es", "s3", "create", "--namespace", ns, "--sink-name", "sink1", "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket"}, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + expectRequest: func(r *namespaceservice.CreateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: true, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "TestRole", + BucketName: "testBucket", + Region: "us-west-2", + AwsAccountId: "123456789012", + }, + } + }, + }, + { + name: "create export sink with invalid role arn", + args: []string{"namespace", "es", "s3", "create", "--namespace", ns, "--sink-name", "sink1", "--role-arn", "testRole", "--s3-bucket-name", "testBucket"}, + expectErr: true, + expectErrMsg: "invalid assumed role: testRole", + }, + { + name: "create export sink with invalid namespace", + args: []string{"namespace", "es", "s3", "create", "--namespace", ns, "--sink-name", "sink1", "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket"}, + expectGet: func(g *namespaceservice.GetNamespaceResponse) { + g.Namespace = &namespace.Namespace{ + Namespace: "", + Spec: &namespace.NamespaceSpec{ + Region: "us-west-2", + }, + } + }, + expectErr: true, + expectErrMsg: "unable to get namespace: invalid namespace returned by server", + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + getResp := namespaceservice.GetNamespaceResponse{ + Namespace: &namespace.Namespace{ + Namespace: ns, + Spec: &namespace.NamespaceSpec{ + Region: "us-west-2", + }, + }, + } + + if tc.expectGet != nil { + tc.expectGet(&getResp) + s.mockService.EXPECT().GetNamespace(gomock.Any(), &namespaceservice.GetNamespaceRequest{ + Namespace: ns, + }).Return(&getResp, nil).Times(1) + } + + if tc.expectRequest != nil { + req := namespaceservice.CreateExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().CreateExportSink(gomock.Any(), &req). + Return(&namespaceservice.CreateExportSinkResponse{RequestStatus: &request.RequestStatus{}}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + s.ErrorContains(err, tc.expectErrMsg) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestGetExportSink() { + ns := "namespace" + type morphGetReq func(*namespaceservice.GetExportSinkRequest) + + tests := []struct { + name string + args []string + expectRequest morphGetReq + expectErr bool + }{ + { + name: "get export sink succeeds", + args: []string{"namespace", "es", "s3", "get", "--namespace", ns, "--sink-name", "sink1"}, + expectRequest: func(r *namespaceservice.GetExportSinkRequest) { + r.Namespace = ns + r.SinkName = "sink1" + }, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectRequest != nil { + req := namespaceservice.GetExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().GetExportSink(gomock.Any(), &req). + Return(&namespaceservice.GetExportSinkResponse{Sink: &sink.ExportSink{}}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestDeleteExportSink() { + ns := "namespace" + type morphDeleteReq func(*namespaceservice.DeleteExportSinkRequest) + type morphGetSinkResp func(*namespaceservice.GetExportSinkResponse) + + tests := []struct { + name string + args []string + expectGetSinkResponse morphGetSinkResp + expectRequest morphDeleteReq + expectErr bool + expectErrMsg string + }{ + { + name: "delete export sink succeeds without resource version", + args: []string{"namespace", "es", "s3", "delete", "--namespace", ns, "--sink-name", "sink1"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) { + r.Sink = &sink.ExportSink{ + ResourceVersion: "124214124", + } + }, + expectRequest: func(r *namespaceservice.DeleteExportSinkRequest) { + r.Namespace = ns + r.SinkName = "sink1" + r.ResourceVersion = "124214124" + }, + }, + { + name: "delete export succeeds sink with resource version", + args: []string{"namespace", "es", "s3", "delete", "--namespace", ns, "--sink-name", "sink1", "--resource-version", "999999999"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) { + r.Sink = &sink.ExportSink{} + }, + expectRequest: func(r *namespaceservice.DeleteExportSinkRequest) { + r.Namespace = ns + r.SinkName = "sink1" + r.ResourceVersion = "999999999" + }, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectGetSinkResponse != nil { + getSinkResp := namespaceservice.GetExportSinkResponse{Sink: &sink.ExportSink{}} + tc.expectGetSinkResponse(&getSinkResp) + s.mockService.EXPECT().GetExportSink(gomock.Any(), gomock.Any()).Return(&getSinkResp, nil).Times(1) + } + + if tc.expectRequest != nil { + req := namespaceservice.DeleteExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().DeleteExportSink(gomock.Any(), &req). + Return(&namespaceservice.DeleteExportSinkResponse{RequestStatus: &request.RequestStatus{}}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestValidateExportGCPSink() { + ns := "namespace" + type morphValidateReq func(*namespaceservice.ValidateExportSinkRequest) + type morphGetResp func(*namespaceservice.GetNamespaceResponse) + + tests := []struct { + name string + + args []string + expectRequest morphValidateReq + expectErr bool + expectGet morphGetResp + }{ + { + name: "Validate export gcs sinks succeeds", + args: []string{"namespace", "es", "gcs", "validate", "--namespace", ns, "--sink-name", "sink1", "--service-account-principal", "test-sa@test-gcs.iam.gserviceaccount.com", "--gcs-bucket", "testBucket"}, + expectRequest: func(r *namespaceservice.ValidateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + DestinationType: sink.EXPORT_DESTINATION_TYPE_GCS, + GcsSink: &sink.GCSSpec{ + SaName: "test-sa", + BucketName: "testBucket", + GcpProjectName: "test-gcs", + }, + } + }, + expectGet: func(g *namespaceservice.GetNamespaceResponse) { + g.Namespace = &namespace.Namespace{ + Namespace: ns, + } + }, + expectErr: false, + }, + { + name: "Validate export gcs sinks fails with invalid sa principal", + args: []string{"namespace", "es", "gcs", "validate", "--namespace", ns, "--sink-name", "sink1", "--service-account-principal", "testSA", "--gcs-bucket", "testBucket"}, + expectErr: true, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectGet != nil { + getResp := namespaceservice.GetNamespaceResponse{} + tc.expectGet(&getResp) + s.mockService.EXPECT().GetNamespace(gomock.Any(), gomock.Any()).Return(&getResp, nil).Times(1) + } + + if tc.expectRequest != nil { + req := namespaceservice.ValidateExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().ValidateExportSink(gomock.Any(), &req). + Return(&namespaceservice.ValidateExportSinkResponse{}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestValidateExportSink() { + ns := "namespace" + type morphValidateReq func(*namespaceservice.ValidateExportSinkRequest) + type morphGetResp func(*namespaceservice.GetNamespaceResponse) + + tests := []struct { + name string + + args []string + expectRequest morphValidateReq + expectErr bool + expectGet morphGetResp + }{ + { + name: "Validate export sinks succeeds", + args: []string{"namespace", "es", "s3", "validate", "--namespace", ns, "--sink-name", "sink1", "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket"}, + expectRequest: func(r *namespaceservice.ValidateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "TestRole", + BucketName: "testBucket", + Region: "us-west-2", + AwsAccountId: "123456789012", + }, + } + }, + expectGet: func(g *namespaceservice.GetNamespaceResponse) { + g.Namespace = &namespace.Namespace{ + Namespace: ns, + Spec: &namespace.NamespaceSpec{ + Region: "us-west-2", + }, + } + }, + expectErr: false, + }, + { + name: "Validate export sinks fails with invalid role arn", + args: []string{"namespace", "es", "s3", "validate", "--namespace", ns, "--sink-name", "sink1", "--role-arn", "testRole", "--s3-bucket-name", "testBucket"}, + expectErr: true, + expectGet: func(g *namespaceservice.GetNamespaceResponse) {}, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectGet != nil { + getResp := namespaceservice.GetNamespaceResponse{} + tc.expectGet(&getResp) + s.mockService.EXPECT().GetNamespace(gomock.Any(), gomock.Any()).Return(&getResp, nil).Times(1) + } + + if tc.expectRequest != nil { + req := namespaceservice.ValidateExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().ValidateExportSink(gomock.Any(), &req). + Return(&namespaceservice.ValidateExportSinkResponse{}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestListExportSinks() { + ns := "namespace" + type morphGetReq func(*namespaceservice.ListExportSinksRequest) + + tests := []struct { + name string + + args []string + expectRequest morphGetReq + expectErr bool + }{ + { + name: "list export sinks succeeds", + args: []string{"namespace", "es", "s3", "list", "--namespace", ns}, + expectRequest: func(r *namespaceservice.ListExportSinksRequest) { + r.Namespace = ns + r.PageSize = 100 + }, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectRequest != nil { + req := namespaceservice.ListExportSinksRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().ListExportSinks(gomock.Any(), &req). + Return(&namespaceservice.ListExportSinksResponse{}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + } else { + s.NoError(err) + } + }) + } +} + +func (s *NamespaceTestSuite) TestUpdateExportSink() { + ns := "namespace" + type morphGetReq func(*namespaceservice.UpdateExportSinkRequest) + type morphGetSinkResp func(*namespaceservice.GetExportSinkResponse) + + tests := []struct { + name string + args []string + expectGetSinkResponse morphGetSinkResp + expectRequest morphGetReq + expectErr bool + expectErrMsg string + }{ + { + name: "update export sink succeeds with no input", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + }, + { + name: "update export sink succeeds with no updates", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket", "--enabled", "true", "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + }, + { + name: "update export sink succeeds with no updates", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket", "--enabled", "true"}, + expectErr: true, + expectErrMsg: "Required flag \"sink-name\" not set", + }, + { + name: "update export sink succeeds with not valid enabled value", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--role-arn", "arn:aws:iam::123456789012:role/TestRole", "--s3-bucket-name", "testBucket", "--sink-name", "testSink", "--enabled", ""}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + expectErr: true, + expectErrMsg: "invalid value for enabled flag", + }, + { + name: "update export sink succeeds with enable flag", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--enabled", "false", "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + expectRequest: func(r *namespaceservice.UpdateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: false, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "TestRole", + BucketName: "testBucket", + Region: "us-west-2", + AwsAccountId: "123456789012", + }, + } + r.ResourceVersion = "124214124" + }, + }, + { + name: "update export sink succeeds with role arn and enabled flag", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--enabled", "false", "--role-arn", "arn:aws:iam::923456789012:role/newTestRole", "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + expectRequest: func(r *namespaceservice.UpdateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: false, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "newTestRole", + BucketName: "testBucket", + Region: "us-west-2", + AwsAccountId: "923456789012", + }, + } + r.ResourceVersion = "124214124" + }, + }, + { + name: "update export sink succeeds with role arn, bucket name and enabled flag", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--role-arn", "arn:aws:iam::923456789012:role/newTestRole", "--s3-bucket-name", "newTestBucket", "--enabled", "false", "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + expectRequest: func(r *namespaceservice.UpdateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: false, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "newTestRole", + BucketName: "newTestBucket", + Region: "us-west-2", + AwsAccountId: "923456789012", + }, + } + r.ResourceVersion = "124214124" + }, + }, + { + name: "update export sink succeeds with role arn, bucket name, kms arn and enabled flag", + args: []string{"namespace", "es", "s3", "update", "--namespace", ns, "--role-arn", "arn:aws:iam::923456789012:role/newTestRole", "--s3-bucket-name", "newTestBucket", "--kms-arn", "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "--enabled", "false", "--sink-name", "testSink"}, + expectGetSinkResponse: func(r *namespaceservice.GetExportSinkResponse) {}, + expectRequest: func(r *namespaceservice.UpdateExportSinkRequest) { + r.Namespace = ns + r.Spec = &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: false, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "newTestRole", + BucketName: "newTestBucket", + Region: "us-west-2", + AwsAccountId: "923456789012", + KmsArn: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + }, + } + r.ResourceVersion = "124214124" + }, + }, + } + + for _, tc := range tests { + s.Run(strings.Join(tc.args, " "), func() { + if tc.expectGetSinkResponse != nil { + getSinkResp := namespaceservice.GetExportSinkResponse{Sink: &sink.ExportSink{ + Name: "sink1", + Spec: &sink.ExportSinkSpec{ + Name: "sink1", + Enabled: true, + DestinationType: sink.EXPORT_DESTINATION_TYPE_S3, + S3Sink: &sink.S3Spec{ + RoleName: "TestRole", + BucketName: "testBucket", + Region: "us-west-2", + AwsAccountId: "123456789012", + }, + }, + ResourceVersion: "124214124", + }} + tc.expectGetSinkResponse(&getSinkResp) + s.mockService.EXPECT().GetExportSink(gomock.Any(), gomock.Any()).Return(&getSinkResp, nil).Times(1) + } + + if tc.expectRequest != nil { + req := namespaceservice.UpdateExportSinkRequest{} + tc.expectRequest(&req) + s.mockService.EXPECT().UpdateExportSink(gomock.Any(), &req). + Return(&namespaceservice.UpdateExportSinkResponse{RequestStatus: &request.RequestStatus{}}, nil).Times(1) + } + + err := s.RunCmd(tc.args...) + if tc.expectErr { + s.Error(err) + s.ErrorContains(err, tc.expectErrMsg) + } else { + s.NoError(err) + } + }) + } +} diff --git a/app/version.go b/app/version.go index 22c53645..02c0f3a1 100644 --- a/app/version.go +++ b/app/version.go @@ -1,40 +1,111 @@ package app -import "github.com/urfave/cli/v2" +import ( + "fmt" + "runtime/debug" + "strconv" + "strings" + "time" + + "github.com/urfave/cli/v2" + "golang.org/x/mod/semver" +) const ( - DefaultVersion = "v0.6.0" + // MinSupportedVersion is the minimum tcld version supported by our APIs. + // This string must be updated when we deprecate older versions, but should be + // done carefully as this will likely break user's current usage of tcld. + MinSupportedVersion = "v0.1.3" + + // DefaultVersionString is the version which is sent over if no version was available. + // This can happen if a user builds the latest main branch, as the version string provided + // to us from Go tooling is `(devel)`. + DefaultVersionString = MinSupportedVersion + "+no-version-available" + + pseudoVersionMinLen = len("vX.0.0-yyyymmddhhmmss-abcdefabcdef") + pseudoVersionCommitInfoLen = len("yyyymmddhhmmss-abcdefabcdef") ) var ( - BuildDate string - Commit string - Version string + date string + commit string + version string ) +type BuildInfo struct { + Date string // build time or commit time. + Commit string + Version string +} + func NewVersionCommand() (CommandOut, error) { return CommandOut{Command: &cli.Command{ Name: "version", Usage: "Version information", Aliases: []string{"v"}, Action: func(c *cli.Context) error { - return PrintObj(&struct { - BuildDate string - Commit string - Version string - }{ - BuildDate: BuildDate, - Commit: Commit, - Version: getVersion(), - }) + return PrintObj(NewBuildInfo()) }, }}, nil } -func getVersion() string { - version := Version - if len(version) == 0 { - version = DefaultVersion +// NewBuildInfo will populate build info, to make debugging API errors easier, +// in the three scenarios a user can install tcld: +// 1. Installed via the makefile or via brew. +// 2. Installed via `go install`. +// 3. Compiled on a branch via `go build ./cmd/tcld` +func NewBuildInfo() BuildInfo { + if len(version) > 0 { + // Used when built with make or installed with brew. + return BuildInfo{ + Date: date, + Commit: commit, + Version: version, + } + } + + di, ok := debug.ReadBuildInfo() + if !ok { + fmt.Printf("Failed to read debug info\n") + return BuildInfo{} } - return version + + info := BuildInfo{ + Version: di.Main.Version, + } + if !semver.IsValid(di.Main.Version) { + info.Version = DefaultVersionString + } + + if len(di.Main.Version) >= pseudoVersionMinLen { + // Used when compiled with `go install`. + // See https://go.dev/ref/mod#pseudo-versions for more info on the expected string format + commitInfoStart := len(di.Main.Version) - pseudoVersionCommitInfoLen + split := strings.Split(di.Main.Version[commitInfoStart:], "-") + + // Make the time human readable. + at, err := time.Parse("20060102150405", split[0]) + if err == nil { + info.Date = at.UTC().Format("2006-01-02T15:04:05.000Z") + } + info.Commit = split[1] + } else { + // Used when built directly from a branch with `go build`. + var hash, modified string + for _, setting := range di.Settings { + switch setting.Key { + case "vcs.revision": + hash = setting.Value + case "vcs.modified": + if v, err := strconv.ParseBool(setting.Value); err == nil && v { + modified = "-modified" + } + case "vcs.time": + info.Date = setting.Value + } + } + info.Commit = fmt.Sprintf("%s%s", hash, modified) + } + + return info } diff --git a/cmd/tcld/fx.go b/cmd/tcld/fx.go index 31460b2c..ec52ef12 100644 --- a/cmd/tcld/fx.go +++ b/cmd/tcld/fx.go @@ -22,6 +22,8 @@ func fxOptions() fx.Option { app.NewLoginCommand, app.NewLogoutCommand, app.NewCertificatesCommand, + app.NewAPIKeyCommand, + app.NewFeatureCommand, func() app.GetNamespaceClientFn { return app.GetNamespaceClient }, @@ -34,6 +36,9 @@ func fxOptions() fx.Option { func() app.GetUserClientFn { return app.GetUserClient }, + func() app.GetAPIKeyClientFn { + return app.GetAPIKeyClient + }, ), fx.Invoke(func(app *cli.App, shutdowner fx.Shutdowner) error { err := app.Run(os.Args) diff --git a/go.mod b/go.mod index 68998a24..794e83b3 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,19 @@ module github.com/temporalio/tcld -go 1.18 +go 1.20 require ( github.com/go-playground/validator/v10 v10.13.0 github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 + github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 github.com/kylelemons/godebug v1.1.0 github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.3 go.uber.org/fx v1.19.2 - go.uber.org/multierr v1.6.0 + go.uber.org/multierr v1.11.0 + golang.org/x/mod v0.12.0 google.golang.org/grpc v1.54.0 ) @@ -20,7 +22,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/leodido/go-urn v1.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -28,10 +29,10 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/dig v1.16.1 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 9084961f..4490fe96 100644 --- a/go.sum +++ b/go.sum @@ -56,25 +56,27 @@ go.uber.org/dig v1.16.1/go.mod h1:557JTAUZT5bUK0SvCwikmLPPtdQhfvLYtO5tJgQSbnk= go.uber.org/fx v1.19.2 h1:SyFgYQFr1Wl0AYstE8vyYIzP4bFz2URrScjwC4cwUvY= go.uber.org/fx v1.19.2/go.mod h1:43G1VcqSzbIv77y00p1DRAsyZS8WdzuYdhZXmEUkMyQ= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -85,13 +87,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= diff --git a/protogen/api/account/v1/message.pb.go b/protogen/api/account/v1/message.pb.go index 42da6fcc..9da381f9 100644 --- a/protogen/api/account/v1/message.pb.go +++ b/protogen/api/account/v1/message.pb.go @@ -6,16 +6,16 @@ package account import ( encoding_binary "encoding/binary" fmt "fmt" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" reflect "reflect" strconv "strconv" strings "strings" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" + v1 "github.com/temporalio/tcld/protogen/api/sink/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -80,82 +80,6 @@ func (State) EnumDescriptor() ([]byte, []int) { return fileDescriptor_603c66a56913ad55, []int{0} } -type SinkState int32 - -const ( - SINK_STATE_UNSPECIFIED SinkState = 0 - // The sink is in the process of creation - SINK_STATE_CREATING SinkState = 1 - // The sink is active - SINK_STATE_ACTIVE SinkState = 2 - // The sink is deleted - SINK_STATE_DELETED SinkState = 3 - // The sink has error and cannot receive logs. - SINK_STATE_ERROR SinkState = 4 -) - -var SinkState_name = map[int32]string{ - 0: "Unspecified", - 1: "Creating", - 2: "Active", - 3: "Deleted", - 4: "Error", -} - -var SinkState_value = map[string]int32{ - "Unspecified": 0, - "Creating": 1, - "Active": 2, - "Deleted": 3, - "Error": 4, -} - -func (SinkState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{1} -} - -type SinkDestinationType int32 - -const ( - SINK_DESTINATION_TYPE_UNSPECIFIED SinkDestinationType = 0 - SINK_DESTINATION_TYPE_KINESIS SinkDestinationType = 1 -) - -var SinkDestinationType_name = map[int32]string{ - 0: "Unspecified", - 1: "Kinesis", -} - -var SinkDestinationType_value = map[string]int32{ - "Unspecified": 0, - "Kinesis": 1, -} - -func (SinkDestinationType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{2} -} - -type SinkType int32 - -const ( - SINK_TYPE_UNSPECIFIED SinkType = 0 - SINK_TYPE_AUDIT_LOG SinkType = 1 -) - -var SinkType_name = map[int32]string{ - 0: "Unspecified", - 1: "AuditLog", -} - -var SinkType_value = map[string]int32{ - "Unspecified": 0, - "AuditLog": 1, -} - -func (SinkType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{3} -} - type Period int32 const ( @@ -174,7 +98,7 @@ var Period_value = map[string]int32{ } func (Period) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{4} + return fileDescriptor_603c66a56913ad55, []int{1} } type MeteringRecord struct { @@ -393,269 +317,6 @@ func (m *MetricsSpec) GetAcceptedClientCa() string { return "" } -type KinesisSpec struct { - // The role Temporal Cloud assumes when writing records to Kinesis - AssumedRole string `protobuf:"bytes,1,opt,name=assumed_role,json=assumedRole,proto3" json:"assumed_role,omitempty"` - // Destination Kinesis endpoint arn for us to send data to. - DestinationUri string `protobuf:"bytes,2,opt,name=destination_uri,json=destinationUri,proto3" json:"destination_uri,omitempty"` - // The sink's region. - Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` -} - -func (m *KinesisSpec) Reset() { *m = KinesisSpec{} } -func (*KinesisSpec) ProtoMessage() {} -func (*KinesisSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{4} -} -func (m *KinesisSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KinesisSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KinesisSpec.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KinesisSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_KinesisSpec.Merge(m, src) -} -func (m *KinesisSpec) XXX_Size() int { - return m.Size() -} -func (m *KinesisSpec) XXX_DiscardUnknown() { - xxx_messageInfo_KinesisSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_KinesisSpec proto.InternalMessageInfo - -func (m *KinesisSpec) GetAssumedRole() string { - if m != nil { - return m.AssumedRole - } - return "" -} - -func (m *KinesisSpec) GetDestinationUri() string { - if m != nil { - return m.DestinationUri - } - return "" -} - -func (m *KinesisSpec) GetRegion() string { - if m != nil { - return m.Region - } - return "" -} - -type SinkSpec struct { - // Name of the sink e.g. "audit_log_01" - Sink string `protobuf:"bytes,1,opt,name=sink,proto3" json:"sink,omitempty"` - // Type of the sink. For now only AuditLog type is supported - SinkType SinkType `protobuf:"varint,2,opt,name=sink_type,json=sinkType,proto3,enum=api.account.v1.SinkType" json:"sink_type,omitempty"` - // The receiving service type. For now only support Kinesis destination is supported. - DestinationType SinkDestinationType `protobuf:"varint,3,opt,name=destination_type,json=destinationType,proto3,enum=api.account.v1.SinkDestinationType" json:"destination_type,omitempty"` - KinesisSink *KinesisSpec `protobuf:"bytes,4,opt,name=kinesis_sink,json=kinesisSink,proto3" json:"kinesis_sink,omitempty"` -} - -func (m *SinkSpec) Reset() { *m = SinkSpec{} } -func (*SinkSpec) ProtoMessage() {} -func (*SinkSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{5} -} -func (m *SinkSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SinkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SinkSpec.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SinkSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SinkSpec.Merge(m, src) -} -func (m *SinkSpec) XXX_Size() int { - return m.Size() -} -func (m *SinkSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SinkSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SinkSpec proto.InternalMessageInfo - -func (m *SinkSpec) GetSink() string { - if m != nil { - return m.Sink - } - return "" -} - -func (m *SinkSpec) GetSinkType() SinkType { - if m != nil { - return m.SinkType - } - return SINK_TYPE_UNSPECIFIED -} - -func (m *SinkSpec) GetDestinationType() SinkDestinationType { - if m != nil { - return m.DestinationType - } - return SINK_DESTINATION_TYPE_UNSPECIFIED -} - -func (m *SinkSpec) GetKinesisSink() *KinesisSpec { - if m != nil { - return m.KinesisSink - } - return nil -} - -type KinesisStatus struct { - // The external id we use for assuming role. Reference link - // https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html - ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` - // This is for the message from third party sink e.g. Kinesis error message returned from PutRecord call. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (m *KinesisStatus) Reset() { *m = KinesisStatus{} } -func (*KinesisStatus) ProtoMessage() {} -func (*KinesisStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{6} -} -func (m *KinesisStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KinesisStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KinesisStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KinesisStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_KinesisStatus.Merge(m, src) -} -func (m *KinesisStatus) XXX_Size() int { - return m.Size() -} -func (m *KinesisStatus) XXX_DiscardUnknown() { - xxx_messageInfo_KinesisStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_KinesisStatus proto.InternalMessageInfo - -func (m *KinesisStatus) GetExternalId() string { - if m != nil { - return m.ExternalId - } - return "" -} - -func (m *KinesisStatus) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -type Sink struct { - // Name of the sink e.g. "audit_log_01" - Sink string `protobuf:"bytes,1,opt,name=sink,proto3" json:"sink,omitempty"` - State SinkState `protobuf:"varint,2,opt,name=state,proto3,enum=api.account.v1.SinkState" json:"state,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // Last succeeded data sent timestamp, this is used to get the start time of backfill if necessary. - LastSucceededTime *types.Timestamp `protobuf:"bytes,4,opt,name=last_succeeded_time,json=lastSucceededTime,proto3" json:"last_succeeded_time,omitempty"` - Status *KinesisStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *Sink) Reset() { *m = Sink{} } -func (*Sink) ProtoMessage() {} -func (*Sink) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{7} -} -func (m *Sink) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Sink.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Sink) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sink.Merge(m, src) -} -func (m *Sink) XXX_Size() int { - return m.Size() -} -func (m *Sink) XXX_DiscardUnknown() { - xxx_messageInfo_Sink.DiscardUnknown(m) -} - -var xxx_messageInfo_Sink proto.InternalMessageInfo - -func (m *Sink) GetSink() string { - if m != nil { - return m.Sink - } - return "" -} - -func (m *Sink) GetState() SinkState { - if m != nil { - return m.State - } - return SINK_STATE_UNSPECIFIED -} - -func (m *Sink) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Sink) GetLastSucceededTime() *types.Timestamp { - if m != nil { - return m.LastSucceededTime - } - return nil -} - -func (m *Sink) GetStatus() *KinesisStatus { - if m != nil { - return m.Status - } - return nil -} - type Metrics struct { // prometheus metrics endpoint uri (this is only populated if the AccountSpec has metrics enabled) Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` @@ -664,7 +325,7 @@ type Metrics struct { func (m *Metrics) Reset() { *m = Metrics{} } func (*Metrics) ProtoMessage() {} func (*Metrics) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{8} + return fileDescriptor_603c66a56913ad55, []int{4} } func (m *Metrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,15 +363,14 @@ func (m *Metrics) GetUri() string { type AccountSpec struct { Metrics *MetricsSpec `protobuf:"bytes,1,opt,name=metrics,proto3" json:"metrics,omitempty"` - // We plan to let user create multiple sinks for potentially different data. Key is the sink name, and the value - // is the SinkSpec object. - Sinks map[string]*SinkSpec `protobuf:"bytes,2,rep,name=sinks,proto3" json:"sinks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // output sink specifications keyed on the sink name + OutputSinks map[string]*v1.SinkSpec `protobuf:"bytes,3,rep,name=output_sinks,json=outputSinks,proto3" json:"output_sinks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *AccountSpec) Reset() { *m = AccountSpec{} } func (*AccountSpec) ProtoMessage() {} func (*AccountSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{9} + return fileDescriptor_603c66a56913ad55, []int{5} } func (m *AccountSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -746,9 +406,9 @@ func (m *AccountSpec) GetMetrics() *MetricsSpec { return nil } -func (m *AccountSpec) GetSinks() map[string]*SinkSpec { +func (m *AccountSpec) GetOutputSinks() map[string]*v1.SinkSpec { if m != nil { - return m.Sinks + return m.OutputSinks } return nil } @@ -769,14 +429,17 @@ type Account struct { LastModifiedTime *types.Timestamp `protobuf:"bytes,6,opt,name=last_modified_time,json=lastModifiedTime,proto3" json:"last_modified_time,omitempty"` // information related to account-scope metrics Metrics *Metrics `protobuf:"bytes,7,opt,name=metrics,proto3" json:"metrics,omitempty"` - // Details of the sinks under the account. Key is the sink name, and value is the Sink object - Sinks map[string]*Sink `protobuf:"bytes,8,rep,name=sinks,proto3" json:"sinks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The external id we use for assuming role. Reference link + // https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html + AwsExternalId string `protobuf:"bytes,9,opt,name=aws_external_id,json=awsExternalId,proto3" json:"aws_external_id,omitempty"` + // output sink definitions keyed on the sink name + OutputSinks map[string]*v1.Sink `protobuf:"bytes,10,rep,name=output_sinks,json=outputSinks,proto3" json:"output_sinks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Account) Reset() { *m = Account{} } func (*Account) ProtoMessage() {} func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_603c66a56913ad55, []int{10} + return fileDescriptor_603c66a56913ad55, []int{6} } func (m *Account) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -854,115 +517,97 @@ func (m *Account) GetMetrics() *Metrics { return nil } -func (m *Account) GetSinks() map[string]*Sink { +func (m *Account) GetAwsExternalId() string { + if m != nil { + return m.AwsExternalId + } + return "" +} + +func (m *Account) GetOutputSinks() map[string]*v1.Sink { if m != nil { - return m.Sinks + return m.OutputSinks } return nil } func init() { proto.RegisterEnum("api.account.v1.State", State_name, State_value) - proto.RegisterEnum("api.account.v1.SinkState", SinkState_name, SinkState_value) - proto.RegisterEnum("api.account.v1.SinkDestinationType", SinkDestinationType_name, SinkDestinationType_value) - proto.RegisterEnum("api.account.v1.SinkType", SinkType_name, SinkType_value) proto.RegisterEnum("api.account.v1.Period", Period_name, Period_value) proto.RegisterType((*MeteringRecord)(nil), "api.account.v1.MeteringRecord") proto.RegisterType((*MeteringEntry)(nil), "api.account.v1.MeteringEntry") proto.RegisterMapType((map[string]*MeteringRecord)(nil), "api.account.v1.MeteringEntry.RecordsEntry") proto.RegisterType((*NamespaceUsageRecord)(nil), "api.account.v1.NamespaceUsageRecord") proto.RegisterType((*MetricsSpec)(nil), "api.account.v1.MetricsSpec") - proto.RegisterType((*KinesisSpec)(nil), "api.account.v1.KinesisSpec") - proto.RegisterType((*SinkSpec)(nil), "api.account.v1.SinkSpec") - proto.RegisterType((*KinesisStatus)(nil), "api.account.v1.KinesisStatus") - proto.RegisterType((*Sink)(nil), "api.account.v1.Sink") proto.RegisterType((*Metrics)(nil), "api.account.v1.Metrics") proto.RegisterType((*AccountSpec)(nil), "api.account.v1.AccountSpec") - proto.RegisterMapType((map[string]*SinkSpec)(nil), "api.account.v1.AccountSpec.SinksEntry") + proto.RegisterMapType((map[string]*v1.SinkSpec)(nil), "api.account.v1.AccountSpec.OutputSinksEntry") proto.RegisterType((*Account)(nil), "api.account.v1.Account") - proto.RegisterMapType((map[string]*Sink)(nil), "api.account.v1.Account.SinksEntry") + proto.RegisterMapType((map[string]*v1.Sink)(nil), "api.account.v1.Account.OutputSinksEntry") } func init() { proto.RegisterFile("api/account/v1/message.proto", fileDescriptor_603c66a56913ad55) } var fileDescriptor_603c66a56913ad55 = []byte{ - // 1215 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x56, 0xcf, 0x73, 0xd3, 0x56, - 0x10, 0xb6, 0xfc, 0x23, 0xb6, 0xd7, 0x8e, 0x11, 0x2f, 0x01, 0x4c, 0x02, 0x02, 0xc4, 0xb4, 0xa5, - 0x6e, 0xc7, 0x2e, 0x50, 0x66, 0x28, 0x6d, 0x99, 0x71, 0x23, 0x41, 0x55, 0x88, 0xe3, 0x91, 0x6d, - 0xa6, 0x70, 0xd1, 0x08, 0xe9, 0x91, 0xd1, 0xc4, 0x96, 0x8c, 0xde, 0x53, 0xa6, 0xb9, 0xf5, 0xd2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0x83, 0x28, 0x74, 0x92, - 0x38, 0x10, 0xe4, 0xad, 0x8c, 0x79, 0x12, 0x07, 0xe8, 0x2c, 0xac, 0xc5, 0x78, 0x3f, 0x88, 0xc2, - 0x76, 0x89, 0xf9, 0xc5, 0x49, 0xff, 0x47, 0x81, 0xda, 0x28, 0x08, 0x0f, 0xd8, 0x85, 0x08, 0xca, - 0x24, 0x08, 0x0f, 0xc4, 0x45, 0xec, 0x1b, 0xdd, 0x82, 0x7a, 0xfa, 0xd7, 0xa1, 0x47, 0x73, 0xde, - 0x93, 0xd6, 0x8d, 0xf6, 0x71, 0x8d, 0x52, 0x82, 0xf1, 0xd1, 0x1c, 0xdb, 0x35, 0x22, 0xbe, 0xd0, - 0x00, 0xd4, 0x6c, 0x62, 0x0c, 0x5d, 0x62, 0xe8, 0xab, 0x79, 0x68, 0x63, 0x19, 0xcb, 0x88, 0xb2, - 0x55, 0x31, 0xbe, 0xbb, 0xd0, 0x3c, 0xe0, 0xd2, 0x38, 0x2c, 0xc5, 0x32, 0xeb, 0xd6, 0xf6, 0x71, - 0xae, 0x8c, 0x7c, 0x76, 0x43, 0x00, 0x52, 0x7e, 0x7d, 0x02, 0xeb, 0xd2, 0x47, 0x5d, 0x9a, 0x10, - 0x74, 0x09, 0x1a, 0xf8, 0x27, 0x8a, 0xe3, 0xd0, 0x9d, 0x3a, 0x81, 0x2f, 0x4a, 0x06, 0x69, 0xb2, - 0x7c, 0x74, 0x15, 0xd6, 0x71, 0x1c, 0x47, 0xb1, 0x23, 0x16, 0x5f, 0x08, 0xdb, 0x64, 0xc6, 0x5d, - 0x6e, 0xd3, 0xdf, 0x28, 0x50, 0x4e, 0xf9, 0x73, 0xa5, 0xeb, 0x41, 0x85, 0x50, 0x97, 0x4a, 0xd9, - 0xce, 0xe7, 0x15, 0x9e, 0x66, 0x83, 0x6d, 0x1e, 0x97, 0xce, 0x91, 0xbc, 0x8c, 0x77, 0x49, 0x1e, - 0xd1, 0x0f, 0xb0, 0x31, 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e, 0x68, 0xca, 0x9b, 0x85, 0x56, 0x78, 0xbb, 0xd0, 0x94, 0x5f, 0x5f, - 0x6b, 0x85, 0x17, 0xaf, 0xb5, 0xc2, 0xcb, 0xd7, 0x5a, 0xe1, 0x89, 0x4e, 0x67, 0xf3, 0x78, 0xda, - 0xf5, 0xa6, 0x51, 0xe2, 0xf7, 0x56, 0xff, 0x69, 0xfd, 0x5a, 0x7c, 0x3e, 0x5d, 0x63, 0xfb, 0x7a, - 0xf3, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0x4e, 0x82, 0xc7, 0xd5, 0x0a, 0x00, 0x00, + // 913 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0xb6, 0x6c, 0x27, 0xb6, 0x9f, 0x13, 0x47, 0xd9, 0xa6, 0xc4, 0x38, 0xad, 0xc8, 0xf8, 0x00, + 0x26, 0x74, 0x64, 0xd2, 0xd2, 0x19, 0x28, 0xc3, 0xc1, 0x44, 0x2a, 0x18, 0x1a, 0xc7, 0xc8, 0x76, + 0x07, 0x7a, 0xd1, 0x6c, 0xa4, 0x6d, 0x46, 0x53, 0x5b, 0x12, 0xbb, 0xab, 0x94, 0xde, 0xf8, 0x09, + 0x5c, 0xf8, 0x05, 0x5c, 0xf8, 0x0f, 0xfc, 0x01, 0x8e, 0x39, 0xf6, 0x48, 0x9c, 0x0b, 0xc7, 0x0e, + 0xbf, 0x80, 0xd9, 0xd5, 0x0a, 0x5b, 0x69, 0xd3, 0x70, 0xd3, 0xbe, 0xf7, 0xbd, 0xef, 0x7d, 0xfb, + 0xde, 0xb7, 0x23, 0xb8, 0x85, 0xe3, 0xa0, 0x8b, 0x3d, 0x2f, 0x4a, 0x42, 0xde, 0x3d, 0xdd, 0xef, + 0xce, 0x08, 0x63, 0xf8, 0x84, 0x98, 0x31, 0x8d, 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d, 0xed, 0x6c, 0x6e, 0x68, 0x7f, 0xcd, 0x0d, 0xed, 0xef, 0xb9, 0x51, 0x78, 0x35, + 0x37, 0xb4, 0x5f, 0x2e, 0x8c, 0xc2, 0xd9, 0x85, 0x51, 0x78, 0x79, 0x61, 0x14, 0x9e, 0xb4, 0xf9, + 0x2c, 0xa6, 0x53, 0xd3, 0x9b, 0x46, 0x89, 0xdf, 0xcd, 0xff, 0x69, 0x3f, 0x57, 0x9f, 0xc7, 0xab, + 0xd2, 0xca, 0xf7, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x59, 0x27, 0x69, 0xfa, 0x8a, 0x07, 0x00, + 0x00, } func (x State) String() string { @@ -972,27 +617,6 @@ func (x State) String() string { } return strconv.Itoa(int(x)) } -func (x SinkState) String() string { - s, ok := SinkState_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x SinkDestinationType) String() string { - s, ok := SinkDestinationType_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x SinkType) String() string { - s, ok := SinkType_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} func (x Period) String() string { s, ok := Period_name[int32(x)] if ok { @@ -1116,14 +740,14 @@ func (this *MetricsSpec) Equal(that interface{}) bool { } return true } -func (this *KinesisSpec) Equal(that interface{}) bool { +func (this *Metrics) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*KinesisSpec) + that1, ok := that.(*Metrics) if !ok { - that2, ok := that.(KinesisSpec) + that2, ok := that.(Metrics) if ok { that1 = &that2 } else { @@ -1135,25 +759,19 @@ func (this *KinesisSpec) Equal(that interface{}) bool { } else if this == nil { return false } - if this.AssumedRole != that1.AssumedRole { - return false - } - if this.DestinationUri != that1.DestinationUri { - return false - } - if this.Region != that1.Region { + if this.Uri != that1.Uri { return false } return true } -func (this *SinkSpec) Equal(that interface{}) bool { +func (this *AccountSpec) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SinkSpec) + that1, ok := that.(*AccountSpec) if !ok { - that2, ok := that.(SinkSpec) + that2, ok := that.(AccountSpec) if ok { that1 = &that2 } else { @@ -1165,28 +783,27 @@ func (this *SinkSpec) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Sink != that1.Sink { - return false - } - if this.SinkType != that1.SinkType { + if !this.Metrics.Equal(that1.Metrics) { return false } - if this.DestinationType != that1.DestinationType { + if len(this.OutputSinks) != len(that1.OutputSinks) { return false } - if !this.KinesisSink.Equal(that1.KinesisSink) { - return false + for i := range this.OutputSinks { + if !this.OutputSinks[i].Equal(that1.OutputSinks[i]) { + return false + } } return true } -func (this *KinesisStatus) Equal(that interface{}) bool { +func (this *Account) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*KinesisStatus) + that1, ok := that.(*Account) if !ok { - that2, ok := that.(KinesisStatus) + that2, ok := that.(Account) if ok { that1 = &that2 } else { @@ -1198,129 +815,10 @@ func (this *KinesisStatus) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ExternalId != that1.ExternalId { + if this.ResourceVersion != that1.ResourceVersion { return false } - if this.ErrorMessage != that1.ErrorMessage { - return false - } - return true -} -func (this *Sink) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Sink) - if !ok { - that2, ok := that.(Sink) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Sink != that1.Sink { - return false - } - if this.State != that1.State { - return false - } - if this.Message != that1.Message { - return false - } - if !this.LastSucceededTime.Equal(that1.LastSucceededTime) { - return false - } - if !this.Status.Equal(that1.Status) { - return false - } - return true -} -func (this *Metrics) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Metrics) - if !ok { - that2, ok := that.(Metrics) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Uri != that1.Uri { - return false - } - return true -} -func (this *AccountSpec) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AccountSpec) - if !ok { - that2, ok := that.(AccountSpec) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Metrics.Equal(that1.Metrics) { - return false - } - if len(this.Sinks) != len(that1.Sinks) { - return false - } - for i := range this.Sinks { - if !this.Sinks[i].Equal(that1.Sinks[i]) { - return false - } - } - return true -} -func (this *Account) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Account) - if !ok { - that2, ok := that.(Account) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ResourceVersion != that1.ResourceVersion { - return false - } - if !this.Spec.Equal(that1.Spec) { + if !this.Spec.Equal(that1.Spec) { return false } if this.State != that1.State { @@ -1338,11 +836,14 @@ func (this *Account) Equal(that interface{}) bool { if !this.Metrics.Equal(that1.Metrics) { return false } - if len(this.Sinks) != len(that1.Sinks) { + if this.AwsExternalId != that1.AwsExternalId { + return false + } + if len(this.OutputSinks) != len(that1.OutputSinks) { return false } - for i := range this.Sinks { - if !this.Sinks[i].Equal(that1.Sinks[i]) { + for i := range this.OutputSinks { + if !this.OutputSinks[i].Equal(that1.OutputSinks[i]) { return false } } @@ -1411,62 +912,6 @@ func (this *MetricsSpec) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *KinesisSpec) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&account.KinesisSpec{") - s = append(s, "AssumedRole: "+fmt.Sprintf("%#v", this.AssumedRole)+",\n") - s = append(s, "DestinationUri: "+fmt.Sprintf("%#v", this.DestinationUri)+",\n") - s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *SinkSpec) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&account.SinkSpec{") - s = append(s, "Sink: "+fmt.Sprintf("%#v", this.Sink)+",\n") - s = append(s, "SinkType: "+fmt.Sprintf("%#v", this.SinkType)+",\n") - s = append(s, "DestinationType: "+fmt.Sprintf("%#v", this.DestinationType)+",\n") - if this.KinesisSink != nil { - s = append(s, "KinesisSink: "+fmt.Sprintf("%#v", this.KinesisSink)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *KinesisStatus) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&account.KinesisStatus{") - s = append(s, "ExternalId: "+fmt.Sprintf("%#v", this.ExternalId)+",\n") - s = append(s, "ErrorMessage: "+fmt.Sprintf("%#v", this.ErrorMessage)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Sink) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&account.Sink{") - s = append(s, "Sink: "+fmt.Sprintf("%#v", this.Sink)+",\n") - s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") - s = append(s, "Message: "+fmt.Sprintf("%#v", this.Message)+",\n") - if this.LastSucceededTime != nil { - s = append(s, "LastSucceededTime: "+fmt.Sprintf("%#v", this.LastSucceededTime)+",\n") - } - if this.Status != nil { - s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} func (this *Metrics) GoString() string { if this == nil { return "nil" @@ -1486,18 +931,18 @@ func (this *AccountSpec) GoString() string { if this.Metrics != nil { s = append(s, "Metrics: "+fmt.Sprintf("%#v", this.Metrics)+",\n") } - keysForSinks := make([]string, 0, len(this.Sinks)) - for k, _ := range this.Sinks { - keysForSinks = append(keysForSinks, k) + keysForOutputSinks := make([]string, 0, len(this.OutputSinks)) + for k, _ := range this.OutputSinks { + keysForOutputSinks = append(keysForOutputSinks, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSinks) - mapStringForSinks := "map[string]*SinkSpec{" - for _, k := range keysForSinks { - mapStringForSinks += fmt.Sprintf("%#v: %#v,", k, this.Sinks[k]) + github_com_gogo_protobuf_sortkeys.Strings(keysForOutputSinks) + mapStringForOutputSinks := "map[string]*v1.SinkSpec{" + for _, k := range keysForOutputSinks { + mapStringForOutputSinks += fmt.Sprintf("%#v: %#v,", k, this.OutputSinks[k]) } - mapStringForSinks += "}" - if this.Sinks != nil { - s = append(s, "Sinks: "+mapStringForSinks+",\n") + mapStringForOutputSinks += "}" + if this.OutputSinks != nil { + s = append(s, "OutputSinks: "+mapStringForOutputSinks+",\n") } s = append(s, "}") return strings.Join(s, "") @@ -1506,7 +951,7 @@ func (this *Account) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 12) + s := make([]string, 0, 13) s = append(s, "&account.Account{") s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") if this.Spec != nil { @@ -1523,18 +968,19 @@ func (this *Account) GoString() string { if this.Metrics != nil { s = append(s, "Metrics: "+fmt.Sprintf("%#v", this.Metrics)+",\n") } - keysForSinks := make([]string, 0, len(this.Sinks)) - for k, _ := range this.Sinks { - keysForSinks = append(keysForSinks, k) + s = append(s, "AwsExternalId: "+fmt.Sprintf("%#v", this.AwsExternalId)+",\n") + keysForOutputSinks := make([]string, 0, len(this.OutputSinks)) + for k, _ := range this.OutputSinks { + keysForOutputSinks = append(keysForOutputSinks, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSinks) - mapStringForSinks := "map[string]*Sink{" - for _, k := range keysForSinks { - mapStringForSinks += fmt.Sprintf("%#v: %#v,", k, this.Sinks[k]) + github_com_gogo_protobuf_sortkeys.Strings(keysForOutputSinks) + mapStringForOutputSinks := "map[string]*v1.Sink{" + for _, k := range keysForOutputSinks { + mapStringForOutputSinks += fmt.Sprintf("%#v: %#v,", k, this.OutputSinks[k]) } - mapStringForSinks += "}" - if this.Sinks != nil { - s = append(s, "Sinks: "+mapStringForSinks+",\n") + mapStringForOutputSinks += "}" + if this.OutputSinks != nil { + s = append(s, "OutputSinks: "+mapStringForOutputSinks+",\n") } s = append(s, "}") return strings.Join(s, "") @@ -1738,7 +1184,7 @@ func (m *MetricsSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *KinesisSpec) Marshal() (dAtA []byte, err error) { +func (m *Metrics) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1748,41 +1194,27 @@ func (m *KinesisSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *KinesisSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *KinesisSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Region) > 0 { - i -= len(m.Region) - copy(dAtA[i:], m.Region) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Region))) - i-- - dAtA[i] = 0x1a - } - if len(m.DestinationUri) > 0 { - i -= len(m.DestinationUri) - copy(dAtA[i:], m.DestinationUri) - i = encodeVarintMessage(dAtA, i, uint64(len(m.DestinationUri))) - i-- - dAtA[i] = 0x12 - } - if len(m.AssumedRole) > 0 { - i -= len(m.AssumedRole) - copy(dAtA[i:], m.AssumedRole) - i = encodeVarintMessage(dAtA, i, uint64(len(m.AssumedRole))) + if len(m.Uri) > 0 { + i -= len(m.Uri) + copy(dAtA[i:], m.Uri) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Uri))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SinkSpec) Marshal() (dAtA []byte, err error) { +func (m *AccountSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1792,19 +1224,45 @@ func (m *SinkSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SinkSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *AccountSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SinkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AccountSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.KinesisSink != nil { + if len(m.OutputSinks) > 0 { + for k := range m.OutputSinks { + v := m.OutputSinks[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintMessage(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintMessage(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if m.Metrics != nil { { - size, err := m.KinesisSink.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1812,29 +1270,12 @@ func (m *SinkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintMessage(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - } - if m.DestinationType != 0 { - i = encodeVarintMessage(dAtA, i, uint64(m.DestinationType)) - i-- - dAtA[i] = 0x18 - } - if m.SinkType != 0 { - i = encodeVarintMessage(dAtA, i, uint64(m.SinkType)) - i-- - dAtA[i] = 0x10 - } - if len(m.Sink) > 0 { - i -= len(m.Sink) - copy(dAtA[i:], m.Sink) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Sink))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *KinesisStatus) Marshal() (dAtA []byte, err error) { +func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1844,56 +1285,64 @@ func (m *KinesisStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *KinesisStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *Account) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *KinesisStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintMessage(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 + if len(m.OutputSinks) > 0 { + for k := range m.OutputSinks { + v := m.OutputSinks[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintMessage(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintMessage(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x52 + } } - if len(m.ExternalId) > 0 { - i -= len(m.ExternalId) - copy(dAtA[i:], m.ExternalId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.ExternalId))) + if len(m.AwsExternalId) > 0 { + i -= len(m.AwsExternalId) + copy(dAtA[i:], m.AwsExternalId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AwsExternalId))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x4a } - return len(dAtA) - i, nil -} - -func (m *Sink) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Metrics != nil { + { + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a } - return dAtA[:n], nil -} - -func (m *Sink) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sink) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != nil { + if m.LastModifiedTime != nil { { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LastModifiedTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1901,11 +1350,11 @@ func (m *Sink) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintMessage(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } - if m.LastSucceededTime != nil { + if m.CreatedTime != nil { { - size, err := m.LastSucceededTime.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.CreatedTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1913,214 +1362,19 @@ func (m *Sink) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintMessage(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Message))) + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.RequestId))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if m.State != 0 { i = encodeVarintMessage(dAtA, i, uint64(m.State)) i-- - dAtA[i] = 0x10 - } - if len(m.Sink) > 0 { - i -= len(m.Sink) - copy(dAtA[i:], m.Sink) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Sink))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Uri) > 0 { - i -= len(m.Uri) - copy(dAtA[i:], m.Uri) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Uri))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AccountSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccountSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccountSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sinks) > 0 { - for k := range m.Sinks { - v := m.Sinks[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMessage(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMessage(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Account) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Account) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sinks) > 0 { - for k := range m.Sinks { - v := m.Sinks[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMessage(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMessage(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x42 - } - } - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.LastModifiedTime != nil { - { - size, err := m.LastModifiedTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.CreatedTime != nil { - { - size, err := m.CreatedTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x22 - } - if m.State != 0 { - i = encodeVarintMessage(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x18 + dAtA[i] = 0x18 } if m.Spec != nil { { @@ -2234,95 +1488,6 @@ func (m *MetricsSpec) Size() (n int) { return n } -func (m *KinesisSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AssumedRole) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.DestinationUri) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.Region) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - return n -} - -func (m *SinkSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sink) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - if m.SinkType != 0 { - n += 1 + sovMessage(uint64(m.SinkType)) - } - if m.DestinationType != 0 { - n += 1 + sovMessage(uint64(m.DestinationType)) - } - if m.KinesisSink != nil { - l = m.KinesisSink.Size() - n += 1 + l + sovMessage(uint64(l)) - } - return n -} - -func (m *KinesisStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ExternalId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - return n -} - -func (m *Sink) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sink) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - if m.State != 0 { - n += 1 + sovMessage(uint64(m.State)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - if m.LastSucceededTime != nil { - l = m.LastSucceededTime.Size() - n += 1 + l + sovMessage(uint64(l)) - } - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovMessage(uint64(l)) - } - return n -} - func (m *Metrics) Size() (n int) { if m == nil { return 0 @@ -2346,8 +1511,8 @@ func (m *AccountSpec) Size() (n int) { l = m.Metrics.Size() n += 1 + l + sovMessage(uint64(l)) } - if len(m.Sinks) > 0 { - for k, v := range m.Sinks { + if len(m.OutputSinks) > 0 { + for k, v := range m.OutputSinks { _ = k _ = v l = 0 @@ -2395,8 +1560,12 @@ func (m *Account) Size() (n int) { l = m.Metrics.Size() n += 1 + l + sovMessage(uint64(l)) } - if len(m.Sinks) > 0 { - for k, v := range m.Sinks { + l = len(m.AwsExternalId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.OutputSinks) > 0 { + for k, v := range m.OutputSinks { _ = k _ = v l = 0 @@ -2472,62 +1641,12 @@ func (this *MetricsSpec) String() string { }, "") return s } -func (this *KinesisSpec) String() string { +func (this *Metrics) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&KinesisSpec{`, - `AssumedRole:` + fmt.Sprintf("%v", this.AssumedRole) + `,`, - `DestinationUri:` + fmt.Sprintf("%v", this.DestinationUri) + `,`, - `Region:` + fmt.Sprintf("%v", this.Region) + `,`, - `}`, - }, "") - return s -} -func (this *SinkSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SinkSpec{`, - `Sink:` + fmt.Sprintf("%v", this.Sink) + `,`, - `SinkType:` + fmt.Sprintf("%v", this.SinkType) + `,`, - `DestinationType:` + fmt.Sprintf("%v", this.DestinationType) + `,`, - `KinesisSink:` + strings.Replace(this.KinesisSink.String(), "KinesisSpec", "KinesisSpec", 1) + `,`, - `}`, - }, "") - return s -} -func (this *KinesisStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&KinesisStatus{`, - `ExternalId:` + fmt.Sprintf("%v", this.ExternalId) + `,`, - `ErrorMessage:` + fmt.Sprintf("%v", this.ErrorMessage) + `,`, - `}`, - }, "") - return s -} -func (this *Sink) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Sink{`, - `Sink:` + fmt.Sprintf("%v", this.Sink) + `,`, - `State:` + fmt.Sprintf("%v", this.State) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `LastSucceededTime:` + strings.Replace(fmt.Sprintf("%v", this.LastSucceededTime), "Timestamp", "types.Timestamp", 1) + `,`, - `Status:` + strings.Replace(this.Status.String(), "KinesisStatus", "KinesisStatus", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Metrics) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Metrics{`, - `Uri:` + fmt.Sprintf("%v", this.Uri) + `,`, + s := strings.Join([]string{`&Metrics{`, + `Uri:` + fmt.Sprintf("%v", this.Uri) + `,`, `}`, }, "") return s @@ -2536,19 +1655,19 @@ func (this *AccountSpec) String() string { if this == nil { return "nil" } - keysForSinks := make([]string, 0, len(this.Sinks)) - for k, _ := range this.Sinks { - keysForSinks = append(keysForSinks, k) + keysForOutputSinks := make([]string, 0, len(this.OutputSinks)) + for k, _ := range this.OutputSinks { + keysForOutputSinks = append(keysForOutputSinks, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSinks) - mapStringForSinks := "map[string]*SinkSpec{" - for _, k := range keysForSinks { - mapStringForSinks += fmt.Sprintf("%v: %v,", k, this.Sinks[k]) + github_com_gogo_protobuf_sortkeys.Strings(keysForOutputSinks) + mapStringForOutputSinks := "map[string]*v1.SinkSpec{" + for _, k := range keysForOutputSinks { + mapStringForOutputSinks += fmt.Sprintf("%v: %v,", k, this.OutputSinks[k]) } - mapStringForSinks += "}" + mapStringForOutputSinks += "}" s := strings.Join([]string{`&AccountSpec{`, `Metrics:` + strings.Replace(this.Metrics.String(), "MetricsSpec", "MetricsSpec", 1) + `,`, - `Sinks:` + mapStringForSinks + `,`, + `OutputSinks:` + mapStringForOutputSinks + `,`, `}`, }, "") return s @@ -2557,16 +1676,16 @@ func (this *Account) String() string { if this == nil { return "nil" } - keysForSinks := make([]string, 0, len(this.Sinks)) - for k, _ := range this.Sinks { - keysForSinks = append(keysForSinks, k) + keysForOutputSinks := make([]string, 0, len(this.OutputSinks)) + for k, _ := range this.OutputSinks { + keysForOutputSinks = append(keysForOutputSinks, k) } - github_com_gogo_protobuf_sortkeys.Strings(keysForSinks) - mapStringForSinks := "map[string]*Sink{" - for _, k := range keysForSinks { - mapStringForSinks += fmt.Sprintf("%v: %v,", k, this.Sinks[k]) + github_com_gogo_protobuf_sortkeys.Strings(keysForOutputSinks) + mapStringForOutputSinks := "map[string]*v1.Sink{" + for _, k := range keysForOutputSinks { + mapStringForOutputSinks += fmt.Sprintf("%v: %v,", k, this.OutputSinks[k]) } - mapStringForSinks += "}" + mapStringForOutputSinks += "}" s := strings.Join([]string{`&Account{`, `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, `Spec:` + strings.Replace(this.Spec.String(), "AccountSpec", "AccountSpec", 1) + `,`, @@ -2575,7 +1694,8 @@ func (this *Account) String() string { `CreatedTime:` + strings.Replace(fmt.Sprintf("%v", this.CreatedTime), "Timestamp", "types.Timestamp", 1) + `,`, `LastModifiedTime:` + strings.Replace(fmt.Sprintf("%v", this.LastModifiedTime), "Timestamp", "types.Timestamp", 1) + `,`, `Metrics:` + strings.Replace(this.Metrics.String(), "Metrics", "Metrics", 1) + `,`, - `Sinks:` + mapStringForSinks + `,`, + `AwsExternalId:` + fmt.Sprintf("%v", this.AwsExternalId) + `,`, + `OutputSinks:` + mapStringForOutputSinks + `,`, `}`, }, "") return s @@ -2831,622 +1951,88 @@ func (m *MeteringEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMessage - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMessage - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMessage - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthMessage - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &MeteringRecord{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMessage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Records[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamespaceUsageRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamespaceUsageRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamespaceUsageRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Entry == nil { - m.Entry = &MeteringEntry{} - } - if err := m.Entry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetricsSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricsSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricsSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptedClientCa", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AcceptedClientCa = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KinesisSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KinesisSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KinesisSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssumedRole", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssumedRole = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationUri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SinkSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SinkSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SinkSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sink", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sink = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SinkType", wireType) - } - m.SinkType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SinkType |= SinkType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationType", wireType) - } - m.DestinationType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DestinationType |= SinkDestinationType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KinesisSink", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMessage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthMessage + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMessage + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthMessage + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &MeteringRecord{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.KinesisSink == nil { - m.KinesisSink = &KinesisSpec{} - } - if err := m.KinesisSink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Records[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -3472,7 +2058,7 @@ func (m *SinkSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *KinesisStatus) Unmarshal(dAtA []byte) error { +func (m *NamespaceUsageRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3495,15 +2081,15 @@ func (m *KinesisStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: KinesisStatus: wiretype end group for non-group") + return fmt.Errorf("proto: NamespaceUsageRecord: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: KinesisStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NamespaceUsageRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3531,13 +2117,13 @@ func (m *KinesisStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExternalId = string(dAtA[iNdEx:postIndex]) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entry", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage @@ -3547,23 +2133,27 @@ func (m *KinesisStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthMessage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthMessage } if postIndex > l { return io.ErrUnexpectedEOF } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) + if m.Entry == nil { + m.Entry = &MeteringEntry{} + } + if err := m.Entry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3589,7 +2179,7 @@ func (m *KinesisStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *Sink) Unmarshal(dAtA []byte) error { +func (m *MetricsSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3612,49 +2202,17 @@ func (m *Sink) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Sink: wiretype end group for non-group") + return fmt.Errorf("proto: MetricsSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Sink: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetricsSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sink", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sink = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) } - m.State = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage @@ -3664,14 +2222,15 @@ func (m *Sink) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= SinkState(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: + m.Enabled = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AcceptedClientCa", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3699,79 +2258,7 @@ func (m *Sink) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSucceededTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastSucceededTime == nil { - m.LastSucceededTime = &types.Timestamp{} - } - if err := m.LastSucceededTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &KinesisStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.AcceptedClientCa = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3947,9 +2434,9 @@ func (m *AccountSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sinks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputSinks", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3976,11 +2463,11 @@ func (m *AccountSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Sinks == nil { - m.Sinks = make(map[string]*SinkSpec) + if m.OutputSinks == nil { + m.OutputSinks = make(map[string]*v1.SinkSpec) } var mapkey string - var mapvalue *SinkSpec + var mapvalue *v1.SinkSpec for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -4054,7 +2541,7 @@ func (m *AccountSpec) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &SinkSpec{} + mapvalue = &v1.SinkSpec{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -4074,7 +2561,7 @@ func (m *AccountSpec) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Sinks[mapkey] = mapvalue + m.OutputSinks[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -4356,9 +2843,41 @@ func (m *Account) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AwsExternalId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AwsExternalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sinks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputSinks", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4385,11 +2904,11 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Sinks == nil { - m.Sinks = make(map[string]*Sink) + if m.OutputSinks == nil { + m.OutputSinks = make(map[string]*v1.Sink) } var mapkey string - var mapvalue *Sink + var mapvalue *v1.Sink for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -4463,7 +2982,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &Sink{} + mapvalue = &v1.Sink{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -4483,7 +3002,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Sinks[mapkey] = mapvalue + m.OutputSinks[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex diff --git a/protogen/api/accountservice/v1/request_response.pb.go b/protogen/api/accountservice/v1/request_response.pb.go index f57983dd..77f39dd8 100644 --- a/protogen/api/accountservice/v1/request_response.pb.go +++ b/protogen/api/accountservice/v1/request_response.pb.go @@ -5,15 +5,15 @@ package accountservice import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" reflect "reflect" strings "strings" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" v1 "github.com/temporalio/tcld/protogen/api/account/v1" + v12 "github.com/temporalio/tcld/protogen/api/common/v1" v11 "github.com/temporalio/tcld/protogen/api/request/v1" ) @@ -547,6 +547,84 @@ func (m *UpdateAccountResponse) GetRequestStatus() *v11.RequestStatus { return nil } +type GetRegionsRequest struct { +} + +func (m *GetRegionsRequest) Reset() { *m = GetRegionsRequest{} } +func (*GetRegionsRequest) ProtoMessage() {} +func (*GetRegionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e50566fc74ec64cc, []int{10} +} +func (m *GetRegionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRegionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRegionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRegionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRegionsRequest.Merge(m, src) +} +func (m *GetRegionsRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRegionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRegionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRegionsRequest proto.InternalMessageInfo + +type GetRegionsResponse struct { + Regions []*v12.Region `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` +} + +func (m *GetRegionsResponse) Reset() { *m = GetRegionsResponse{} } +func (*GetRegionsResponse) ProtoMessage() {} +func (*GetRegionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e50566fc74ec64cc, []int{11} +} +func (m *GetRegionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRegionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRegionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRegionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRegionsResponse.Merge(m, src) +} +func (m *GetRegionsResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRegionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRegionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRegionsResponse proto.InternalMessageInfo + +func (m *GetRegionsResponse) GetRegions() []*v12.Region { + if m != nil { + return m.Regions + } + return nil +} + func init() { proto.RegisterType((*GetNamespaceUsageRequest)(nil), "api.accountservice.v1.GetNamespaceUsageRequest") proto.RegisterType((*GetNamespaceUsageResponse)(nil), "api.accountservice.v1.GetNamespaceUsageResponse") @@ -558,6 +636,8 @@ func init() { proto.RegisterType((*GetAccountResponse)(nil), "api.accountservice.v1.GetAccountResponse") proto.RegisterType((*UpdateAccountRequest)(nil), "api.accountservice.v1.UpdateAccountRequest") proto.RegisterType((*UpdateAccountResponse)(nil), "api.accountservice.v1.UpdateAccountResponse") + proto.RegisterType((*GetRegionsRequest)(nil), "api.accountservice.v1.GetRegionsRequest") + proto.RegisterType((*GetRegionsResponse)(nil), "api.accountservice.v1.GetRegionsResponse") } func init() { @@ -565,48 +645,50 @@ func init() { } var fileDescriptor_e50566fc74ec64cc = []byte{ - // 644 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4d, 0x4f, 0xd4, 0x5e, - 0x14, 0xc6, 0xe7, 0x32, 0xfc, 0xff, 0xd0, 0x83, 0xbc, 0x55, 0x81, 0x91, 0x97, 0xeb, 0xa4, 0x31, - 0x66, 0x4c, 0x4c, 0xeb, 0x60, 0x8c, 0x31, 0xae, 0x7c, 0x0b, 0x61, 0xa1, 0x21, 0x05, 0x5c, 0x98, - 0x98, 0xe6, 0xd2, 0x1e, 0x9a, 0x46, 0xa6, 0xad, 0xf7, 0xde, 0x4e, 0x94, 0x95, 0xdf, 0x40, 0xfd, - 0x16, 0x7e, 0x14, 0x5d, 0xc9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xbb, 0x17, 0x25, 0x9e, 0x75, 0xe6, 0x0f, 0xc0, 0x83, 0xaa, - 0xb2, 0xf3, 0x7f, 0xfe, 0xdc, 0xee, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x78, 0x3f, 0x0a, 0x36, - 0x2f, 0x06, 0x00, 0x00, + // 688 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x6e, 0xd3, 0x4e, + 0x14, 0xc5, 0x33, 0x4d, 0xff, 0xff, 0x34, 0x53, 0xfa, 0x65, 0x68, 0x1b, 0xd2, 0xd6, 0x44, 0x16, + 0x42, 0x41, 0x42, 0x36, 0x29, 0x42, 0x08, 0xb1, 0xe2, 0xa3, 0xaa, 0xba, 0x00, 0x55, 0xd3, 0x96, + 0x05, 0x12, 0x8a, 0x5c, 0xfb, 0xd6, 0xb2, 0xa8, 0x3d, 0x66, 0x66, 0x1c, 0x41, 0x57, 0xbc, 0x01, + 0xf0, 0x16, 0x3c, 0x0a, 0xac, 0xe8, 0xb2, 0x4b, 0xea, 0x6e, 0xd8, 0xd1, 0x47, 0x40, 0xf6, 0xcc, + 0x90, 0x38, 0x29, 0x02, 0xda, 0xe5, 0x9c, 0x7b, 0xef, 0x39, 0xbe, 0x3f, 0x4f, 0x1c, 0x7c, 0xcb, + 0x4d, 0x42, 0xc7, 0xf5, 0x3c, 0x9a, 0xc6, 0x82, 0x03, 0xeb, 0x85, 0x1e, 0x38, 0xbd, 0x8e, 0xc3, + 0xe0, 0x75, 0x0a, 0x5c, 0x74, 0x19, 0xf0, 0x84, 0xc6, 0x1c, 0xec, 0x84, 0x51, 0x41, 0x8d, 0x79, + 0x37, 0x09, 0xed, 0x72, 0xb7, 0xdd, 0xeb, 0x34, 0x97, 0x07, 0x4c, 0xf2, 0xe9, 0x08, 0x38, 0x77, + 0x03, 0x35, 0xd4, 0x5c, 0xca, 0xab, 0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dd, 0x1e, 0x30, 0x1e, 0x52, 0xfd, 0xda, 0x67, 0xb4, 0xfe, 0x5c, 0xca, 0xf9, + 0x6f, 0x43, 0x7f, 0x49, 0x43, 0x09, 0xb9, 0x4e, 0xea, 0x4a, 0xd9, 0xf0, 0xad, 0x97, 0x78, 0x7e, + 0xe8, 0x91, 0xd4, 0x7e, 0x4f, 0xf0, 0xb4, 0x9e, 0xe3, 0xc2, 0x15, 0x29, 0x57, 0x4f, 0x27, 0x51, + 0xaa, 0x52, 0xfe, 0x74, 0x6a, 0x89, 0xad, 0xa2, 0x89, 0x4c, 0xb1, 0xc1, 0xa3, 0x02, 0x4a, 0x20, + 0x08, 0x69, 0xcc, 0x35, 0xd0, 0xb5, 0x02, 0xe8, 0x2f, 0x51, 0x05, 0x3a, 0xb8, 0xc6, 0xa4, 0xa4, + 0x5e, 0xda, 0x7c, 0x91, 0x24, 0xbf, 0xda, 0x32, 0x28, 0xaf, 0x12, 0xdd, 0xf5, 0x68, 0xef, 0xf0, + 0xd8, 0xac, 0x1c, 0x1d, 0x9b, 0x95, 0xd3, 0x63, 0x13, 0xbd, 0xcb, 0x4c, 0xf4, 0x29, 0x33, 0xd1, + 0xe7, 0xcc, 0x44, 0x87, 0x99, 0x89, 0xbe, 0x65, 0x26, 0xfa, 0x9e, 0x99, 0x95, 0xd3, 0xcc, 0x44, + 0x1f, 0x4e, 0xcc, 0xca, 0xe1, 0x89, 0x59, 0x39, 0x3a, 0x31, 0x2b, 0x2f, 0x6e, 0x8b, 0x28, 0x61, + 0xfb, 0xb6, 0xb7, 0x4f, 0x53, 0xdf, 0x39, 0xf3, 0x9f, 0xe7, 0x41, 0x59, 0xd9, 0xfd, 0xbf, 0xb8, + 0xca, 0x77, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x4b, 0xb6, 0xd6, 0xa8, 0x06, 0x00, 0x00, } func (this *GetNamespaceUsageRequest) Equal(that interface{}) bool { @@ -894,6 +976,56 @@ func (this *UpdateAccountResponse) Equal(that interface{}) bool { } return true } +func (this *GetRegionsRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRegionsRequest) + if !ok { + that2, ok := that.(GetRegionsRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (this *GetRegionsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRegionsResponse) + if !ok { + that2, ok := that.(GetRegionsResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Regions) != len(that1.Regions) { + return false + } + for i := range this.Regions { + if !this.Regions[i].Equal(that1.Regions[i]) { + return false + } + } + return true +} func (this *GetNamespaceUsageRequest) GoString() string { if this == nil { return "nil" @@ -1028,6 +1160,27 @@ func (this *UpdateAccountResponse) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *GetRegionsRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&accountservice.GetRegionsRequest{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRegionsResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&accountservice.GetRegionsResponse{") + if this.Regions != nil { + s = append(s, "Regions: "+fmt.Sprintf("%#v", this.Regions)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringRequestResponse(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1466,6 +1619,66 @@ func (m *UpdateAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GetRegionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRegionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRegionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetRegionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRegionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRegionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Regions) > 0 { + for iNdEx := len(m.Regions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Regions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { offset -= sovRequestResponse(v) base := offset @@ -1650,6 +1863,30 @@ func (m *UpdateAccountResponse) Size() (n int) { return n } +func (m *GetRegionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetRegionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Regions) > 0 { + for _, e := range m.Regions { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + return n +} + func sovRequestResponse(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1781,6 +2018,30 @@ func (this *UpdateAccountResponse) String() string { }, "") return s } +func (this *GetRegionsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRegionsRequest{`, + `}`, + }, "") + return s +} +func (this *GetRegionsResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRegions := "[]*Region{" + for _, f := range this.Regions { + repeatedStringForRegions += strings.Replace(fmt.Sprintf("%v", f), "Region", "v12.Region", 1) + "," + } + repeatedStringForRegions += "}" + s := strings.Join([]string{`&GetRegionsResponse{`, + `Regions:` + repeatedStringForRegions + `,`, + `}`, + }, "") + return s +} func valueToStringRequestResponse(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -2962,6 +3223,146 @@ func (m *UpdateAccountResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetRegionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRegionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRegionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRegionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRegionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRegionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Regions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Regions = append(m.Regions, &v12.Region{}) + if err := m.Regions[len(m.Regions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipRequestResponse(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protogen/api/accountservice/v1/service.pb.go b/protogen/api/accountservice/v1/service.pb.go index cc426e29..57017b35 100644 --- a/protogen/api/accountservice/v1/service.pb.go +++ b/protogen/api/accountservice/v1/service.pb.go @@ -6,12 +6,11 @@ package accountservice import ( context "context" fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -30,32 +29,33 @@ func init() { } var fileDescriptor_3e50bdfe3e07e117 = []byte{ - // 307 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xb1, 0x4a, 0xc4, 0x30, - 0x18, 0xc7, 0x13, 0x10, 0x87, 0x80, 0x8a, 0x01, 0x97, 0x1b, 0xbe, 0x41, 0x17, 0xc5, 0x33, 0xbd, - 0xd3, 0xd1, 0x49, 0x97, 0xdb, 0x1c, 0x94, 0x5b, 0x5c, 0x24, 0xe6, 0xa2, 0x14, 0x7a, 0xd7, 0x98, - 0xa4, 0x45, 0x70, 0xf1, 0x11, 0x7c, 0x0c, 0x1f, 0xc5, 0x49, 0x3a, 0xde, 0x68, 0xd3, 0xc5, 0xf1, - 0x1e, 0x41, 0x30, 0x6d, 0xbd, 0x62, 0x0f, 0xeb, 0x16, 0xf2, 0xfd, 0xfe, 0xff, 0x5f, 0x08, 0x1f, - 0xd9, 0xe3, 0x2a, 0x0c, 0xb8, 0x10, 0x71, 0x32, 0xb3, 0x46, 0xea, 0x34, 0x14, 0x32, 0x48, 0x87, - 0x41, 0x79, 0x64, 0x4a, 0xc7, 0x36, 0xa6, 0x3b, 0x5c, 0x85, 0xac, 0x09, 0xb1, 0x74, 0xd8, 0xeb, - 0xb7, 0x67, 0xb5, 0x7c, 0x48, 0xa4, 0xb1, 0x37, 0x5a, 0x1a, 0x15, 0xcf, 0x4c, 0x59, 0x72, 0xfc, - 0xbe, 0x46, 0x36, 0xcf, 0x3c, 0x7c, 0xe5, 0x61, 0xfa, 0x48, 0xb6, 0x47, 0xd2, 0x5e, 0xf0, 0xa9, - 0x34, 0x8a, 0x0b, 0x39, 0x36, 0xfc, 0x5e, 0xd2, 0x80, 0xb5, 0xda, 0xd8, 0x2f, 0xf2, 0xd2, 0x7b, - 0x7a, 0x83, 0xee, 0x01, 0xff, 0xa0, 0x5d, 0x44, 0x9f, 0x08, 0x5d, 0x1e, 0x1b, 0xaf, 0xee, 0xd2, - 0x64, 0x1a, 0xee, 0xe1, 0x3f, 0x12, 0xb5, 0x5c, 0x93, 0xad, 0x91, 0xb4, 0xe5, 0x5f, 0x78, 0xf3, - 0xd1, 0xea, 0x9e, 0x65, 0xae, 0xd2, 0xb2, 0xae, 0x78, 0xed, 0x14, 0x84, 0xfc, 0x0c, 0xe9, 0xfe, - 0x9f, 0xf9, 0xca, 0x74, 0xd0, 0x81, 0xac, 0x25, 0x11, 0xd9, 0x18, 0xab, 0x09, 0xb7, 0xb2, 0xf2, - 0x1c, 0xae, 0x48, 0x37, 0xa8, 0x4a, 0xd5, 0xef, 0x06, 0x57, 0xb6, 0xf3, 0xbb, 0x2c, 0x07, 0x34, - 0xcf, 0x01, 0x2d, 0x72, 0xc0, 0xcf, 0x0e, 0xf0, 0xab, 0x03, 0xfc, 0xe6, 0x00, 0x67, 0x0e, 0xf0, - 0x87, 0x03, 0xfc, 0xe9, 0x00, 0x2d, 0x1c, 0xe0, 0x97, 0x02, 0x50, 0x56, 0x00, 0x9a, 0x17, 0x80, - 0xae, 0x07, 0x76, 0xaa, 0x74, 0xc4, 0x44, 0x14, 0x27, 0x93, 0xa0, 0x75, 0x81, 0x4f, 0x9b, 0x37, - 0xb7, 0xeb, 0xdf, 0xfb, 0x7b, 0xf2, 0x15, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x13, 0x49, 0x81, 0x2b, - 0x03, 0x00, 0x00, + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0xed, 0x01, 0x06, 0x4b, 0x80, 0x88, 0xc4, 0xd2, 0xe1, 0x06, 0x58, 0x40, 0x14, 0xa7, + 0x85, 0x91, 0x09, 0x96, 0x6e, 0x0c, 0x45, 0x5d, 0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0x73, + 0xcf, 0xe1, 0x8a, 0x74, 0x89, 0xca, 0x55, 0xf5, 0x30, 0xf8, 0xdb, 0x48, 0x6d, 0xec, 0xa5, 0x72, + 0x68, 0x7e, 0x1b, 0x29, 0x43, 0x02, 0x46, 0x2a, 0xc8, 0x5c, 0x72, 0x7e, 0x3b, 0x99, 0x01, 0x99, + 0xce, 0x80, 0x2c, 0x66, 0x40, 0x1f, 0x1d, 0xd0, 0x67, 0x07, 0xf4, 0xd5, 0x01, 0x9d, 0x38, 0xa0, + 0x6f, 0x0e, 0xe8, 0xbb, 0x03, 0xb2, 0x70, 0x40, 0x9f, 0xe6, 0x40, 0x26, 0x73, 0x20, 0xd3, 0x39, + 0x90, 0xab, 0x86, 0x1d, 0x28, 0xdd, 0xe7, 0x49, 0x5f, 0x8e, 0xba, 0x71, 0xe5, 0x96, 0x9c, 0x96, + 0x6f, 0x6e, 0xd6, 0x3f, 0x97, 0xe4, 0xe4, 0x23, 0x00, 0x00, 0xff, 0xff, 0xa1, 0xcd, 0x29, 0x05, + 0x90, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -65,23 +65,25 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AccountServiceClient interface { - // Get the usage records of a given namespace. + // Gets the usage records of a given namespace. GetNamespaceUsage(ctx context.Context, in *GetNamespaceUsageRequest, opts ...grpc.CallOption) (*GetNamespaceUsageResponse, error) - // Get the usage records of a subset of namespaces belonging to a Temporal account. + // Gets the usage records of a subset of namespaces belonging to a Temporal account. GetNamespacesUsage(ctx context.Context, in *GetNamespacesUsageRequest, opts ...grpc.CallOption) (*GetNamespacesUsageResponse, error) - // Get the usage records of a Temporal account. + // Gets the usage records of a Temporal account. GetAccountUsage(ctx context.Context, in *GetAccountUsageRequest, opts ...grpc.CallOption) (*GetAccountUsageResponse, error) - // GetAccount describes account configuration in detail + // Describes account configuration in detail GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) - // UpdateAccount updates Account configuration settings on Temporal cloud. + // Updates Account configuration settings on Temporal cloud. UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) + // Gets all cloud regions enabled for namespace creation. + GetRegions(ctx context.Context, in *GetRegionsRequest, opts ...grpc.CallOption) (*GetRegionsResponse, error) } type accountServiceClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient { +func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient { return &accountServiceClient{cc} } @@ -130,18 +132,29 @@ func (c *accountServiceClient) UpdateAccount(ctx context.Context, in *UpdateAcco return out, nil } +func (c *accountServiceClient) GetRegions(ctx context.Context, in *GetRegionsRequest, opts ...grpc.CallOption) (*GetRegionsResponse, error) { + out := new(GetRegionsResponse) + err := c.cc.Invoke(ctx, "/api.accountservice.v1.AccountService/GetRegions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AccountServiceServer is the server API for AccountService service. type AccountServiceServer interface { - // Get the usage records of a given namespace. + // Gets the usage records of a given namespace. GetNamespaceUsage(context.Context, *GetNamespaceUsageRequest) (*GetNamespaceUsageResponse, error) - // Get the usage records of a subset of namespaces belonging to a Temporal account. + // Gets the usage records of a subset of namespaces belonging to a Temporal account. GetNamespacesUsage(context.Context, *GetNamespacesUsageRequest) (*GetNamespacesUsageResponse, error) - // Get the usage records of a Temporal account. + // Gets the usage records of a Temporal account. GetAccountUsage(context.Context, *GetAccountUsageRequest) (*GetAccountUsageResponse, error) - // GetAccount describes account configuration in detail + // Describes account configuration in detail GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) - // UpdateAccount updates Account configuration settings on Temporal cloud. + // Updates Account configuration settings on Temporal cloud. UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) + // Gets all cloud regions enabled for namespace creation. + GetRegions(context.Context, *GetRegionsRequest) (*GetRegionsResponse, error) } // UnimplementedAccountServiceServer can be embedded to have forward compatible implementations. @@ -163,6 +176,9 @@ func (*UnimplementedAccountServiceServer) GetAccount(ctx context.Context, req *G func (*UnimplementedAccountServiceServer) UpdateAccount(ctx context.Context, req *UpdateAccountRequest) (*UpdateAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented") } +func (*UnimplementedAccountServiceServer) GetRegions(ctx context.Context, req *GetRegionsRequest) (*GetRegionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRegions not implemented") +} func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer) { s.RegisterService(&_AccountService_serviceDesc, srv) @@ -258,6 +274,24 @@ func _AccountService_UpdateAccount_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _AccountService_GetRegions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRegionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetRegions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.accountservice.v1.AccountService/GetRegions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetRegions(ctx, req.(*GetRegionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AccountService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.accountservice.v1.AccountService", HandlerType: (*AccountServiceServer)(nil), @@ -282,6 +316,10 @@ var _AccountService_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateAccount", Handler: _AccountService_UpdateAccount_Handler, }, + { + MethodName: "GetRegions", + Handler: _AccountService_GetRegions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/accountservice/v1/service.proto", diff --git a/protogen/api/auditlog/v1/message.pb.go b/protogen/api/auditlog/v1/message.pb.go index 27aef39d..985df03b 100644 --- a/protogen/api/auditlog/v1/message.pb.go +++ b/protogen/api/auditlog/v1/message.pb.go @@ -5,15 +5,14 @@ package auditlog import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" reflect "reflect" strconv "strconv" strings "strings" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -85,7 +84,7 @@ func (LogLevel) EnumDescriptor() ([]byte, []int) { } type LogRecord struct { - // log record id + // log record id. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Version of the log entry, starting from "0". Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` @@ -93,7 +92,7 @@ type LogRecord struct { Category LogCategory `protobuf:"varint,3,opt,name=category,proto3,enum=api.auditlog.v1.LogCategory" json:"category,omitempty"` // when does this log get generated from the source EmitTime *types.Timestamp `protobuf:"bytes,4,opt,name=emit_time,json=emitTime,proto3" json:"emit_time,omitempty"` - // customer ip address or server name + // customer ip address or server name, if it's "Temporal Internal", the real ip address will be hidden. CallerIpAddress string `protobuf:"bytes,5,opt,name=caller_ip_address,json=callerIpAddress,proto3" json:"caller_ip_address,omitempty"` // which namespace Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` @@ -111,6 +110,12 @@ type LogRecord struct { Region string `protobuf:"bytes,12,opt,name=region,proto3" json:"region,omitempty"` ThirdPartyDetails *ThirdPartyLogDetail `protobuf:"bytes,13,opt,name=third_party_details,json=thirdPartyDetails,proto3" json:"third_party_details,omitempty"` Tags []string `protobuf:"bytes,14,rep,name=tags,proto3" json:"tags,omitempty"` + // If it's customer/user's operator, use email address; if it's temporal's support to run operation on behalf of + // the customer, use "Temporal Internal" instead + UserEmail string `protobuf:"bytes,15,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // Detailed information about the operation. For example, it could be the invited user email for "InviteUser" operation, + // could be "enable audit logging" for UpdateAccount operation + OperationDetails string `protobuf:"bytes,16,opt,name=operation_details,json=operationDetails,proto3" json:"operation_details,omitempty"` } func (m *LogRecord) Reset() { *m = LogRecord{} } @@ -243,6 +248,20 @@ func (m *LogRecord) GetTags() []string { return nil } +func (m *LogRecord) GetUserEmail() string { + if m != nil { + return m.UserEmail + } + return "" +} + +func (m *LogRecord) GetOperationDetails() string { + if m != nil { + return m.OperationDetails + } + return "" +} + type ThirdPartyLogDetail struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` EmitTime *types.Timestamp `protobuf:"bytes,2,opt,name=emit_time,json=emitTime,proto3" json:"emit_time,omitempty"` @@ -340,49 +359,51 @@ func init() { func init() { proto.RegisterFile("api/auditlog/v1/message.proto", fileDescriptor_8e3907a7549dbc61) } var fileDescriptor_8e3907a7549dbc61 = []byte{ - // 671 bytes of a gzipped FileDescriptorProto + // 701 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x4e, 0xdb, 0x4a, - 0x14, 0xcd, 0x24, 0x01, 0xe2, 0x9b, 0xf7, 0x82, 0x99, 0xe8, 0xf1, 0x06, 0x1e, 0x98, 0x08, 0xb1, - 0x88, 0x58, 0x38, 0x82, 0xb7, 0x68, 0xa5, 0xae, 0x02, 0x31, 0x28, 0x92, 0x49, 0x90, 0x09, 0xad, - 0x40, 0x95, 0xac, 0x21, 0x9e, 0xba, 0x23, 0x39, 0xb1, 0x35, 0x9e, 0x04, 0xb1, 0xeb, 0x07, 0x74, - 0xd1, 0xfe, 0x45, 0x3f, 0xa5, 0x4b, 0x96, 0x6c, 0x2a, 0x95, 0xb0, 0xe9, 0x92, 0x4f, 0xa8, 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0x5e, 0x03, 0xad, 0x4f, 0x7b, 0x2c, 0x8e, 0x68, 0x97, 0x91, - 0x79, 0xa5, 0x79, 0x00, 0x12, 0x36, 0x8c, 0x98, 0xa0, 0x32, 0x69, 0x6c, 0x21, 0x65, 0xa7, 0x00, - 0x5e, 0x86, 0xf9, 0x58, 0x52, 0x39, 0x88, 0x49, 0x41, 0x51, 0xe3, 0x0a, 0xd7, 0x60, 0x2e, 0x60, - 0x43, 0x16, 0x10, 0x4d, 0xf5, 0xbb, 0xf2, 0x52, 0xbf, 0x76, 0x22, 0x70, 0x52, 0x5d, 0x32, 0xbd, - 0x71, 0x3c, 0x04, 0xd2, 0xe9, 0x8d, 0x4b, 0xbc, 0x0a, 0x05, 0xee, 0xb1, 0xbe, 0xe4, 0xf2, 0x8a, - 0x14, 0x15, 0x35, 0xad, 0x93, 0xe7, 0x05, 0xf3, 0x13, 0x67, 0x7f, 0xa5, 0xcf, 0xa7, 0x15, 0xee, - 0x40, 0x59, 0x7e, 0xe4, 0xc2, 0x73, 0x23, 0x2a, 0xe4, 0x95, 0xeb, 0x31, 0x49, 0x79, 0x10, 0x93, - 0xbf, 0xd5, 0x04, 0xb7, 0x9e, 0x99, 0xe9, 0x24, 0xda, 0xe3, 0x44, 0x6a, 0x87, 0x7e, 0x43, 0x89, - 0x9d, 0x25, 0x39, 0x05, 0x53, 0x24, 0xc6, 0x18, 0xf2, 0x92, 0xfa, 0x31, 0x29, 0x55, 0x72, 0x55, - 0xcd, 0x51, 0xdf, 0x9b, 0x3f, 0x10, 0x94, 0x5f, 0x38, 0xfe, 0x6c, 0x3b, 0x66, 0x92, 0xcc, 0xfe, - 0x41, 0x92, 0x15, 0x28, 0x7a, 0x2c, 0xee, 0x0a, 0x1e, 0xa9, 0x04, 0x72, 0xea, 0xc6, 0xc7, 0x10, - 0xfe, 0x0f, 0xb4, 0x6e, 0xc0, 0x59, 0x5f, 0xba, 0xdc, 0x53, 0x4b, 0xa2, 0x39, 0x85, 0x14, 0x68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 0xef, 0x8c, 0xcc, 0xcd, 0x9d, 0x91, 0x39, 0xdf, 0x92, 0xbd, 0x48, 0x04, - 0x66, 0x37, 0x08, 0x07, 0x5e, 0xed, 0xc9, 0x3f, 0xe7, 0xcd, 0xe4, 0xfb, 0x62, 0x5e, 0xa5, 0xfc, - 0xff, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0xdb, 0x01, 0xc9, 0x96, 0x04, 0x00, 0x00, + 0x14, 0x8d, 0x93, 0x00, 0xf1, 0xcd, 0x7b, 0x89, 0x99, 0xe8, 0xf1, 0x0c, 0x05, 0x13, 0x21, 0x16, + 0x11, 0x95, 0x1c, 0x41, 0x17, 0xad, 0xd4, 0x55, 0x20, 0x06, 0x45, 0x32, 0x09, 0x32, 0xa1, 0x15, + 0xa8, 0x92, 0x35, 0xc4, 0x53, 0x77, 0x24, 0x27, 0xb6, 0xc6, 0x93, 0x20, 0x76, 0xfd, 0x80, 0x2e, + 0xfa, 0x19, 0xfd, 0x94, 0x2e, 0x59, 0xb2, 0x41, 0x2a, 0x61, 0xd3, 0x25, 0x9f, 0x50, 0xcd, 0x38, + 0x31, 0x04, 0xd8, 0x74, 0x37, 0xf7, 0x9c, 0xe3, 0x99, 0x73, 0xef, 0x3d, 0x32, 0xac, 0xe1, 0x88, + 0xd6, 0xf1, 0xd0, 0xa3, 0x3c, 0x08, 0xfd, 0xfa, 0x68, 0xbb, 0xde, 0x27, 0x71, 0x8c, 0x7d, 0x62, + 0x46, 0x2c, 0xe4, 0x21, 0x2a, 0xe3, 0x88, 0x9a, 0x53, 0xda, 0x1c, 0x6d, 0xaf, 0xac, 0xfb, 0x61, + 0xe8, 0x07, 0xa4, 0x2e, 0xe9, 0xf3, 0xe1, 0xe7, 0x3a, 0xa7, 0x7d, 0x12, 0x73, 0xdc, 0x8f, 0x92, + 0x2f, 0x36, 0x6e, 0xf2, 0xa0, 0xda, 0xa1, 0xef, 0x90, 0x5e, 0xc8, 0x3c, 0x54, 0x82, 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0xc7, 0x47, 0xd6, 0x5e, + 0x6b, 0xbf, 0x65, 0x35, 0xb5, 0x0c, 0x5a, 0x02, 0x34, 0xc3, 0x36, 0x9a, 0x87, 0xad, 0xb6, 0xa6, + 0xa0, 0xff, 0xa1, 0x32, 0x83, 0x1f, 0x9f, 0x1e, 0x77, 0xad, 0x43, 0x2d, 0xbb, 0xf5, 0x4d, 0x81, + 0xc2, 0x34, 0x55, 0x68, 0x19, 0xfe, 0x13, 0x2a, 0xdb, 0xfa, 0x60, 0xd9, 0x4f, 0x2e, 0x46, 0x50, + 0x7a, 0xa0, 0x5a, 0xed, 0xfd, 0x8e, 0xa6, 0xa0, 0x0a, 0x94, 0x1f, 0xb0, 0xa6, 0xb5, 0x7b, 0x72, + 0xa0, 0x65, 0x67, 0x85, 0x1f, 0x1b, 0x4e, 0x5b, 0xcb, 0xcd, 0x0a, 0x2d, 0xc7, 0xe9, 0x38, 0x5a, + 0x7e, 0x16, 0xdc, 0x6f, 0x74, 0x1b, 0xb6, 0x36, 0xb7, 0x7b, 0x76, 0x75, 0x6b, 0x64, 0xae, 0x6f, + 0x8d, 0xcc, 0xfd, 0xad, 0xa1, 0x7c, 0x1d, 0x1b, 0xca, 0x8f, 0xb1, 0xa1, 0xfc, 0x1c, 0x1b, 0xca, + 0xd5, 0xd8, 0x50, 0x7e, 0x8d, 0x0d, 0xe5, 0xf7, 0xd8, 0xc8, 0xdc, 0x8f, 0x0d, 0xe5, 0xfb, 0x9d, + 0x91, 0xb9, 0xba, 0x33, 0x32, 0xd7, 0x77, 0x46, 0xe6, 0x6c, 0x93, 0xf7, 0x23, 0x16, 0x98, 0xbd, + 0x20, 0x1c, 0x7a, 0xf5, 0x27, 0xff, 0xaf, 0xf7, 0xd3, 0xf3, 0xf9, 0xbc, 0xdc, 0xf2, 0x9b, 0x3f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0x94, 0xb7, 0xb5, 0xe2, 0x04, 0x00, 0x00, } func (x LogCategory) String() string { @@ -465,6 +486,12 @@ func (this *LogRecord) Equal(that interface{}) bool { return false } } + if this.UserEmail != that1.UserEmail { + return false + } + if this.OperationDetails != that1.OperationDetails { + return false + } return true } func (this *ThirdPartyLogDetail) Equal(that interface{}) bool { @@ -510,7 +537,7 @@ func (this *LogRecord) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 18) + s := make([]string, 0, 20) s = append(s, "&auditlog.LogRecord{") s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") @@ -530,6 +557,8 @@ func (this *LogRecord) GoString() string { s = append(s, "ThirdPartyDetails: "+fmt.Sprintf("%#v", this.ThirdPartyDetails)+",\n") } s = append(s, "Tags: "+fmt.Sprintf("%#v", this.Tags)+",\n") + s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") + s = append(s, "OperationDetails: "+fmt.Sprintf("%#v", this.OperationDetails)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -578,6 +607,22 @@ func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.OperationDetails) > 0 { + i -= len(m.OperationDetails) + copy(dAtA[i:], m.OperationDetails) + i = encodeVarintMessage(dAtA, i, uint64(len(m.OperationDetails))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintMessage(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x7a + } if len(m.Tags) > 0 { for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Tags[iNdEx]) @@ -830,6 +875,14 @@ func (m *LogRecord) Size() (n int) { n += 1 + l + sovMessage(uint64(l)) } } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.OperationDetails) + if l > 0 { + n += 2 + l + sovMessage(uint64(l)) + } return n } @@ -891,6 +944,8 @@ func (this *LogRecord) String() string { `Region:` + fmt.Sprintf("%v", this.Region) + `,`, `ThirdPartyDetails:` + strings.Replace(this.ThirdPartyDetails.String(), "ThirdPartyLogDetail", "ThirdPartyLogDetail", 1) + `,`, `Tags:` + fmt.Sprintf("%v", this.Tags) + `,`, + `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, + `OperationDetails:` + fmt.Sprintf("%v", this.OperationDetails) + `,`, `}`, }, "") return s @@ -1377,6 +1432,70 @@ func (m *LogRecord) Unmarshal(dAtA []byte) error { } m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationDetails", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationDetails = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) diff --git a/protogen/api/auditlog/v2/message.pb.go b/protogen/api/auditlog/v2/message.pb.go new file mode 100644 index 00000000..7e60fa73 --- /dev/null +++ b/protogen/api/auditlog/v2/message.pb.go @@ -0,0 +1,2327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: api/auditlog/v2/message.proto + +package auditlog + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strconv "strconv" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type LogCategory int32 + +const ( + LOG_CATEGORY_UNSPECIFIED LogCategory = 0 + LOG_CATEGORY_ADMIN LogCategory = 1 + LOG_CATEGORY_SYSTEM LogCategory = 2 +) + +var LogCategory_name = map[int32]string{ + 0: "Unspecified", + 1: "Admin", + 2: "System", +} + +var LogCategory_value = map[string]int32{ + "Unspecified": 0, + "Admin": 1, + "System": 2, +} + +func (LogCategory) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{0} +} + +type LogLevel int32 + +const ( + LOG_LEVEL_UNSPECIFIED LogLevel = 0 + LOG_LEVEL_INFO LogLevel = 1 + LOG_LEVEL_DEBUG LogLevel = 2 + LOG_LEVEL_WARN LogLevel = 3 + LOG_LEVEL_ERROR LogLevel = 4 + LOG_LEVEL_FATAL LogLevel = 5 +) + +var LogLevel_name = map[int32]string{ + 0: "Unspecified", + 1: "Info", + 2: "Debug", + 3: "Warn", + 4: "Error", + 5: "Fatal", +} + +var LogLevel_value = map[string]int32{ + "Unspecified": 0, + "Info": 1, + "Debug": 2, + "Warn": 3, + "Error": 4, + "Fatal": 5, +} + +func (LogLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{1} +} + +// LogRecord is the top level audit log message. The logs from Temporal will be transformed into LogRecord and sent +// to user in some unmarshalled format, i.e. json. The message is structured following some common log formats. It has +// the order of emit_time | level | user_email | caller_ip | operation | operation_details | status | category | version. +// Example: +// 2022-10-24T15:09:25.744Z INFO xyz@temporal.io 127.0.0.1 DeleteNamespace test-auditlog.temporal-account OK Admin 0 +type LogRecord struct { + // when does this log get generated from the source + EmitTime *types.Timestamp `protobuf:"bytes,1,opt,name=emit_time,json=emitTime,proto3" json:"emit_time,omitempty"` + // level of the log, i.e. info, warn, error etc + Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=api.auditlog.v2.LogLevel" json:"level,omitempty"` + // If it's customer/user's operator, use email address; if it's Temporal's support to run operation on behalf of + // the customer, use "support@temoral.io" instead + UserEmail string `protobuf:"bytes,3,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // customer ip address or server name, if it's "Temporal Internal", the real ip address will be hidden. + CallerIpAddress string `protobuf:"bytes,4,opt,name=caller_ip_address,json=callerIpAddress,proto3" json:"caller_ip_address,omitempty"` + // what operation + Operation string `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"` + // Detailed information about the operation. For example, it could be the invited user email for "InviteUser" operation, + // could be "enable audit logging" for UpdateAccount operation + Details *OperationDetail `protobuf:"bytes,6,opt,name=details,proto3" json:"details,omitempty"` + // operation status from API call + Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` + // admin or system + Category LogCategory `protobuf:"varint,8,opt,name=category,proto3,enum=api.auditlog.v2.LogCategory" json:"category,omitempty"` + // Version of the log entry, starting from 0. The version will be updated when there is a backfill/resend of the same + // logs + Version int32 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"` + // Unique ID for the log record. + LogId string `protobuf:"bytes,10,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"` +} + +func (m *LogRecord) Reset() { *m = LogRecord{} } +func (*LogRecord) ProtoMessage() {} +func (*LogRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{0} +} +func (m *LogRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LogRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LogRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogRecord.Merge(m, src) +} +func (m *LogRecord) XXX_Size() int { + return m.Size() +} +func (m *LogRecord) XXX_DiscardUnknown() { + xxx_messageInfo_LogRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_LogRecord proto.InternalMessageInfo + +func (m *LogRecord) GetEmitTime() *types.Timestamp { + if m != nil { + return m.EmitTime + } + return nil +} + +func (m *LogRecord) GetLevel() LogLevel { + if m != nil { + return m.Level + } + return LOG_LEVEL_UNSPECIFIED +} + +func (m *LogRecord) GetUserEmail() string { + if m != nil { + return m.UserEmail + } + return "" +} + +func (m *LogRecord) GetCallerIpAddress() string { + if m != nil { + return m.CallerIpAddress + } + return "" +} + +func (m *LogRecord) GetOperation() string { + if m != nil { + return m.Operation + } + return "" +} + +func (m *LogRecord) GetDetails() *OperationDetail { + if m != nil { + return m.Details + } + return nil +} + +func (m *LogRecord) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *LogRecord) GetCategory() LogCategory { + if m != nil { + return m.Category + } + return LOG_CATEGORY_UNSPECIFIED +} + +func (m *LogRecord) GetVersion() int32 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *LogRecord) GetLogId() string { + if m != nil { + return m.LogId + } + return "" +} + +// OperationDetails includes potential more detailed operation logs extracted from the different fields in the +// Temporal API logs or third party logs, e.g. auth0 +type OperationDetail struct { + // the namespace the operation was performed on + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the users the operation was performed on + TargetUsers []string `protobuf:"bytes,2,rep,name=target_users,json=targetUsers,proto3" json:"target_users,omitempty"` + // if any role is processed, we provide the role information + Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` + // if client ca is included, we provide the fingerprints + ClientCaFingerprints []string `protobuf:"bytes,4,rep,name=client_ca_fingerprints,json=clientCaFingerprints,proto3" json:"client_ca_fingerprints,omitempty"` + // if search attribute is processed, we provide the search attributes + SearchAttributeUpdate *SearchAttributeUpdate `protobuf:"bytes,5,opt,name=search_attribute_update,json=searchAttributeUpdate,proto3" json:"search_attribute_update,omitempty"` + // additional message if there is any + AdditionalMessage string `protobuf:"bytes,6,opt,name=additional_message,json=additionalMessage,proto3" json:"additional_message,omitempty"` + // namespace's region if available + Region string `protobuf:"bytes,7,opt,name=region,proto3" json:"region,omitempty"` + // if there are account features changed, i.e. external metrics, audit logging sink etc. + AccountFeatures []string `protobuf:"bytes,8,rep,name=account_features,json=accountFeatures,proto3" json:"account_features,omitempty"` + // some third party log details, i.e. auth0 + ThirdPartyDetails *ThirdPartyLogDetail `protobuf:"bytes,9,opt,name=third_party_details,json=thirdPartyDetails,proto3" json:"third_party_details,omitempty"` +} + +func (m *OperationDetail) Reset() { *m = OperationDetail{} } +func (*OperationDetail) ProtoMessage() {} +func (*OperationDetail) Descriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{1} +} +func (m *OperationDetail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperationDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperationDetail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OperationDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperationDetail.Merge(m, src) +} +func (m *OperationDetail) XXX_Size() int { + return m.Size() +} +func (m *OperationDetail) XXX_DiscardUnknown() { + xxx_messageInfo_OperationDetail.DiscardUnknown(m) +} + +var xxx_messageInfo_OperationDetail proto.InternalMessageInfo + +func (m *OperationDetail) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *OperationDetail) GetTargetUsers() []string { + if m != nil { + return m.TargetUsers + } + return nil +} + +func (m *OperationDetail) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + +func (m *OperationDetail) GetClientCaFingerprints() []string { + if m != nil { + return m.ClientCaFingerprints + } + return nil +} + +func (m *OperationDetail) GetSearchAttributeUpdate() *SearchAttributeUpdate { + if m != nil { + return m.SearchAttributeUpdate + } + return nil +} + +func (m *OperationDetail) GetAdditionalMessage() string { + if m != nil { + return m.AdditionalMessage + } + return "" +} + +func (m *OperationDetail) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *OperationDetail) GetAccountFeatures() []string { + if m != nil { + return m.AccountFeatures + } + return nil +} + +func (m *OperationDetail) GetThirdPartyDetails() *ThirdPartyLogDetail { + if m != nil { + return m.ThirdPartyDetails + } + return nil +} + +type SearchAttributeUpdate struct { + ExistingAttribute string `protobuf:"bytes,1,opt,name=existing_attribute,json=existingAttribute,proto3" json:"existing_attribute,omitempty"` + NewAttribute string `protobuf:"bytes,2,opt,name=new_attribute,json=newAttribute,proto3" json:"new_attribute,omitempty"` +} + +func (m *SearchAttributeUpdate) Reset() { *m = SearchAttributeUpdate{} } +func (*SearchAttributeUpdate) ProtoMessage() {} +func (*SearchAttributeUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{2} +} +func (m *SearchAttributeUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SearchAttributeUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SearchAttributeUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SearchAttributeUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchAttributeUpdate.Merge(m, src) +} +func (m *SearchAttributeUpdate) XXX_Size() int { + return m.Size() +} +func (m *SearchAttributeUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_SearchAttributeUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchAttributeUpdate proto.InternalMessageInfo + +func (m *SearchAttributeUpdate) GetExistingAttribute() string { + if m != nil { + return m.ExistingAttribute + } + return "" +} + +func (m *SearchAttributeUpdate) GetNewAttribute() string { + if m != nil { + return m.NewAttribute + } + return "" +} + +type ThirdPartyLogDetail struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the third party source, e.g. auth0 + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + // the raw log message from the third party app, e.g. the whole auth0 event log + RawMessage string `protobuf:"bytes,3,opt,name=raw_message,json=rawMessage,proto3" json:"raw_message,omitempty"` +} + +func (m *ThirdPartyLogDetail) Reset() { *m = ThirdPartyLogDetail{} } +func (*ThirdPartyLogDetail) ProtoMessage() {} +func (*ThirdPartyLogDetail) Descriptor() ([]byte, []int) { + return fileDescriptor_49e745c9699c01c8, []int{3} +} +func (m *ThirdPartyLogDetail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ThirdPartyLogDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ThirdPartyLogDetail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ThirdPartyLogDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_ThirdPartyLogDetail.Merge(m, src) +} +func (m *ThirdPartyLogDetail) XXX_Size() int { + return m.Size() +} +func (m *ThirdPartyLogDetail) XXX_DiscardUnknown() { + xxx_messageInfo_ThirdPartyLogDetail.DiscardUnknown(m) +} + +var xxx_messageInfo_ThirdPartyLogDetail proto.InternalMessageInfo + +func (m *ThirdPartyLogDetail) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ThirdPartyLogDetail) GetSource() string { + if m != nil { + return m.Source + } + return "" +} + +func (m *ThirdPartyLogDetail) GetRawMessage() string { + if m != nil { + return m.RawMessage + } + return "" +} + +func init() { + proto.RegisterEnum("api.auditlog.v2.LogCategory", LogCategory_name, LogCategory_value) + proto.RegisterEnum("api.auditlog.v2.LogLevel", LogLevel_name, LogLevel_value) + proto.RegisterType((*LogRecord)(nil), "api.auditlog.v2.LogRecord") + proto.RegisterType((*OperationDetail)(nil), "api.auditlog.v2.OperationDetail") + proto.RegisterType((*SearchAttributeUpdate)(nil), "api.auditlog.v2.SearchAttributeUpdate") + proto.RegisterType((*ThirdPartyLogDetail)(nil), "api.auditlog.v2.ThirdPartyLogDetail") +} + +func init() { proto.RegisterFile("api/auditlog/v2/message.proto", fileDescriptor_49e745c9699c01c8) } + +var fileDescriptor_49e745c9699c01c8 = []byte{ + // 841 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcb, 0x6e, 0xdb, 0x46, + 0x14, 0x86, 0x45, 0x29, 0xb2, 0xcd, 0xa3, 0xd4, 0xa2, 0xc7, 0xb1, 0xc3, 0x04, 0x0e, 0xa3, 0xba, + 0x41, 0xa1, 0x1a, 0x28, 0x05, 0xa8, 0x05, 0x5a, 0xb4, 0x2b, 0xc5, 0xa6, 0x0c, 0x01, 0xb2, 0x15, + 0x50, 0x72, 0x8b, 0x04, 0x45, 0x88, 0x31, 0x39, 0x66, 0x06, 0xa5, 0x38, 0xc4, 0xcc, 0xd0, 0x6e, + 0x76, 0x7d, 0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 0xad, 0xca, 0xe5, 0xb5, 0x55, + 0xf9, 0x70, 0x6d, 0x55, 0xde, 0xbc, 0x90, 0xd3, 0x84, 0x47, 0xb6, 0x1f, 0xb1, 0x34, 0xe8, 0xdc, + 0x7a, 0xb5, 0xbf, 0x2f, 0x7f, 0x9f, 0xae, 0x64, 0xaf, 0xea, 0x57, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x4c, 0x30, 0x6c, 0x17, 0xd8, 0x05, 0x00, 0x00, +} + +func (x LogCategory) String() string { + s, ok := LogCategory_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x LogLevel) String() string { + s, ok := LogLevel_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *LogRecord) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LogRecord) + if !ok { + that2, ok := that.(LogRecord) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.EmitTime.Equal(that1.EmitTime) { + return false + } + if this.Level != that1.Level { + return false + } + if this.UserEmail != that1.UserEmail { + return false + } + if this.CallerIpAddress != that1.CallerIpAddress { + return false + } + if this.Operation != that1.Operation { + return false + } + if !this.Details.Equal(that1.Details) { + return false + } + if this.Status != that1.Status { + return false + } + if this.Category != that1.Category { + return false + } + if this.Version != that1.Version { + return false + } + if this.LogId != that1.LogId { + return false + } + return true +} +func (this *OperationDetail) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OperationDetail) + if !ok { + that2, ok := that.(OperationDetail) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Namespace != that1.Namespace { + return false + } + if len(this.TargetUsers) != len(that1.TargetUsers) { + return false + } + for i := range this.TargetUsers { + if this.TargetUsers[i] != that1.TargetUsers[i] { + return false + } + } + if len(this.Roles) != len(that1.Roles) { + return false + } + for i := range this.Roles { + if this.Roles[i] != that1.Roles[i] { + return false + } + } + if len(this.ClientCaFingerprints) != len(that1.ClientCaFingerprints) { + return false + } + for i := range this.ClientCaFingerprints { + if this.ClientCaFingerprints[i] != that1.ClientCaFingerprints[i] { + return false + } + } + if !this.SearchAttributeUpdate.Equal(that1.SearchAttributeUpdate) { + return false + } + if this.AdditionalMessage != that1.AdditionalMessage { + return false + } + if this.Region != that1.Region { + return false + } + if len(this.AccountFeatures) != len(that1.AccountFeatures) { + return false + } + for i := range this.AccountFeatures { + if this.AccountFeatures[i] != that1.AccountFeatures[i] { + return false + } + } + if !this.ThirdPartyDetails.Equal(that1.ThirdPartyDetails) { + return false + } + return true +} +func (this *SearchAttributeUpdate) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SearchAttributeUpdate) + if !ok { + that2, ok := that.(SearchAttributeUpdate) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ExistingAttribute != that1.ExistingAttribute { + return false + } + if this.NewAttribute != that1.NewAttribute { + return false + } + return true +} +func (this *ThirdPartyLogDetail) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ThirdPartyLogDetail) + if !ok { + that2, ok := that.(ThirdPartyLogDetail) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Source != that1.Source { + return false + } + if this.RawMessage != that1.RawMessage { + return false + } + return true +} +func (this *LogRecord) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&auditlog.LogRecord{") + if this.EmitTime != nil { + s = append(s, "EmitTime: "+fmt.Sprintf("%#v", this.EmitTime)+",\n") + } + s = append(s, "Level: "+fmt.Sprintf("%#v", this.Level)+",\n") + s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") + s = append(s, "CallerIpAddress: "+fmt.Sprintf("%#v", this.CallerIpAddress)+",\n") + s = append(s, "Operation: "+fmt.Sprintf("%#v", this.Operation)+",\n") + if this.Details != nil { + s = append(s, "Details: "+fmt.Sprintf("%#v", this.Details)+",\n") + } + s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") + s = append(s, "Category: "+fmt.Sprintf("%#v", this.Category)+",\n") + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + s = append(s, "LogId: "+fmt.Sprintf("%#v", this.LogId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OperationDetail) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&auditlog.OperationDetail{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "TargetUsers: "+fmt.Sprintf("%#v", this.TargetUsers)+",\n") + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") + s = append(s, "ClientCaFingerprints: "+fmt.Sprintf("%#v", this.ClientCaFingerprints)+",\n") + if this.SearchAttributeUpdate != nil { + s = append(s, "SearchAttributeUpdate: "+fmt.Sprintf("%#v", this.SearchAttributeUpdate)+",\n") + } + s = append(s, "AdditionalMessage: "+fmt.Sprintf("%#v", this.AdditionalMessage)+",\n") + s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") + s = append(s, "AccountFeatures: "+fmt.Sprintf("%#v", this.AccountFeatures)+",\n") + if this.ThirdPartyDetails != nil { + s = append(s, "ThirdPartyDetails: "+fmt.Sprintf("%#v", this.ThirdPartyDetails)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SearchAttributeUpdate) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&auditlog.SearchAttributeUpdate{") + s = append(s, "ExistingAttribute: "+fmt.Sprintf("%#v", this.ExistingAttribute)+",\n") + s = append(s, "NewAttribute: "+fmt.Sprintf("%#v", this.NewAttribute)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ThirdPartyLogDetail) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&auditlog.ThirdPartyLogDetail{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Source: "+fmt.Sprintf("%#v", this.Source)+",\n") + s = append(s, "RawMessage: "+fmt.Sprintf("%#v", this.RawMessage)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMessage(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *LogRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LogRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LogId) > 0 { + i -= len(m.LogId) + copy(dAtA[i:], m.LogId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.LogId))) + i-- + dAtA[i] = 0x52 + } + if m.Version != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x48 + } + if m.Category != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.Category)) + i-- + dAtA[i] = 0x40 + } + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x3a + } + if m.Details != nil { + { + size, err := m.Details.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Operation) > 0 { + i -= len(m.Operation) + copy(dAtA[i:], m.Operation) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Operation))) + i-- + dAtA[i] = 0x2a + } + if len(m.CallerIpAddress) > 0 { + i -= len(m.CallerIpAddress) + copy(dAtA[i:], m.CallerIpAddress) + i = encodeVarintMessage(dAtA, i, uint64(len(m.CallerIpAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintMessage(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x1a + } + if m.Level != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.Level)) + i-- + dAtA[i] = 0x10 + } + if m.EmitTime != nil { + { + size, err := m.EmitTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OperationDetail) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OperationDetail) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperationDetail) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ThirdPartyDetails != nil { + { + size, err := m.ThirdPartyDetails.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.AccountFeatures) > 0 { + for iNdEx := len(m.AccountFeatures) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AccountFeatures[iNdEx]) + copy(dAtA[i:], m.AccountFeatures[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AccountFeatures[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x3a + } + if len(m.AdditionalMessage) > 0 { + i -= len(m.AdditionalMessage) + copy(dAtA[i:], m.AdditionalMessage) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AdditionalMessage))) + i-- + dAtA[i] = 0x32 + } + if m.SearchAttributeUpdate != nil { + { + size, err := m.SearchAttributeUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.ClientCaFingerprints) > 0 { + for iNdEx := len(m.ClientCaFingerprints) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ClientCaFingerprints[iNdEx]) + copy(dAtA[i:], m.ClientCaFingerprints[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ClientCaFingerprints[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Roles) > 0 { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Roles[iNdEx]) + copy(dAtA[i:], m.Roles[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Roles[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.TargetUsers) > 0 { + for iNdEx := len(m.TargetUsers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TargetUsers[iNdEx]) + copy(dAtA[i:], m.TargetUsers[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.TargetUsers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchAttributeUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchAttributeUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchAttributeUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewAttribute) > 0 { + i -= len(m.NewAttribute) + copy(dAtA[i:], m.NewAttribute) + i = encodeVarintMessage(dAtA, i, uint64(len(m.NewAttribute))) + i-- + dAtA[i] = 0x12 + } + if len(m.ExistingAttribute) > 0 { + i -= len(m.ExistingAttribute) + copy(dAtA[i:], m.ExistingAttribute) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ExistingAttribute))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ThirdPartyLogDetail) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ThirdPartyLogDetail) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ThirdPartyLogDetail) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RawMessage) > 0 { + i -= len(m.RawMessage) + copy(dAtA[i:], m.RawMessage) + i = encodeVarintMessage(dAtA, i, uint64(len(m.RawMessage))) + i-- + dAtA[i] = 0x1a + } + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { + offset -= sovMessage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *LogRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EmitTime != nil { + l = m.EmitTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Level != 0 { + n += 1 + sovMessage(uint64(m.Level)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.CallerIpAddress) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Operation) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.Details != nil { + l = m.Details.Size() + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Status) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.Category != 0 { + n += 1 + sovMessage(uint64(m.Category)) + } + if m.Version != 0 { + n += 1 + sovMessage(uint64(m.Version)) + } + l = len(m.LogId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *OperationDetail) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.TargetUsers) > 0 { + for _, s := range m.TargetUsers { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + if len(m.ClientCaFingerprints) > 0 { + for _, s := range m.ClientCaFingerprints { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + if m.SearchAttributeUpdate != nil { + l = m.SearchAttributeUpdate.Size() + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.AdditionalMessage) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.AccountFeatures) > 0 { + for _, s := range m.AccountFeatures { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + if m.ThirdPartyDetails != nil { + l = m.ThirdPartyDetails.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *SearchAttributeUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ExistingAttribute) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.NewAttribute) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *ThirdPartyLogDetail) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Source) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.RawMessage) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func sovMessage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMessage(x uint64) (n int) { + return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *LogRecord) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LogRecord{`, + `EmitTime:` + strings.Replace(fmt.Sprintf("%v", this.EmitTime), "Timestamp", "types.Timestamp", 1) + `,`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, + `CallerIpAddress:` + fmt.Sprintf("%v", this.CallerIpAddress) + `,`, + `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, + `Details:` + strings.Replace(this.Details.String(), "OperationDetail", "OperationDetail", 1) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Category:` + fmt.Sprintf("%v", this.Category) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `LogId:` + fmt.Sprintf("%v", this.LogId) + `,`, + `}`, + }, "") + return s +} +func (this *OperationDetail) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OperationDetail{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `TargetUsers:` + fmt.Sprintf("%v", this.TargetUsers) + `,`, + `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`, + `ClientCaFingerprints:` + fmt.Sprintf("%v", this.ClientCaFingerprints) + `,`, + `SearchAttributeUpdate:` + strings.Replace(this.SearchAttributeUpdate.String(), "SearchAttributeUpdate", "SearchAttributeUpdate", 1) + `,`, + `AdditionalMessage:` + fmt.Sprintf("%v", this.AdditionalMessage) + `,`, + `Region:` + fmt.Sprintf("%v", this.Region) + `,`, + `AccountFeatures:` + fmt.Sprintf("%v", this.AccountFeatures) + `,`, + `ThirdPartyDetails:` + strings.Replace(this.ThirdPartyDetails.String(), "ThirdPartyLogDetail", "ThirdPartyLogDetail", 1) + `,`, + `}`, + }, "") + return s +} +func (this *SearchAttributeUpdate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SearchAttributeUpdate{`, + `ExistingAttribute:` + fmt.Sprintf("%v", this.ExistingAttribute) + `,`, + `NewAttribute:` + fmt.Sprintf("%v", this.NewAttribute) + `,`, + `}`, + }, "") + return s +} +func (this *ThirdPartyLogDetail) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ThirdPartyLogDetail{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Source:` + fmt.Sprintf("%v", this.Source) + `,`, + `RawMessage:` + fmt.Sprintf("%v", this.RawMessage) + `,`, + `}`, + }, "") + return s +} +func valueToStringMessage(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *LogRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LogRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LogRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EmitTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EmitTime == nil { + m.EmitTime = &types.Timestamp{} + } + if err := m.EmitTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= LogLevel(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CallerIpAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CallerIpAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Details == nil { + m.Details = &OperationDetail{} + } + if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) + } + m.Category = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Category |= LogCategory(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationDetail) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OperationDetail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationDetail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetUsers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetUsers = append(m.TargetUsers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientCaFingerprints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientCaFingerprints = append(m.ClientCaFingerprints, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchAttributeUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SearchAttributeUpdate == nil { + m.SearchAttributeUpdate = &SearchAttributeUpdate{} + } + if err := m.SearchAttributeUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdditionalMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdditionalMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountFeatures", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountFeatures = append(m.AccountFeatures, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ThirdPartyDetails", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ThirdPartyDetails == nil { + m.ThirdPartyDetails = &ThirdPartyLogDetail{} + } + if err := m.ThirdPartyDetails.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchAttributeUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchAttributeUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchAttributeUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExistingAttribute", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExistingAttribute = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAttribute", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAttribute = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ThirdPartyLogDetail) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ThirdPartyLogDetail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ThirdPartyLogDetail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Source = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RawMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMessage(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMessage + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMessage + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protogen/api/auth/v1/message.pb.go b/protogen/api/auth/v1/message.pb.go index fe627a11..2516e79a 100644 --- a/protogen/api/auth/v1/message.pb.go +++ b/protogen/api/auth/v1/message.pb.go @@ -5,15 +5,14 @@ package auth import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" reflect "reflect" strconv "strconv" strings "strings" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -159,6 +158,104 @@ func (AccountActionGroup) EnumDescriptor() ([]byte, []int) { return fileDescriptor_bea184b0c3eae56b, []int{3} } +type APIKeyAccessType int32 + +const ( + APIKEY_ACCESS_TYPE_UNSPECIFIED APIKeyAccessType = 0 + // the apikey inherits all of the owners accesses + APIKEY_ACCESS_TYPE_INHERIT_OWNER_ACCESS APIKeyAccessType = 1 +) + +var APIKeyAccessType_name = map[int32]string{ + 0: "ApikeyAccessTypeUnspecified", + 1: "ApikeyAccessTypeInheritOwnerAccess", +} + +var APIKeyAccessType_value = map[string]int32{ + "ApikeyAccessTypeUnspecified": 0, + "ApikeyAccessTypeInheritOwnerAccess": 1, +} + +func (APIKeyAccessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{4} +} + +type APIKeyOwnerType int32 + +const ( + APIKEY_OWNER_TYPE_UNSPECIFIED APIKeyOwnerType = 0 + // the owner is an user + APIKEY_OWNER_TYPE_USER APIKeyOwnerType = 1 +) + +var APIKeyOwnerType_name = map[int32]string{ + 0: "ApikeyOwnerTypeUnspecified", + 1: "ApikeyOwnerTypeUser", +} + +var APIKeyOwnerType_value = map[string]int32{ + "ApikeyOwnerTypeUnspecified": 0, + "ApikeyOwnerTypeUser": 1, +} + +func (APIKeyOwnerType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{5} +} + +type APIKeyState int32 + +const ( + APIKEY_STATE_UNSPECIFIED APIKeyState = 0 + // apikey is being created by the system + APIKEY_STATE_CREATING APIKeyState = 1 + // apikey create operation failed + APIKEY_STATE_CREATE_FAILED APIKeyState = 2 + // the apikey exists in the system + APIKEY_STATE_ACTIVE APIKeyState = 3 + // apikey is being updated + APIKEY_STATE_UPDATING APIKeyState = 4 + // the last apikey update failed + APIKEY_STATE_UPDATE_FAILED APIKeyState = 5 + // the apikey has expired + APIKEY_STATE_EXPIRED APIKeyState = 6 + // the apikey is being deleted + APIKEY_STATE_DELETING APIKeyState = 7 + // the apikey delete operation failed + APIKEY_STATE_DELETE_FAILED APIKeyState = 8 + // the apikey was successfully deleted + APIKEY_STATE_DELETED APIKeyState = 9 +) + +var APIKeyState_name = map[int32]string{ + 0: "ApikeyStateUnspecified", + 1: "ApikeyStateCreating", + 2: "ApikeyStateCreateFailed", + 3: "ApikeyStateActive", + 4: "ApikeyStateUpdating", + 5: "ApikeyStateUpdateFailed", + 6: "ApikeyStateExpired", + 7: "ApikeyStateDeleting", + 8: "ApikeyStateDeleteFailed", + 9: "ApikeyStateDeleted", +} + +var APIKeyState_value = map[string]int32{ + "ApikeyStateUnspecified": 0, + "ApikeyStateCreating": 1, + "ApikeyStateCreateFailed": 2, + "ApikeyStateActive": 3, + "ApikeyStateUpdating": 4, + "ApikeyStateUpdateFailed": 5, + "ApikeyStateExpired": 6, + "ApikeyStateDeleting": 7, + "ApikeyStateDeleteFailed": 8, + "ApikeyStateDeleted": 9, +} + +func (APIKeyState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{6} +} + type UserSpec struct { // the email address associated to the user Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` @@ -648,11 +745,256 @@ func (m *Role) GetSpec() *RoleSpec { return nil } +type APIKeySpec struct { + // the access type of the apikey + AccessType APIKeyAccessType `protobuf:"varint,1,opt,name=access_type,json=accessType,proto3,enum=api.auth.v1.APIKeyAccessType" json:"access_type,omitempty"` + // the user friendly name for the apikey + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // the more comprehensive description for the apikey + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // expiry timestamp of the apikey + ExpiryTime *types.Timestamp `protobuf:"bytes,4,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"` + // whether the apikey is disabled + Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` +} + +func (m *APIKeySpec) Reset() { *m = APIKeySpec{} } +func (*APIKeySpec) ProtoMessage() {} +func (*APIKeySpec) Descriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{8} +} +func (m *APIKeySpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIKeySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_APIKeySpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *APIKeySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIKeySpec.Merge(m, src) +} +func (m *APIKeySpec) XXX_Size() int { + return m.Size() +} +func (m *APIKeySpec) XXX_DiscardUnknown() { + xxx_messageInfo_APIKeySpec.DiscardUnknown(m) +} + +var xxx_messageInfo_APIKeySpec proto.InternalMessageInfo + +func (m *APIKeySpec) GetAccessType() APIKeyAccessType { + if m != nil { + return m.AccessType + } + return APIKEY_ACCESS_TYPE_UNSPECIFIED +} + +func (m *APIKeySpec) GetDisplayName() string { + if m != nil { + return m.DisplayName + } + return "" +} + +func (m *APIKeySpec) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *APIKeySpec) GetExpiryTime() *types.Timestamp { + if m != nil { + return m.ExpiryTime + } + return nil +} + +func (m *APIKeySpec) GetDisabled() bool { + if m != nil { + return m.Disabled + } + return false +} + +type Owner struct { + // the id of the owner + // if the owner is an user, this is the id of the user. + OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // the type of the owner. + OwnerType APIKeyOwnerType `protobuf:"varint,2,opt,name=owner_type,json=ownerType,proto3,enum=api.auth.v1.APIKeyOwnerType" json:"owner_type,omitempty"` +} + +func (m *Owner) Reset() { *m = Owner{} } +func (*Owner) ProtoMessage() {} +func (*Owner) Descriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{9} +} +func (m *Owner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Owner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Owner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Owner) XXX_Merge(src proto.Message) { + xxx_messageInfo_Owner.Merge(m, src) +} +func (m *Owner) XXX_Size() int { + return m.Size() +} +func (m *Owner) XXX_DiscardUnknown() { + xxx_messageInfo_Owner.DiscardUnknown(m) +} + +var xxx_messageInfo_Owner proto.InternalMessageInfo + +func (m *Owner) GetOwnerId() string { + if m != nil { + return m.OwnerId + } + return "" +} + +func (m *Owner) GetOwnerType() APIKeyOwnerType { + if m != nil { + return m.OwnerType + } + return APIKEY_OWNER_TYPE_UNSPECIFIED +} + +type APIKey struct { + // the id of the apikey + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the owner of the apikey + Owner *Owner `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + // the apikey specification + Spec *APIKeySpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + // the current version of the apikey specification + // the next update request will have to include this version + ResourceVersion string `protobuf:"bytes,4,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the current state of the apikey + State APIKeyState `protobuf:"varint,5,opt,name=state,proto3,enum=api.auth.v1.APIKeyState" json:"state,omitempty"` + // the id of the request that is creating/updating/deleting the apikey, if any + RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // the date and time when the apikey was created + CreatedTime *types.Timestamp `protobuf:"bytes,7,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + // the date and time when the apikey was last modified + LastModifiedTime *types.Timestamp `protobuf:"bytes,8,opt,name=last_modified_time,json=lastModifiedTime,proto3" json:"last_modified_time,omitempty"` +} + +func (m *APIKey) Reset() { *m = APIKey{} } +func (*APIKey) ProtoMessage() {} +func (*APIKey) Descriptor() ([]byte, []int) { + return fileDescriptor_bea184b0c3eae56b, []int{10} +} +func (m *APIKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_APIKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *APIKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIKey.Merge(m, src) +} +func (m *APIKey) XXX_Size() int { + return m.Size() +} +func (m *APIKey) XXX_DiscardUnknown() { + xxx_messageInfo_APIKey.DiscardUnknown(m) +} + +var xxx_messageInfo_APIKey proto.InternalMessageInfo + +func (m *APIKey) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *APIKey) GetOwner() *Owner { + if m != nil { + return m.Owner + } + return nil +} + +func (m *APIKey) GetSpec() *APIKeySpec { + if m != nil { + return m.Spec + } + return nil +} + +func (m *APIKey) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion + } + return "" +} + +func (m *APIKey) GetState() APIKeyState { + if m != nil { + return m.State + } + return APIKEY_STATE_UNSPECIFIED +} + +func (m *APIKey) GetRequestId() string { + if m != nil { + return m.RequestId + } + return "" +} + +func (m *APIKey) GetCreatedTime() *types.Timestamp { + if m != nil { + return m.CreatedTime + } + return nil +} + +func (m *APIKey) GetLastModifiedTime() *types.Timestamp { + if m != nil { + return m.LastModifiedTime + } + return nil +} + func init() { proto.RegisterEnum("api.auth.v1.UserState", UserState_name, UserState_value) proto.RegisterEnum("api.auth.v1.RoleType", RoleType_name, RoleType_value) proto.RegisterEnum("api.auth.v1.NamespaceActionGroup", NamespaceActionGroup_name, NamespaceActionGroup_value) proto.RegisterEnum("api.auth.v1.AccountActionGroup", AccountActionGroup_name, AccountActionGroup_value) + proto.RegisterEnum("api.auth.v1.APIKeyAccessType", APIKeyAccessType_name, APIKeyAccessType_value) + proto.RegisterEnum("api.auth.v1.APIKeyOwnerType", APIKeyOwnerType_name, APIKeyOwnerType_value) + proto.RegisterEnum("api.auth.v1.APIKeyState", APIKeyState_name, APIKeyState_value) proto.RegisterType((*UserSpec)(nil), "api.auth.v1.UserSpec") proto.RegisterType((*UserNamespacePermissions)(nil), "api.auth.v1.UserNamespacePermissions") proto.RegisterType((*Invitation)(nil), "api.auth.v1.Invitation") @@ -661,68 +1003,91 @@ func init() { proto.RegisterType((*AccountRoleSpec)(nil), "api.auth.v1.AccountRoleSpec") proto.RegisterType((*RoleSpec)(nil), "api.auth.v1.RoleSpec") proto.RegisterType((*Role)(nil), "api.auth.v1.Role") + proto.RegisterType((*APIKeySpec)(nil), "api.auth.v1.APIKeySpec") + proto.RegisterType((*Owner)(nil), "api.auth.v1.Owner") + proto.RegisterType((*APIKey)(nil), "api.auth.v1.APIKey") } func init() { proto.RegisterFile("api/auth/v1/message.proto", fileDescriptor_bea184b0c3eae56b) } var fileDescriptor_bea184b0c3eae56b = []byte{ - // 886 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xe2, 0x56, - 0x14, 0xe5, 0x01, 0xf9, 0xe0, 0x32, 0x4a, 0x3c, 0xaf, 0xf9, 0x20, 0x29, 0xe3, 0x50, 0x54, 0x55, - 0x33, 0x51, 0x65, 0x34, 0xa9, 0xd4, 0x2e, 0x46, 0xd5, 0xc8, 0x83, 0x5f, 0x52, 0x4b, 0x09, 0xa0, - 0x87, 0x49, 0xd5, 0x6e, 0x2c, 0x8f, 0x79, 0x93, 0x5a, 0x02, 0xec, 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d, 0xce, 0x50, 0x17, 0x02, 0x5f, 0xfb, 0x7f, 0x81, 0x7f, - 0x03, 0x78, 0x60, 0x05, 0xa1, 0x39, 0x74, 0xfb, 0xce, 0x1b, 0x67, 0x62, 0xb2, 0xfe, 0xa0, 0x89, - 0xc4, 0x55, 0x67, 0x89, 0x48, 0xa4, 0xff, 0x13, 0x3c, 0x4e, 0xf7, 0x87, 0xba, 0x03, 0x26, 0xd6, - 0xba, 0x0a, 0xa5, 0xd1, 0x04, 0x4c, 0x1e, 0xc8, 0x14, 0xf8, 0x40, 0x3b, 0xd9, 0x83, 0x4d, 0xd5, - 0xb6, 0xdd, 0x68, 0x14, 0xa6, 0x6d, 0x5f, 0x65, 0x8c, 0x91, 0x30, 0x3e, 0x98, 0x33, 0x4e, 0x34, - 0x77, 0xda, 0xfe, 0x86, 0x60, 0x3d, 0x35, 0x7c, 0xc9, 0x0d, 0x05, 0xdf, 0xe4, 0xef, 0xa0, 0x30, - 0x2c, 0x1f, 0x55, 0x97, 0x19, 0x4e, 0x34, 0xdc, 0x2d, 0x05, 0xf0, 0x09, 0x6c, 0xa6, 0x73, 0x9b, - 0xd3, 0x77, 0xba, 0x7c, 0x24, 0x2f, 0x9f, 0x36, 0x75, 0xd9, 0x18, 0xcd, 0x42, 0x41, 0x7d, 0x00, - 0x45, 0x61, 0xb8, 0xb8, 0xe3, 0xc5, 0xf0, 0xca, 0x63, 0x49, 0x86, 0xf3, 0x8b, 0xcb, 0x05, 0xc6, - 0x95, 0xc7, 0xa8, 0xa0, 0xdc, 0xbb, 0xe3, 0x69, 0x5f, 0x41, 0x39, 0x7c, 0x8f, 0xa0, 0x94, 0xae, - 0x32, 0xde, 0x87, 0x9d, 0x5e, 0x97, 0x50, 0xb3, 0x6b, 0xa8, 0x06, 0x31, 0x7b, 0xad, 0x6e, 0x87, - 0x34, 0xf5, 0x63, 0x9d, 0x68, 0x52, 0x0e, 0xef, 0xc2, 0x47, 0x33, 0xb5, 0x26, 0x25, 0xaa,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 0x3b, 0x84, 0x4a, 0x79, 0xfc, 0x04, 0xf6, 0x96, 0x72, 0xe2, 0xfb, - 0xbd, 0xa2, 0xd7, 0x37, 0x72, 0xee, 0xed, 0x8d, 0x9c, 0x7b, 0x77, 0x23, 0xa3, 0x5f, 0xc6, 0x32, - 0xfa, 0x6b, 0x2c, 0xa3, 0xbf, 0xc7, 0x32, 0xba, 0x1e, 0xcb, 0xe8, 0x9f, 0xb1, 0x8c, 0xfe, 0x1d, - 0xcb, 0xb9, 0x77, 0x63, 0x19, 0xfd, 0x7a, 0x2b, 0xe7, 0xae, 0x6f, 0xe5, 0xdc, 0xdb, 0x5b, 0x39, - 0xf7, 0x7d, 0x35, 0x1c, 0x7a, 0xfe, 0x40, 0xb1, 0x07, 0x6e, 0xd4, 0x6f, 0xcc, 0xfc, 0x65, 0xbf, - 0xe0, 0x9f, 0xaf, 0x57, 0xc5, 0x6f, 0xda, 0x17, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xd8, - 0x43, 0xb8, 0xcd, 0x07, 0x00, 0x00, + // 1202 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x8f, 0xda, 0xd6, + 0x17, 0xc5, 0xfc, 0x1b, 0xb8, 0x44, 0x19, 0xe7, 0x65, 0xfe, 0x30, 0xfc, 0x18, 0x87, 0xa0, 0x9f, + 0xda, 0x84, 0x54, 0xa0, 0x4c, 0xa5, 0x76, 0x11, 0xb5, 0x91, 0x83, 0x5f, 0x26, 0x56, 0x26, 0x60, + 0x3d, 0x20, 0x69, 0xba, 0xb1, 0x1c, 0x78, 0x99, 0x5a, 0x02, 0xec, 0xda, 0x66, 0x52, 0x76, 0xfd, + 0x08, 0x5d, 0x74, 0x55, 0xa9, 0xab, 0x6e, 0xda, 0x6f, 0xd2, 0x65, 0x96, 0x59, 0x36, 0x64, 0x53, + 0x75, 0x15, 0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, 0x1f, 0x8b, 0x3b, 0xec, 0xef, 0xb3, + 0x3c, 0x77, 0xb8, 0x4f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x82, 0x0c, 0xa5, 0xf4, 0x73, 0x0c, + 0x00, 0x00, } func (x UserState) String() string { @@ -753,6 +1118,27 @@ func (x AccountActionGroup) String() string { } return strconv.Itoa(int(x)) } +func (x APIKeyAccessType) String() string { + s, ok := APIKeyAccessType_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x APIKeyOwnerType) String() string { + s, ok := APIKeyOwnerType_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x APIKeyState) String() string { + s, ok := APIKeyState_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} func (this *UserSpec) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1000,53 +1386,161 @@ func (this *Role) Equal(that interface{}) bool { } return true } -func (this *UserSpec) GoString() string { - if this == nil { - return "nil" +func (this *APIKeySpec) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 6) - s = append(s, "&auth.UserSpec{") - s = append(s, "Email: "+fmt.Sprintf("%#v", this.Email)+",\n") - s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UserNamespacePermissions) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*APIKeySpec) + if !ok { + that2, ok := that.(APIKeySpec) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 6) - s = append(s, "&auth.UserNamespacePermissions{") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - s = append(s, "ActionGroup: "+fmt.Sprintf("%#v", this.ActionGroup)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Invitation) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 7) - s = append(s, "&auth.Invitation{") - s = append(s, "Uri: "+fmt.Sprintf("%#v", this.Uri)+",\n") - if this.CreatedTime != nil { - s = append(s, "CreatedTime: "+fmt.Sprintf("%#v", this.CreatedTime)+",\n") + if this.AccessType != that1.AccessType { + return false } - if this.ExpiryTime != nil { - s = append(s, "ExpiryTime: "+fmt.Sprintf("%#v", this.ExpiryTime)+",\n") + if this.DisplayName != that1.DisplayName { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *User) GoString() string { - if this == nil { - return "nil" + if this.Description != that1.Description { + return false } - s := make([]string, 0, 12) - s = append(s, "&auth.User{") - s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - if this.Spec != nil { + if !this.ExpiryTime.Equal(that1.ExpiryTime) { + return false + } + if this.Disabled != that1.Disabled { + return false + } + return true +} +func (this *Owner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Owner) + if !ok { + that2, ok := that.(Owner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.OwnerId != that1.OwnerId { + return false + } + if this.OwnerType != that1.OwnerType { + return false + } + return true +} +func (this *APIKey) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*APIKey) + if !ok { + that2, ok := that.(APIKey) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if !this.Owner.Equal(that1.Owner) { + return false + } + if !this.Spec.Equal(that1.Spec) { + return false + } + if this.ResourceVersion != that1.ResourceVersion { + return false + } + if this.State != that1.State { + return false + } + if this.RequestId != that1.RequestId { + return false + } + if !this.CreatedTime.Equal(that1.CreatedTime) { + return false + } + if !this.LastModifiedTime.Equal(that1.LastModifiedTime) { + return false + } + return true +} +func (this *UserSpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&auth.UserSpec{") + s = append(s, "Email: "+fmt.Sprintf("%#v", this.Email)+",\n") + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UserNamespacePermissions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&auth.UserNamespacePermissions{") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "ActionGroup: "+fmt.Sprintf("%#v", this.ActionGroup)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Invitation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&auth.Invitation{") + s = append(s, "Uri: "+fmt.Sprintf("%#v", this.Uri)+",\n") + if this.CreatedTime != nil { + s = append(s, "CreatedTime: "+fmt.Sprintf("%#v", this.CreatedTime)+",\n") + } + if this.ExpiryTime != nil { + s = append(s, "ExpiryTime: "+fmt.Sprintf("%#v", this.ExpiryTime)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *User) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 12) + s = append(s, "&auth.User{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + if this.Spec != nil { s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") } s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") @@ -1113,6 +1607,58 @@ func (this *Role) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *APIKeySpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&auth.APIKeySpec{") + s = append(s, "AccessType: "+fmt.Sprintf("%#v", this.AccessType)+",\n") + s = append(s, "DisplayName: "+fmt.Sprintf("%#v", this.DisplayName)+",\n") + s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") + if this.ExpiryTime != nil { + s = append(s, "ExpiryTime: "+fmt.Sprintf("%#v", this.ExpiryTime)+",\n") + } + s = append(s, "Disabled: "+fmt.Sprintf("%#v", this.Disabled)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Owner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&auth.Owner{") + s = append(s, "OwnerId: "+fmt.Sprintf("%#v", this.OwnerId)+",\n") + s = append(s, "OwnerType: "+fmt.Sprintf("%#v", this.OwnerType)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *APIKey) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 12) + s = append(s, "&auth.APIKey{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + if this.Owner != nil { + s = append(s, "Owner: "+fmt.Sprintf("%#v", this.Owner)+",\n") + } + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + if this.CreatedTime != nil { + s = append(s, "CreatedTime: "+fmt.Sprintf("%#v", this.CreatedTime)+",\n") + } + if this.LastModifiedTime != nil { + s = append(s, "LastModifiedTime: "+fmt.Sprintf("%#v", this.LastModifiedTime)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringMessage(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1505,75 +2051,271 @@ func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { - offset -= sovMessage(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *APIKeySpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *UserSpec) Size() (n int) { - if m == nil { - return 0 - } + +func (m *APIKeySpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIKeySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Email) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) + if m.Disabled { + i-- + if m.Disabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - l = len(s) - n += 1 + l + sovMessage(uint64(l)) + if m.ExpiryTime != nil { + { + size, err := m.ExpiryTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } - return n -} - -func (m *UserNamespacePermissions) Size() (n int) { - if m == nil { - return 0 + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) + if len(m.DisplayName) > 0 { + i -= len(m.DisplayName) + copy(dAtA[i:], m.DisplayName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.DisplayName))) + i-- + dAtA[i] = 0x12 } - if m.ActionGroup != 0 { - n += 1 + sovMessage(uint64(m.ActionGroup)) + if m.AccessType != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.AccessType)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *Invitation) Size() (n int) { - if m == nil { - return 0 +func (m *Owner) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Owner) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Owner) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Uri) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - if m.CreatedTime != nil { - l = m.CreatedTime.Size() - n += 1 + l + sovMessage(uint64(l)) + if m.OwnerType != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.OwnerType)) + i-- + dAtA[i] = 0x10 } - if m.ExpiryTime != nil { - l = m.ExpiryTime.Size() - n += 1 + l + sovMessage(uint64(l)) + if len(m.OwnerId) > 0 { + i -= len(m.OwnerId) + copy(dAtA[i:], m.OwnerId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.OwnerId))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *User) Size() (n int) { - if m == nil { +func (m *APIKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastModifiedTime != nil { + { + size, err := m.LastModifiedTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.CreatedTime != nil { + { + size, err := m.CreatedTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x32 + } + if m.State != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x28 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x22 + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Owner != nil { + { + size, err := m.Owner.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { + offset -= sovMessage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UserSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Email) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + return n +} + +func (m *UserNamespacePermissions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.ActionGroup != 0 { + n += 1 + sovMessage(uint64(m.ActionGroup)) + } + return n +} + +func (m *Invitation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Uri) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.CreatedTime != nil { + l = m.CreatedTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.ExpiryTime != nil { + l = m.ExpiryTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *User) Size() (n int) { + if m == nil { return 0 } var l int @@ -1679,6 +2421,89 @@ func (m *Role) Size() (n int) { return n } +func (m *APIKeySpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AccessType != 0 { + n += 1 + sovMessage(uint64(m.AccessType)) + } + l = len(m.DisplayName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.ExpiryTime != nil { + l = m.ExpiryTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Disabled { + n += 2 + } + return n +} + +func (m *Owner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.OwnerType != 0 { + n += 1 + sovMessage(uint64(m.OwnerType)) + } + return n +} + +func (m *APIKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.Owner != nil { + l = m.Owner.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.State != 0 { + n += 1 + sovMessage(uint64(m.State)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.CreatedTime != nil { + l = m.CreatedTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.LastModifiedTime != nil { + l = m.LastModifiedTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + func sovMessage(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1785,6 +2610,48 @@ func (this *Role) String() string { }, "") return s } +func (this *APIKeySpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIKeySpec{`, + `AccessType:` + fmt.Sprintf("%v", this.AccessType) + `,`, + `DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `ExpiryTime:` + strings.Replace(fmt.Sprintf("%v", this.ExpiryTime), "Timestamp", "types.Timestamp", 1) + `,`, + `Disabled:` + fmt.Sprintf("%v", this.Disabled) + `,`, + `}`, + }, "") + return s +} +func (this *Owner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Owner{`, + `OwnerId:` + fmt.Sprintf("%v", this.OwnerId) + `,`, + `OwnerType:` + fmt.Sprintf("%v", this.OwnerType) + `,`, + `}`, + }, "") + return s +} +func (this *APIKey) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIKey{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Owner:` + strings.Replace(this.Owner.String(), "Owner", "Owner", 1) + `,`, + `Spec:` + strings.Replace(this.Spec.String(), "APIKeySpec", "APIKeySpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `CreatedTime:` + strings.Replace(fmt.Sprintf("%v", this.CreatedTime), "Timestamp", "types.Timestamp", 1) + `,`, + `LastModifiedTime:` + strings.Replace(fmt.Sprintf("%v", this.LastModifiedTime), "Timestamp", "types.Timestamp", 1) + `,`, + `}`, + }, "") + return s +} func valueToStringMessage(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -2922,6 +3789,614 @@ func (m *Role) Unmarshal(dAtA []byte) error { } return nil } +func (m *APIKeySpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIKeySpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIKeySpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessType", wireType) + } + m.AccessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccessType |= APIKeyAccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DisplayName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiryTime == nil { + m.ExpiryTime = &types.Timestamp{} + } + if err := m.ExpiryTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Disabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Owner) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Owner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Owner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerType", wireType) + } + m.OwnerType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OwnerType |= APIKeyOwnerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Owner == nil { + m.Owner = &Owner{} + } + if err := m.Owner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &APIKeySpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= APIKeyState(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreatedTime == nil { + m.CreatedTime = &types.Timestamp{} + } + if err := m.CreatedTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastModifiedTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastModifiedTime == nil { + m.LastModifiedTime = &types.Timestamp{} + } + if err := m.LastModifiedTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipMessage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protogen/api/authservice/v1/request_response.pb.go b/protogen/api/authservice/v1/request_response.pb.go index ec99123d..b9bd31e3 100644 --- a/protogen/api/authservice/v1/request_response.pb.go +++ b/protogen/api/authservice/v1/request_response.pb.go @@ -5,13 +5,12 @@ package authservice import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" reflect "reflect" strings "strings" - - proto "github.com/gogo/protobuf/proto" v1 "github.com/temporalio/tcld/protogen/api/auth/v1" v11 "github.com/temporalio/tcld/protogen/api/request/v1" ) @@ -27,6 +26,94 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type GetRoleRequest struct { + // the id of the role to get + RoleId string `protobuf:"bytes,4,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` +} + +func (m *GetRoleRequest) Reset() { *m = GetRoleRequest{} } +func (*GetRoleRequest) ProtoMessage() {} +func (*GetRoleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{0} +} +func (m *GetRoleRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoleRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRoleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoleRequest.Merge(m, src) +} +func (m *GetRoleRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRoleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRoleRequest proto.InternalMessageInfo + +func (m *GetRoleRequest) GetRoleId() string { + if m != nil { + return m.RoleId + } + return "" +} + +type GetRoleResponse struct { + // the role + Role *v1.Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` +} + +func (m *GetRoleResponse) Reset() { *m = GetRoleResponse{} } +func (*GetRoleResponse) ProtoMessage() {} +func (*GetRoleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{1} +} +func (m *GetRoleResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoleResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRoleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoleResponse.Merge(m, src) +} +func (m *GetRoleResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRoleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRoleResponse proto.InternalMessageInfo + +func (m *GetRoleResponse) GetRole() *v1.Role { + if m != nil { + return m.Role + } + return nil +} + type GetRolesRequest struct { // the requested size of the page to retrive PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` @@ -41,7 +128,7 @@ type GetRolesRequest struct { func (m *GetRolesRequest) Reset() { *m = GetRolesRequest{} } func (*GetRolesRequest) ProtoMessage() {} func (*GetRolesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{0} + return fileDescriptor_82df425cb2a9bb43, []int{2} } func (m *GetRolesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +195,7 @@ type GetRolesResponse struct { func (m *GetRolesResponse) Reset() { *m = GetRolesResponse{} } func (*GetRolesResponse) ProtoMessage() {} func (*GetRolesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{1} + return fileDescriptor_82df425cb2a9bb43, []int{3} } func (m *GetRolesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +245,7 @@ type GetRolesByPermissionsRequest struct { func (m *GetRolesByPermissionsRequest) Reset() { *m = GetRolesByPermissionsRequest{} } func (*GetRolesByPermissionsRequest) ProtoMessage() {} func (*GetRolesByPermissionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{2} + return fileDescriptor_82df425cb2a9bb43, []int{4} } func (m *GetRolesByPermissionsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -201,7 +288,7 @@ type GetRolesByPermissionsResponse struct { func (m *GetRolesByPermissionsResponse) Reset() { *m = GetRolesByPermissionsResponse{} } func (*GetRolesByPermissionsResponse) ProtoMessage() {} func (*GetRolesByPermissionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{3} + return fileDescriptor_82df425cb2a9bb43, []int{5} } func (m *GetRolesByPermissionsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -251,7 +338,7 @@ type GetUsersRequest struct { func (m *GetUsersRequest) Reset() { *m = GetUsersRequest{} } func (*GetUsersRequest) ProtoMessage() {} func (*GetUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{4} + return fileDescriptor_82df425cb2a9bb43, []int{6} } func (m *GetUsersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -318,7 +405,7 @@ type GetUsersResponse struct { func (m *GetUsersResponse) Reset() { *m = GetUsersResponse{} } func (*GetUsersResponse) ProtoMessage() {} func (*GetUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{5} + return fileDescriptor_82df425cb2a9bb43, []int{7} } func (m *GetUsersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -371,7 +458,7 @@ type GetUserRequest struct { func (m *GetUserRequest) Reset() { *m = GetUserRequest{} } func (*GetUserRequest) ProtoMessage() {} func (*GetUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{6} + return fileDescriptor_82df425cb2a9bb43, []int{8} } func (m *GetUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -422,7 +509,7 @@ type GetUserResponse struct { func (m *GetUserResponse) Reset() { *m = GetUserResponse{} } func (*GetUserResponse) ProtoMessage() {} func (*GetUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{7} + return fileDescriptor_82df425cb2a9bb43, []int{9} } func (m *GetUserResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +555,7 @@ type InviteUsersRequest struct { func (m *InviteUsersRequest) Reset() { *m = InviteUsersRequest{} } func (*InviteUsersRequest) ProtoMessage() {} func (*InviteUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{8} + return fileDescriptor_82df425cb2a9bb43, []int{10} } func (m *InviteUsersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -519,7 +606,7 @@ type InviteUsersResponse struct { func (m *InviteUsersResponse) Reset() { *m = InviteUsersResponse{} } func (*InviteUsersResponse) ProtoMessage() {} func (*InviteUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{9} + return fileDescriptor_82df425cb2a9bb43, []int{11} } func (m *InviteUsersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -565,7 +652,7 @@ type ResendUserInviteRequest struct { func (m *ResendUserInviteRequest) Reset() { *m = ResendUserInviteRequest{} } func (*ResendUserInviteRequest) ProtoMessage() {} func (*ResendUserInviteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{10} + return fileDescriptor_82df425cb2a9bb43, []int{12} } func (m *ResendUserInviteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -616,7 +703,7 @@ type ResendUserInviteResponse struct { func (m *ResendUserInviteResponse) Reset() { *m = ResendUserInviteResponse{} } func (*ResendUserInviteResponse) ProtoMessage() {} func (*ResendUserInviteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{11} + return fileDescriptor_82df425cb2a9bb43, []int{13} } func (m *ResendUserInviteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +754,7 @@ type UpdateUserRequest struct { func (m *UpdateUserRequest) Reset() { *m = UpdateUserRequest{} } func (*UpdateUserRequest) ProtoMessage() {} func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{12} + return fileDescriptor_82df425cb2a9bb43, []int{14} } func (m *UpdateUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,7 +819,7 @@ type UpdateUserResponse struct { func (m *UpdateUserResponse) Reset() { *m = UpdateUserResponse{} } func (*UpdateUserResponse) ProtoMessage() {} func (*UpdateUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{13} + return fileDescriptor_82df425cb2a9bb43, []int{15} } func (m *UpdateUserResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,7 +868,7 @@ type DeleteUserRequest struct { func (m *DeleteUserRequest) Reset() { *m = DeleteUserRequest{} } func (*DeleteUserRequest) ProtoMessage() {} func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{14} + return fileDescriptor_82df425cb2a9bb43, []int{16} } func (m *DeleteUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -839,7 +926,7 @@ type DeleteUserResponse struct { func (m *DeleteUserResponse) Reset() { *m = DeleteUserResponse{} } func (*DeleteUserResponse) ProtoMessage() {} func (*DeleteUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{15} + return fileDescriptor_82df425cb2a9bb43, []int{17} } func (m *DeleteUserResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -885,7 +972,7 @@ type UpdateUserNamespacePermissionsRequest struct { func (m *UpdateUserNamespacePermissionsRequest) Reset() { *m = UpdateUserNamespacePermissionsRequest{} } func (*UpdateUserNamespacePermissionsRequest) ProtoMessage() {} func (*UpdateUserNamespacePermissionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{16} + return fileDescriptor_82df425cb2a9bb43, []int{18} } func (m *UpdateUserNamespacePermissionsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -945,7 +1032,7 @@ func (m *UpdateUserNamespacePermissionsResponse) Reset() { } func (*UpdateUserNamespacePermissionsResponse) ProtoMessage() {} func (*UpdateUserNamespacePermissionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_82df425cb2a9bb43, []int{17} + return fileDescriptor_82df425cb2a9bb43, []int{19} } func (m *UpdateUserNamespacePermissionsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -981,466 +1068,1094 @@ func (m *UpdateUserNamespacePermissionsResponse) GetRequestStatus() *v11.Request return nil } -func init() { - proto.RegisterType((*GetRolesRequest)(nil), "api.authservice.v1.GetRolesRequest") - proto.RegisterType((*GetRolesResponse)(nil), "api.authservice.v1.GetRolesResponse") - proto.RegisterType((*GetRolesByPermissionsRequest)(nil), "api.authservice.v1.GetRolesByPermissionsRequest") - proto.RegisterType((*GetRolesByPermissionsResponse)(nil), "api.authservice.v1.GetRolesByPermissionsResponse") - proto.RegisterType((*GetUsersRequest)(nil), "api.authservice.v1.GetUsersRequest") - proto.RegisterType((*GetUsersResponse)(nil), "api.authservice.v1.GetUsersResponse") - proto.RegisterType((*GetUserRequest)(nil), "api.authservice.v1.GetUserRequest") - proto.RegisterType((*GetUserResponse)(nil), "api.authservice.v1.GetUserResponse") - proto.RegisterType((*InviteUsersRequest)(nil), "api.authservice.v1.InviteUsersRequest") - proto.RegisterType((*InviteUsersResponse)(nil), "api.authservice.v1.InviteUsersResponse") - proto.RegisterType((*ResendUserInviteRequest)(nil), "api.authservice.v1.ResendUserInviteRequest") - proto.RegisterType((*ResendUserInviteResponse)(nil), "api.authservice.v1.ResendUserInviteResponse") - proto.RegisterType((*UpdateUserRequest)(nil), "api.authservice.v1.UpdateUserRequest") - proto.RegisterType((*UpdateUserResponse)(nil), "api.authservice.v1.UpdateUserResponse") - proto.RegisterType((*DeleteUserRequest)(nil), "api.authservice.v1.DeleteUserRequest") - proto.RegisterType((*DeleteUserResponse)(nil), "api.authservice.v1.DeleteUserResponse") - proto.RegisterType((*UpdateUserNamespacePermissionsRequest)(nil), "api.authservice.v1.UpdateUserNamespacePermissionsRequest") - proto.RegisterType((*UpdateUserNamespacePermissionsResponse)(nil), "api.authservice.v1.UpdateUserNamespacePermissionsResponse") +type CreateAPIKeyRequest struct { + // the spec for the apikey + Spec *v1.APIKeySpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` } -func init() { - proto.RegisterFile("api/authservice/v1/request_response.proto", fileDescriptor_82df425cb2a9bb43) +func (m *CreateAPIKeyRequest) Reset() { *m = CreateAPIKeyRequest{} } +func (*CreateAPIKeyRequest) ProtoMessage() {} +func (*CreateAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{20} +} +func (m *CreateAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CreateAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateAPIKeyRequest.Merge(m, src) +} +func (m *CreateAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateAPIKeyRequest.DiscardUnknown(m) } -var fileDescriptor_82df425cb2a9bb43 = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x4f, 0xd4, 0x40, - 0x14, 0xde, 0x81, 0x5d, 0x94, 0x67, 0xf8, 0x55, 0xa3, 0x54, 0x84, 0x09, 0x69, 0x02, 0x82, 0x9a, - 0x6e, 0xc0, 0x8b, 0x89, 0x37, 0x82, 0x11, 0x62, 0x62, 0xb0, 0x2b, 0x1e, 0xf0, 0xb0, 0xd4, 0xf6, - 0x05, 0x1b, 0x77, 0xdb, 0x3a, 0xd3, 0x36, 0xca, 0xc9, 0x83, 0x7f, 0x80, 0x57, 0x8f, 0xde, 0xfc, - 0x53, 0xf4, 0xc6, 0x91, 0xa3, 0x94, 0x8b, 0x47, 0xfe, 0x04, 0x33, 0xd3, 0xce, 0x6e, 0x97, 0x2e, - 0xb0, 0x26, 0x1b, 0x6f, 0xf4, 0x7d, 0x6f, 0xde, 0xfb, 0xbe, 0xef, 0xbd, 0x19, 0x16, 0x56, 0xed, - 0xd0, 0xab, 0xdb, 0x71, 0xf4, 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 0xaf, 0xa7, 0xb4, 0x72, 0x74, 0x4a, 0x2b, 0xc7, 0xa7, 0xb4, - 0xb2, 0x77, 0x3f, 0x6a, 0x87, 0xac, 0x65, 0x3a, 0xad, 0x20, 0x76, 0xeb, 0xe5, 0x5f, 0x11, 0x4f, - 0x0a, 0x9f, 0x6f, 0xc7, 0xe4, 0x3f, 0xfd, 0x47, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xbe, - 0x74, 0x72, 0x6e, 0x08, 0x00, 0x00, +var xxx_messageInfo_CreateAPIKeyRequest proto.InternalMessageInfo + +func (m *CreateAPIKeyRequest) GetSpec() *v1.APIKeySpec { + if m != nil { + return m.Spec + } + return nil } -func (this *GetRolesRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *CreateAPIKeyRequest) GetRequestId() string { + if m != nil { + return m.RequestId } + return "" +} - that1, ok := that.(*GetRolesRequest) - if !ok { - that2, ok := that.(GetRolesRequest) - if ok { - that1 = &that2 - } else { - return false +type CreateAPIKeyResponse struct { + // the apikey id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the apikey secret key + SecretKey string `protobuf:"bytes,2,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` + // the request status of the create operation + RequestStatus *v11.RequestStatus `protobuf:"bytes,3,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *CreateAPIKeyResponse) Reset() { *m = CreateAPIKeyResponse{} } +func (*CreateAPIKeyResponse) ProtoMessage() {} +func (*CreateAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{21} +} +func (m *CreateAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PageSize != that1.PageSize { - return false - } - if this.PageToken != that1.PageToken { - return false - } - if this.Namespace != that1.Namespace { - return false - } - if this.UserId != that1.UserId { - return false - } - return true } -func (this *GetRolesResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } +func (m *CreateAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateAPIKeyResponse.Merge(m, src) +} +func (m *CreateAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *CreateAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateAPIKeyResponse.DiscardUnknown(m) +} - that1, ok := that.(*GetRolesResponse) - if !ok { - that2, ok := that.(GetRolesResponse) - if ok { - that1 = &that2 - } else { - return false - } +var xxx_messageInfo_CreateAPIKeyResponse proto.InternalMessageInfo + +func (m *CreateAPIKeyResponse) GetId() string { + if m != nil { + return m.Id } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return "" +} + +func (m *CreateAPIKeyResponse) GetSecretKey() string { + if m != nil { + return m.SecretKey } - if len(this.Roles) != len(that1.Roles) { - return false + return "" +} + +func (m *CreateAPIKeyResponse) GetRequestStatus() *v11.RequestStatus { + if m != nil { + return m.RequestStatus } - for i := range this.Roles { - if !this.Roles[i].Equal(that1.Roles[i]) { - return false + return nil +} + +type GetAPIKeysRequest struct { + // the requested size of the page to retrieve + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (m *GetAPIKeysRequest) Reset() { *m = GetAPIKeysRequest{} } +func (*GetAPIKeysRequest) ProtoMessage() {} +func (*GetAPIKeysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{22} +} +func (m *GetAPIKeysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIKeysRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if this.NextPageToken != that1.NextPageToken { - return false +} +func (m *GetAPIKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIKeysRequest.Merge(m, src) +} +func (m *GetAPIKeysRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAPIKeysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIKeysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAPIKeysRequest proto.InternalMessageInfo + +func (m *GetAPIKeysRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize } - return true + return 0 } -func (this *GetRolesByPermissionsRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *GetAPIKeysRequest) GetPageToken() string { + if m != nil { + return m.PageToken } + return "" +} - that1, ok := that.(*GetRolesByPermissionsRequest) - if !ok { - that2, ok := that.(GetRolesByPermissionsRequest) - if ok { - that1 = &that2 - } else { - return false +type GetAPIKeysResponse struct { + // the list of apikeys + ApiKeys []*v1.APIKey `protobuf:"bytes,1,rep,name=api_keys,json=apiKeys,proto3" json:"api_keys,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetAPIKeysResponse) Reset() { *m = GetAPIKeysResponse{} } +func (*GetAPIKeysResponse) ProtoMessage() {} +func (*GetAPIKeysResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{23} +} +func (m *GetAPIKeysResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIKeysResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Specs) != len(that1.Specs) { - return false - } - for i := range this.Specs { - if !this.Specs[i].Equal(that1.Specs[i]) { - return false - } +} +func (m *GetAPIKeysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIKeysResponse.Merge(m, src) +} +func (m *GetAPIKeysResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAPIKeysResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIKeysResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAPIKeysResponse proto.InternalMessageInfo + +func (m *GetAPIKeysResponse) GetApiKeys() []*v1.APIKey { + if m != nil { + return m.ApiKeys } - return true + return nil } -func (this *GetRolesByPermissionsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *GetAPIKeysResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken } + return "" +} - that1, ok := that.(*GetRolesByPermissionsResponse) - if !ok { - that2, ok := that.(GetRolesByPermissionsResponse) - if ok { - that1 = &that2 - } else { - return false +type GetAPIKeyRequest struct { + // the apikey id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *GetAPIKeyRequest) Reset() { *m = GetAPIKeyRequest{} } +func (*GetAPIKeyRequest) ProtoMessage() {} +func (*GetAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{24} +} +func (m *GetAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Roles) != len(that1.Roles) { - return false +} +func (m *GetAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIKeyRequest.Merge(m, src) +} +func (m *GetAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAPIKeyRequest proto.InternalMessageInfo + +func (m *GetAPIKeyRequest) GetId() string { + if m != nil { + return m.Id } - for i := range this.Roles { - if !this.Roles[i].Equal(that1.Roles[i]) { - return false + return "" +} + +type GetAPIKeyResponse struct { + // the apikey + ApiKey *v1.APIKey `protobuf:"bytes,1,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` +} + +func (m *GetAPIKeyResponse) Reset() { *m = GetAPIKeyResponse{} } +func (*GetAPIKeyResponse) ProtoMessage() {} +func (*GetAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{25} +} +func (m *GetAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - return true } -func (this *GetUsersRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *GetAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIKeyResponse.Merge(m, src) +} +func (m *GetAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAPIKeyResponse proto.InternalMessageInfo + +func (m *GetAPIKeyResponse) GetApiKey() *v1.APIKey { + if m != nil { + return m.ApiKey } + return nil +} - that1, ok := that.(*GetUsersRequest) - if !ok { - that2, ok := that.(GetUsersRequest) - if ok { - that1 = &that2 - } else { - return false +type DeleteAPIKeyRequest struct { + // the apikey id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the version of the apikey for which this delete is intended for + // the latest version can be found in the apikey status + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *DeleteAPIKeyRequest) Reset() { *m = DeleteAPIKeyRequest{} } +func (*DeleteAPIKeyRequest) ProtoMessage() {} +func (*DeleteAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{26} +} +func (m *DeleteAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PageSize != that1.PageSize { - return false - } - if this.PageToken != that1.PageToken { - return false - } - if this.Namespace != that1.Namespace { - return false +} +func (m *DeleteAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAPIKeyRequest.Merge(m, src) +} +func (m *DeleteAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAPIKeyRequest proto.InternalMessageInfo + +func (m *DeleteAPIKeyRequest) GetId() string { + if m != nil { + return m.Id } - if this.State != that1.State { - return false + return "" +} + +func (m *DeleteAPIKeyRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion } - return true + return "" } -func (this *GetUsersResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *DeleteAPIKeyRequest) GetRequestId() string { + if m != nil { + return m.RequestId } + return "" +} - that1, ok := that.(*GetUsersResponse) - if !ok { - that2, ok := that.(GetUsersResponse) - if ok { - that1 = &that2 - } else { - return false +type DeleteAPIKeyResponse struct { + // the request status of the delete operation + RequestStatus *v11.RequestStatus `protobuf:"bytes,3,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *DeleteAPIKeyResponse) Reset() { *m = DeleteAPIKeyResponse{} } +func (*DeleteAPIKeyResponse) ProtoMessage() {} +func (*DeleteAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{27} +} +func (m *DeleteAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Users) != len(that1.Users) { - return false +} +func (m *DeleteAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAPIKeyResponse.Merge(m, src) +} +func (m *DeleteAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *DeleteAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAPIKeyResponse proto.InternalMessageInfo + +func (m *DeleteAPIKeyResponse) GetRequestStatus() *v11.RequestStatus { + if m != nil { + return m.RequestStatus } - for i := range this.Users { - if !this.Users[i].Equal(that1.Users[i]) { - return false + return nil +} + +type UpdateAPIKeyRequest struct { + // the id of the apikey to update + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the new apikey specification + Spec *v1.APIKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // the version of the apikey for which this update is intended for + // the latest version can be found in the get apikey response + ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *UpdateAPIKeyRequest) Reset() { *m = UpdateAPIKeyRequest{} } +func (*UpdateAPIKeyRequest) ProtoMessage() {} +func (*UpdateAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{28} +} +func (m *UpdateAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if this.NextPageToken != that1.NextPageToken { - return false +} +func (m *UpdateAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAPIKeyRequest.Merge(m, src) +} +func (m *UpdateAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAPIKeyRequest proto.InternalMessageInfo + +func (m *UpdateAPIKeyRequest) GetId() string { + if m != nil { + return m.Id } - return true + return "" } -func (this *GetUserRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *UpdateAPIKeyRequest) GetSpec() *v1.APIKeySpec { + if m != nil { + return m.Spec } + return nil +} - that1, ok := that.(*GetUserRequest) - if !ok { - that2, ok := that.(GetUserRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UserId != that1.UserId { - return false - } - if this.UserEmail != that1.UserEmail { - return false +func (m *UpdateAPIKeyRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion } - return true + return "" } -func (this *GetUserResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *UpdateAPIKeyRequest) GetRequestId() string { + if m != nil { + return m.RequestId } + return "" +} - that1, ok := that.(*GetUserResponse) - if !ok { - that2, ok := that.(GetUserResponse) - if ok { - that1 = &that2 - } else { - return false +type UpdateAPIKeyResponse struct { + // the request status of the update operation + RequestStatus *v11.RequestStatus `protobuf:"bytes,1,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *UpdateAPIKeyResponse) Reset() { *m = UpdateAPIKeyResponse{} } +func (*UpdateAPIKeyResponse) ProtoMessage() {} +func (*UpdateAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{29} +} +func (m *UpdateAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.User.Equal(that1.User) { - return false - } - return true } -func (this *InviteUsersRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *UpdateAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAPIKeyResponse.Merge(m, src) +} +func (m *UpdateAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *UpdateAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAPIKeyResponse proto.InternalMessageInfo + +func (m *UpdateAPIKeyResponse) GetRequestStatus() *v11.RequestStatus { + if m != nil { + return m.RequestStatus } + return nil +} - that1, ok := that.(*InviteUsersRequest) - if !ok { - that2, ok := that.(InviteUsersRequest) - if ok { - that1 = &that2 - } else { - return false +type GetAllAPIKeysRequest struct { + // get only apikeys belonging to the owner with id + // for a user owner type use the id of the user + OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` + // get the apikeys belonging to the user with email address + UserEmail string `protobuf:"bytes,2,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // the requested size of the page to retrieve + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (m *GetAllAPIKeysRequest) Reset() { *m = GetAllAPIKeysRequest{} } +func (*GetAllAPIKeysRequest) ProtoMessage() {} +func (*GetAllAPIKeysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{30} +} +func (m *GetAllAPIKeysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAllAPIKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAllAPIKeysRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Specs) != len(that1.Specs) { - return false +} +func (m *GetAllAPIKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllAPIKeysRequest.Merge(m, src) +} +func (m *GetAllAPIKeysRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAllAPIKeysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllAPIKeysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAllAPIKeysRequest proto.InternalMessageInfo + +func (m *GetAllAPIKeysRequest) GetOwnerId() string { + if m != nil { + return m.OwnerId } - for i := range this.Specs { - if !this.Specs[i].Equal(that1.Specs[i]) { - return false - } + return "" +} + +func (m *GetAllAPIKeysRequest) GetUserEmail() string { + if m != nil { + return m.UserEmail } - if this.RequestId != that1.RequestId { - return false + return "" +} + +func (m *GetAllAPIKeysRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize } - return true + return 0 } -func (this *InviteUsersResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *GetAllAPIKeysRequest) GetPageToken() string { + if m != nil { + return m.PageToken } + return "" +} - that1, ok := that.(*InviteUsersResponse) - if !ok { - that2, ok := that.(InviteUsersResponse) - if ok { - that1 = &that2 - } else { - return false +type GetAllAPIKeysResponse struct { + // the list of apikeys + ApiKeys []*v1.APIKey `protobuf:"bytes,1,rep,name=api_keys,json=apiKeys,proto3" json:"api_keys,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetAllAPIKeysResponse) Reset() { *m = GetAllAPIKeysResponse{} } +func (*GetAllAPIKeysResponse) ProtoMessage() {} +func (*GetAllAPIKeysResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{31} +} +func (m *GetAllAPIKeysResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAllAPIKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAllAPIKeysResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RequestStatus.Equal(that1.RequestStatus) { - return false +} +func (m *GetAllAPIKeysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllAPIKeysResponse.Merge(m, src) +} +func (m *GetAllAPIKeysResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAllAPIKeysResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllAPIKeysResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAllAPIKeysResponse proto.InternalMessageInfo + +func (m *GetAllAPIKeysResponse) GetApiKeys() []*v1.APIKey { + if m != nil { + return m.ApiKeys } - return true + return nil } -func (this *ResendUserInviteRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *GetAllAPIKeysResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken } + return "" +} - that1, ok := that.(*ResendUserInviteRequest) - if !ok { - that2, ok := that.(ResendUserInviteRequest) - if ok { - that1 = &that2 - } else { - return false +type GetAnyAPIKeyRequest struct { + // the apikey id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *GetAnyAPIKeyRequest) Reset() { *m = GetAnyAPIKeyRequest{} } +func (*GetAnyAPIKeyRequest) ProtoMessage() {} +func (*GetAnyAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{32} +} +func (m *GetAnyAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAnyAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAnyAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UserId != that1.UserId { - return false - } - if this.RequestId != that1.RequestId { - return false - } - return true } -func (this *ResendUserInviteResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *GetAnyAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAnyAPIKeyRequest.Merge(m, src) +} +func (m *GetAnyAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *GetAnyAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAnyAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAnyAPIKeyRequest proto.InternalMessageInfo + +func (m *GetAnyAPIKeyRequest) GetId() string { + if m != nil { + return m.Id } + return "" +} - that1, ok := that.(*ResendUserInviteResponse) - if !ok { - that2, ok := that.(ResendUserInviteResponse) - if ok { - that1 = &that2 - } else { - return false +type GetAnyAPIKeyResponse struct { + // the apikey + ApiKey *v1.APIKey `protobuf:"bytes,1,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` +} + +func (m *GetAnyAPIKeyResponse) Reset() { *m = GetAnyAPIKeyResponse{} } +func (*GetAnyAPIKeyResponse) ProtoMessage() {} +func (*GetAnyAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{33} +} +func (m *GetAnyAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAnyAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAnyAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RequestStatus.Equal(that1.RequestStatus) { - return false - } - return true } -func (this *UpdateUserRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UpdateUserRequest) - if !ok { - that2, ok := that.(UpdateUserRequest) - if ok { - that1 = &that2 - } else { - return false +func (m *GetAnyAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAnyAPIKeyResponse.Merge(m, src) +} +func (m *GetAnyAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *GetAnyAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAnyAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAnyAPIKeyResponse proto.InternalMessageInfo + +func (m *GetAnyAPIKeyResponse) GetApiKey() *v1.APIKey { + if m != nil { + return m.ApiKey + } + return nil +} + +type DeleteAnyAPIKeyRequest struct { + // the apikey id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the version of the apikey for which this delete is intended for + // the latest version can be found in the apikey status + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *DeleteAnyAPIKeyRequest) Reset() { *m = DeleteAnyAPIKeyRequest{} } +func (*DeleteAnyAPIKeyRequest) ProtoMessage() {} +func (*DeleteAnyAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{34} +} +func (m *DeleteAnyAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteAnyAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteAnyAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false +} +func (m *DeleteAnyAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAnyAPIKeyRequest.Merge(m, src) +} +func (m *DeleteAnyAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteAnyAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAnyAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAnyAPIKeyRequest proto.InternalMessageInfo + +func (m *DeleteAnyAPIKeyRequest) GetId() string { + if m != nil { + return m.Id } - if this.UserId != that1.UserId { - return false + return "" +} + +func (m *DeleteAnyAPIKeyRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion } - if !this.Spec.Equal(that1.Spec) { - return false + return "" +} + +func (m *DeleteAnyAPIKeyRequest) GetRequestId() string { + if m != nil { + return m.RequestId } - if this.ResourceVersion != that1.ResourceVersion { - return false + return "" +} + +type DeleteAnyAPIKeyResponse struct { + // the request status of the delete operation + RequestStatus *v11.RequestStatus `protobuf:"bytes,3,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *DeleteAnyAPIKeyResponse) Reset() { *m = DeleteAnyAPIKeyResponse{} } +func (*DeleteAnyAPIKeyResponse) ProtoMessage() {} +func (*DeleteAnyAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{35} +} +func (m *DeleteAnyAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteAnyAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteAnyAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if this.RequestId != that1.RequestId { - return false +} +func (m *DeleteAnyAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteAnyAPIKeyResponse.Merge(m, src) +} +func (m *DeleteAnyAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *DeleteAnyAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteAnyAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteAnyAPIKeyResponse proto.InternalMessageInfo + +func (m *DeleteAnyAPIKeyResponse) GetRequestStatus() *v11.RequestStatus { + if m != nil { + return m.RequestStatus } - return true + return nil } -func (this *UpdateUserResponse) Equal(that interface{}) bool { + +type UpdateAnyAPIKeyRequest struct { + // the id of the apikey to update + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // the new apikey specification + Spec *v1.APIKeySpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // the version of the apikey for which this update is intended for + // the latest version can be found in the get apikey response + ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *UpdateAnyAPIKeyRequest) Reset() { *m = UpdateAnyAPIKeyRequest{} } +func (*UpdateAnyAPIKeyRequest) ProtoMessage() {} +func (*UpdateAnyAPIKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{36} +} +func (m *UpdateAnyAPIKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAnyAPIKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAnyAPIKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateAnyAPIKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAnyAPIKeyRequest.Merge(m, src) +} +func (m *UpdateAnyAPIKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAnyAPIKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAnyAPIKeyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAnyAPIKeyRequest proto.InternalMessageInfo + +func (m *UpdateAnyAPIKeyRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *UpdateAnyAPIKeyRequest) GetSpec() *v1.APIKeySpec { + if m != nil { + return m.Spec + } + return nil +} + +func (m *UpdateAnyAPIKeyRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion + } + return "" +} + +func (m *UpdateAnyAPIKeyRequest) GetRequestId() string { + if m != nil { + return m.RequestId + } + return "" +} + +type UpdateAnyAPIKeyResponse struct { + // the request status of the update operation + RequestStatus *v11.RequestStatus `protobuf:"bytes,1,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *UpdateAnyAPIKeyResponse) Reset() { *m = UpdateAnyAPIKeyResponse{} } +func (*UpdateAnyAPIKeyResponse) ProtoMessage() {} +func (*UpdateAnyAPIKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_82df425cb2a9bb43, []int{37} +} +func (m *UpdateAnyAPIKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAnyAPIKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAnyAPIKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateAnyAPIKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAnyAPIKeyResponse.Merge(m, src) +} +func (m *UpdateAnyAPIKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *UpdateAnyAPIKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAnyAPIKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAnyAPIKeyResponse proto.InternalMessageInfo + +func (m *UpdateAnyAPIKeyResponse) GetRequestStatus() *v11.RequestStatus { + if m != nil { + return m.RequestStatus + } + return nil +} + +func init() { + proto.RegisterType((*GetRoleRequest)(nil), "api.authservice.v1.GetRoleRequest") + proto.RegisterType((*GetRoleResponse)(nil), "api.authservice.v1.GetRoleResponse") + proto.RegisterType((*GetRolesRequest)(nil), "api.authservice.v1.GetRolesRequest") + proto.RegisterType((*GetRolesResponse)(nil), "api.authservice.v1.GetRolesResponse") + proto.RegisterType((*GetRolesByPermissionsRequest)(nil), "api.authservice.v1.GetRolesByPermissionsRequest") + proto.RegisterType((*GetRolesByPermissionsResponse)(nil), "api.authservice.v1.GetRolesByPermissionsResponse") + proto.RegisterType((*GetUsersRequest)(nil), "api.authservice.v1.GetUsersRequest") + proto.RegisterType((*GetUsersResponse)(nil), "api.authservice.v1.GetUsersResponse") + proto.RegisterType((*GetUserRequest)(nil), "api.authservice.v1.GetUserRequest") + proto.RegisterType((*GetUserResponse)(nil), "api.authservice.v1.GetUserResponse") + proto.RegisterType((*InviteUsersRequest)(nil), "api.authservice.v1.InviteUsersRequest") + proto.RegisterType((*InviteUsersResponse)(nil), "api.authservice.v1.InviteUsersResponse") + proto.RegisterType((*ResendUserInviteRequest)(nil), "api.authservice.v1.ResendUserInviteRequest") + proto.RegisterType((*ResendUserInviteResponse)(nil), "api.authservice.v1.ResendUserInviteResponse") + proto.RegisterType((*UpdateUserRequest)(nil), "api.authservice.v1.UpdateUserRequest") + proto.RegisterType((*UpdateUserResponse)(nil), "api.authservice.v1.UpdateUserResponse") + proto.RegisterType((*DeleteUserRequest)(nil), "api.authservice.v1.DeleteUserRequest") + proto.RegisterType((*DeleteUserResponse)(nil), "api.authservice.v1.DeleteUserResponse") + proto.RegisterType((*UpdateUserNamespacePermissionsRequest)(nil), "api.authservice.v1.UpdateUserNamespacePermissionsRequest") + proto.RegisterType((*UpdateUserNamespacePermissionsResponse)(nil), "api.authservice.v1.UpdateUserNamespacePermissionsResponse") + proto.RegisterType((*CreateAPIKeyRequest)(nil), "api.authservice.v1.CreateAPIKeyRequest") + proto.RegisterType((*CreateAPIKeyResponse)(nil), "api.authservice.v1.CreateAPIKeyResponse") + proto.RegisterType((*GetAPIKeysRequest)(nil), "api.authservice.v1.GetAPIKeysRequest") + proto.RegisterType((*GetAPIKeysResponse)(nil), "api.authservice.v1.GetAPIKeysResponse") + proto.RegisterType((*GetAPIKeyRequest)(nil), "api.authservice.v1.GetAPIKeyRequest") + proto.RegisterType((*GetAPIKeyResponse)(nil), "api.authservice.v1.GetAPIKeyResponse") + proto.RegisterType((*DeleteAPIKeyRequest)(nil), "api.authservice.v1.DeleteAPIKeyRequest") + proto.RegisterType((*DeleteAPIKeyResponse)(nil), "api.authservice.v1.DeleteAPIKeyResponse") + proto.RegisterType((*UpdateAPIKeyRequest)(nil), "api.authservice.v1.UpdateAPIKeyRequest") + proto.RegisterType((*UpdateAPIKeyResponse)(nil), "api.authservice.v1.UpdateAPIKeyResponse") + proto.RegisterType((*GetAllAPIKeysRequest)(nil), "api.authservice.v1.GetAllAPIKeysRequest") + proto.RegisterType((*GetAllAPIKeysResponse)(nil), "api.authservice.v1.GetAllAPIKeysResponse") + proto.RegisterType((*GetAnyAPIKeyRequest)(nil), "api.authservice.v1.GetAnyAPIKeyRequest") + proto.RegisterType((*GetAnyAPIKeyResponse)(nil), "api.authservice.v1.GetAnyAPIKeyResponse") + proto.RegisterType((*DeleteAnyAPIKeyRequest)(nil), "api.authservice.v1.DeleteAnyAPIKeyRequest") + proto.RegisterType((*DeleteAnyAPIKeyResponse)(nil), "api.authservice.v1.DeleteAnyAPIKeyResponse") + proto.RegisterType((*UpdateAnyAPIKeyRequest)(nil), "api.authservice.v1.UpdateAnyAPIKeyRequest") + proto.RegisterType((*UpdateAnyAPIKeyResponse)(nil), "api.authservice.v1.UpdateAnyAPIKeyResponse") +} + +func init() { + proto.RegisterFile("api/authservice/v1/request_response.proto", fileDescriptor_82df425cb2a9bb43) +} + +var fileDescriptor_82df425cb2a9bb43 = []byte{ + // 997 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x6f, 0xdc, 0x54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f7, + 0x91, 0x4a, 0xfe, 0x18, 0xa9, 0xe4, 0x7c, 0xa4, 0x92, 0xbf, 0x46, 0x2a, 0xf9, 0x7b, 0xa4, 0x56, + 0xae, 0x46, 0x2a, 0xf9, 0xe9, 0x52, 0xad, 0x9c, 0x5f, 0xaa, 0x95, 0xd7, 0x97, 0x6a, 0xe5, 0xd9, + 0xbb, 0x61, 0xcf, 0x0f, 0x9c, 0xb6, 0xe5, 0x78, 0xfd, 0xee, 0x41, 0xf6, 0x27, 0xfd, 0x07, 0x89, + 0xe3, 0x97, 0x8b, 0xfc, 0x17, 0xf8, 0x7b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xf4, 0xa9, + 0x0e, 0xfb, 0x0f, 0x00, 0x00, +} + +func (this *GetRoleRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*UpdateUserResponse) + that1, ok := that.(*GetRoleRequest) if !ok { - that2, ok := that.(UpdateUserResponse) + that2, ok := that.(GetRoleRequest) if ok { that1 = &that2 } else { @@ -1452,19 +2167,19 @@ func (this *UpdateUserResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.RequestStatus.Equal(that1.RequestStatus) { + if this.RoleId != that1.RoleId { return false } return true } -func (this *DeleteUserRequest) Equal(that interface{}) bool { +func (this *GetRoleResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*DeleteUserRequest) + that1, ok := that.(*GetRoleResponse) if !ok { - that2, ok := that.(DeleteUserRequest) + that2, ok := that.(GetRoleResponse) if ok { that1 = &that2 } else { @@ -1476,25 +2191,19 @@ func (this *DeleteUserRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.UserId != that1.UserId { - return false - } - if this.ResourceVersion != that1.ResourceVersion { - return false - } - if this.RequestId != that1.RequestId { + if !this.Role.Equal(that1.Role) { return false } return true } -func (this *DeleteUserResponse) Equal(that interface{}) bool { +func (this *GetRolesRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*DeleteUserResponse) + that1, ok := that.(*GetRolesRequest) if !ok { - that2, ok := that.(DeleteUserResponse) + that2, ok := that.(GetRolesRequest) if ok { that1 = &that2 } else { @@ -1506,19 +2215,28 @@ func (this *DeleteUserResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.RequestStatus.Equal(that1.RequestStatus) { + if this.PageSize != that1.PageSize { + return false + } + if this.PageToken != that1.PageToken { + return false + } + if this.Namespace != that1.Namespace { + return false + } + if this.UserId != that1.UserId { return false } return true } -func (this *UpdateUserNamespacePermissionsRequest) Equal(that interface{}) bool { +func (this *GetRolesResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*UpdateUserNamespacePermissionsRequest) + that1, ok := that.(*GetRolesResponse) if !ok { - that2, ok := that.(UpdateUserNamespacePermissionsRequest) + that2, ok := that.(GetRolesResponse) if ok { that1 = &that2 } else { @@ -1530,30 +2248,27 @@ func (this *UpdateUserNamespacePermissionsRequest) Equal(that interface{}) bool } else if this == nil { return false } - if this.Namespace != that1.Namespace { - return false - } - if len(this.UserNamespacePermissions) != len(that1.UserNamespacePermissions) { + if len(this.Roles) != len(that1.Roles) { return false } - for i := range this.UserNamespacePermissions { - if !this.UserNamespacePermissions[i].Equal(that1.UserNamespacePermissions[i]) { + for i := range this.Roles { + if !this.Roles[i].Equal(that1.Roles[i]) { return false } } - if this.RequestId != that1.RequestId { + if this.NextPageToken != that1.NextPageToken { return false } return true } -func (this *UpdateUserNamespacePermissionsResponse) Equal(that interface{}) bool { +func (this *GetRolesByPermissionsRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*UpdateUserNamespacePermissionsResponse) + that1, ok := that.(*GetRolesByPermissionsRequest) if !ok { - that2, ok := that.(UpdateUserNamespacePermissionsResponse) + that2, ok := that.(GetRolesByPermissionsRequest) if ok { that1 = &that2 } else { @@ -1565,1549 +2280,6037 @@ func (this *UpdateUserNamespacePermissionsResponse) Equal(that interface{}) bool } else if this == nil { return false } - if !this.RequestStatus.Equal(that1.RequestStatus) { + if len(this.Specs) != len(that1.Specs) { return false } + for i := range this.Specs { + if !this.Specs[i].Equal(that1.Specs[i]) { + return false + } + } return true } -func (this *GetRolesRequest) GoString() string { - if this == nil { - return "nil" +func (this *GetRolesByPermissionsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 8) - s = append(s, "&authservice.GetRolesRequest{") - s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") - s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetRolesResponse) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*GetRolesByPermissionsResponse) + if !ok { + that2, ok := that.(GetRolesByPermissionsResponse) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 6) - s = append(s, "&authservice.GetRolesResponse{") - if this.Roles != nil { - s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetRolesByPermissionsRequest) GoString() string { - if this == nil { - return "nil" + if len(this.Roles) != len(that1.Roles) { + return false } - s := make([]string, 0, 5) - s = append(s, "&authservice.GetRolesByPermissionsRequest{") - if this.Specs != nil { - s = append(s, "Specs: "+fmt.Sprintf("%#v", this.Specs)+",\n") + for i := range this.Roles { + if !this.Roles[i].Equal(that1.Roles[i]) { + return false + } } - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *GetRolesByPermissionsResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&authservice.GetRolesByPermissionsResponse{") - if this.Roles != nil { - s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") +func (this *GetUsersRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetUsersRequest) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*GetUsersRequest) + if !ok { + that2, ok := that.(GetUsersRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 8) - s = append(s, "&authservice.GetUsersRequest{") - s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") - s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetUsersResponse) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 6) - s = append(s, "&authservice.GetUsersResponse{") - if this.Users != nil { - s = append(s, "Users: "+fmt.Sprintf("%#v", this.Users)+",\n") + if this.PageSize != that1.PageSize { + return false } - s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetUserRequest) GoString() string { - if this == nil { - return "nil" + if this.PageToken != that1.PageToken { + return false } - s := make([]string, 0, 6) - s = append(s, "&authservice.GetUserRequest{") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetUserResponse) GoString() string { - if this == nil { - return "nil" + if this.Namespace != that1.Namespace { + return false } - s := make([]string, 0, 5) - s = append(s, "&authservice.GetUserResponse{") - if this.User != nil { - s = append(s, "User: "+fmt.Sprintf("%#v", this.User)+",\n") + if this.State != that1.State { + return false } - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *InviteUsersRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&authservice.InviteUsersRequest{") - if this.Specs != nil { - s = append(s, "Specs: "+fmt.Sprintf("%#v", this.Specs)+",\n") +func (this *GetUsersResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *InviteUsersResponse) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*GetUsersResponse) + if !ok { + that2, ok := that.(GetUsersResponse) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 5) - s = append(s, "&authservice.InviteUsersResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ResendUserInviteRequest) GoString() string { - if this == nil { - return "nil" + if len(this.Users) != len(that1.Users) { + return false } - s := make([]string, 0, 6) - s = append(s, "&authservice.ResendUserInviteRequest{") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ResendUserInviteResponse) GoString() string { - if this == nil { - return "nil" + for i := range this.Users { + if !this.Users[i].Equal(that1.Users[i]) { + return false + } } - s := make([]string, 0, 5) - s = append(s, "&authservice.ResendUserInviteResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if this.NextPageToken != that1.NextPageToken { + return false } - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *UpdateUserRequest) GoString() string { - if this == nil { - return "nil" +func (this *GetUserRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 8) - s = append(s, "&authservice.UpdateUserRequest{") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - if this.Spec != nil { - s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + + that1, ok := that.(*GetUserRequest) + if !ok { + that2, ok := that.(GetUserRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UpdateUserResponse) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 5) - s = append(s, "&authservice.UpdateUserResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if this.UserId != that1.UserId { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeleteUserRequest) GoString() string { - if this == nil { - return "nil" + if this.UserEmail != that1.UserEmail { + return false } - s := make([]string, 0, 7) - s = append(s, "&authservice.DeleteUserRequest{") - s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *DeleteUserResponse) GoString() string { - if this == nil { - return "nil" +func (this *GetUserResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&authservice.DeleteUserResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + + that1, ok := that.(*GetUserResponse) + if !ok { + that2, ok := that.(GetUserResponse) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UpdateUserNamespacePermissionsRequest) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 7) - s = append(s, "&authservice.UpdateUserNamespacePermissionsRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - if this.UserNamespacePermissions != nil { - s = append(s, "UserNamespacePermissions: "+fmt.Sprintf("%#v", this.UserNamespacePermissions)+",\n") + if !this.User.Equal(that1.User) { + return false } - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *UpdateUserNamespacePermissionsResponse) GoString() string { - if this == nil { - return "nil" +func (this *InviteUsersRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&authservice.UpdateUserNamespacePermissionsResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + + that1, ok := that.(*InviteUsersRequest) + if !ok { + that2, ok := that.(InviteUsersRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringRequestResponse(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *GetRolesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(this.Specs) != len(that1.Specs) { + return false } - return dAtA[:n], nil -} - -func (m *GetRolesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + for i := range this.Specs { + if !this.Specs[i].Equal(that1.Specs[i]) { + return false + } + } + if this.RequestId != that1.RequestId { + return false + } + return true } - -func (m *GetRolesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0x22 +func (this *InviteUsersResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x1a + + that1, ok := that.(*InviteUsersResponse) + if !ok { + that2, ok := that.(InviteUsersResponse) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.PageToken) > 0 { - i -= len(m.PageToken) - copy(dAtA[i:], m.PageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if m.PageSize != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x8 + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false } - return len(dAtA) - i, nil + return true } - -func (m *GetRolesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *ResendUserInviteRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *GetRolesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *GetRolesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NextPageToken) > 0 { - i -= len(m.NextPageToken) - copy(dAtA[i:], m.NextPageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) - i-- - dAtA[i] = 0x12 - } - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Roles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + that1, ok := that.(*ResendUserInviteRequest) + if !ok { + that2, ok := that.(ResendUserInviteRequest) + if ok { + that1 = &that2 + } else { + return false } } - return len(dAtA) - i, nil -} - -func (m *GetRolesByPermissionsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *GetRolesByPermissionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if this.UserId != that1.UserId { + return false + } + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *ResendUserInviteResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetRolesByPermissionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Specs) > 0 { - for iNdEx := len(m.Specs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Specs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + that1, ok := that.(*ResendUserInviteResponse) + if !ok { + that2, ok := that.(ResendUserInviteResponse) + if ok { + that1 = &that2 + } else { + return false } } - return len(dAtA) - i, nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *UpdateUserRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetRolesByPermissionsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*UpdateUserRequest) + if !ok { + that2, ok := that.(UpdateUserRequest) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil -} - -func (m *GetRolesByPermissionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.UserId != that1.UserId { + return false + } + if !this.Spec.Equal(that1.Spec) { + return false + } + if this.ResourceVersion != that1.ResourceVersion { + return false + } + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *UpdateUserResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetRolesByPermissionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Roles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + that1, ok := that.(*UpdateUserResponse) + if !ok { + that2, ok := that.(UpdateUserResponse) + if ok { + that1 = &that2 + } else { + return false } } - return len(dAtA) - i, nil -} - -func (m *GetUsersRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *GetUsersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *DeleteUserRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUsersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x20 + that1, ok := that.(*DeleteUserRequest) + if !ok { + that2, ok := that.(DeleteUserRequest) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x1a + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.PageToken) > 0 { - i -= len(m.PageToken) - copy(dAtA[i:], m.PageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) - i-- - dAtA[i] = 0x12 + if this.UserId != that1.UserId { + return false } - if m.PageSize != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x8 + if this.ResourceVersion != that1.ResourceVersion { + return false } - return len(dAtA) - i, nil -} - -func (m *GetUsersResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if this.RequestId != that1.RequestId { + return false } - return dAtA[:n], nil + return true } +func (this *DeleteUserResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUsersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + that1, ok := that.(*DeleteUserResponse) + if !ok { + that2, ok := that.(DeleteUserResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *UpdateUserNamespacePermissionsRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUsersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NextPageToken) > 0 { - i -= len(m.NextPageToken) - copy(dAtA[i:], m.NextPageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) - i-- - dAtA[i] = 0x12 + that1, ok := that.(*UpdateUserNamespacePermissionsRequest) + if !ok { + that2, ok := that.(UpdateUserNamespacePermissionsRequest) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.Users) > 0 { - for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Users[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Namespace != that1.Namespace { + return false + } + if len(this.UserNamespacePermissions) != len(that1.UserNamespacePermissions) { + return false + } + for i := range this.UserNamespacePermissions { + if !this.UserNamespacePermissions[i].Equal(that1.UserNamespacePermissions[i]) { + return false } } - return len(dAtA) - i, nil + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *UpdateUserNamespacePermissionsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*UpdateUserNamespacePermissionsResponse) + if !ok { + that2, ok := that.(UpdateUserNamespacePermissionsResponse) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *CreateAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserEmail) > 0 { - i -= len(m.UserEmail) - copy(dAtA[i:], m.UserEmail) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserEmail))) - i-- - dAtA[i] = 0x12 + that1, ok := that.(*CreateAPIKeyRequest) + if !ok { + that2, ok := that.(CreateAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0xa + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return len(dAtA) - i, nil -} - -func (m *GetUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if !this.Spec.Equal(that1.Spec) { + return false } - return dAtA[:n], nil -} - -func (m *GetUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *CreateAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.User != nil { - { - size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*CreateAPIKeyResponse) + if !ok { + that2, ok := that.(CreateAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *InviteUsersRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil + if this.Id != that1.Id { + return false + } + if this.SecretKey != that1.SecretKey { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *GetAPIKeysRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *InviteUsersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + that1, ok := that.(*GetAPIKeysRequest) + if !ok { + that2, ok := that.(GetAPIKeysRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.PageSize != that1.PageSize { + return false + } + if this.PageToken != that1.PageToken { + return false + } + return true } +func (this *GetAPIKeysResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *InviteUsersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x12 + that1, ok := that.(*GetAPIKeysResponse) + if !ok { + that2, ok := that.(GetAPIKeysResponse) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.Specs) > 0 { - for iNdEx := len(m.Specs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Specs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.ApiKeys) != len(that1.ApiKeys) { + return false + } + for i := range this.ApiKeys { + if !this.ApiKeys[i].Equal(that1.ApiKeys[i]) { + return false } } - return len(dAtA) - i, nil + if this.NextPageToken != that1.NextPageToken { + return false + } + return true } +func (this *GetAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *InviteUsersResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*GetAPIKeyRequest) + if !ok { + that2, ok := that.(GetAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true } +func (this *GetAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *InviteUsersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + that1, ok := that.(*GetAPIKeyResponse) + if !ok { + that2, ok := that.(GetAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.ApiKey.Equal(that1.ApiKey) { + return false + } + return true } +func (this *DeleteAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *InviteUsersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*DeleteAPIKeyRequest) + if !ok { + that2, ok := that.(DeleteAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.ResourceVersion != that1.ResourceVersion { + return false + } + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *DeleteAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *ResendUserInviteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*DeleteAPIKeyResponse) + if !ok { + that2, ok := that.(DeleteAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil -} - -func (m *ResendUserInviteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResendUserInviteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0xa + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false } - return len(dAtA) - i, nil + return true } - -func (m *ResendUserInviteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *UpdateAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *ResendUserInviteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *ResendUserInviteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*UpdateAPIKeyRequest) + if !ok { + that2, ok := that.(UpdateAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if !this.Spec.Equal(that1.Spec) { + return false + } + if this.ResourceVersion != that1.ResourceVersion { + return false + } + if this.RequestId != that1.RequestId { + return false + } + return true } +func (this *UpdateAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*UpdateAPIKeyResponse) + if !ok { + that2, ok := that.(UpdateAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *GetAllAPIKeysRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + that1, ok := that.(*GetAllAPIKeysRequest) + if !ok { + that2, ok := that.(GetAllAPIKeysRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.OwnerId != that1.OwnerId { + return false + } + if this.UserEmail != that1.UserEmail { + return false + } + if this.PageSize != that1.PageSize { + return false + } + if this.PageToken != that1.PageToken { + return false + } + return true } +func (this *GetAllAPIKeysResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x22 + that1, ok := that.(*GetAllAPIKeysResponse) + if !ok { + that2, ok := that.(GetAllAPIKeysResponse) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.ResourceVersion) > 0 { - i -= len(m.ResourceVersion) - copy(dAtA[i:], m.ResourceVersion) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) - i-- - dAtA[i] = 0x1a + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if m.Spec != nil { - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + if len(this.ApiKeys) != len(that1.ApiKeys) { + return false + } + for i := range this.ApiKeys { + if !this.ApiKeys[i].Equal(that1.ApiKeys[i]) { + return false } - i-- - dAtA[i] = 0x12 } - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0xa + if this.NextPageToken != that1.NextPageToken { + return false } - return len(dAtA) - i, nil + return true } - -func (m *UpdateUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *GetAnyAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *UpdateUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *UpdateUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*GetAnyAPIKeyRequest) + if !ok { + that2, ok := that.(GetAnyAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + return true } +func (this *GetAnyAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *DeleteUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x1a + that1, ok := that.(*GetAnyAPIKeyResponse) + if !ok { + that2, ok := that.(GetAnyAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.ResourceVersion) > 0 { - i -= len(m.ResourceVersion) - copy(dAtA[i:], m.ResourceVersion) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0xa + if !this.ApiKey.Equal(that1.ApiKey) { + return false } - return len(dAtA) - i, nil + return true } - -func (m *DeleteUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *DeleteAnyAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *DeleteUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *DeleteUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*DeleteAnyAPIKeyRequest) + if !ok { + that2, ok := that.(DeleteAnyAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *UpdateUserNamespacePermissionsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *UpdateUserNamespacePermissionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateUserNamespacePermissionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x1a + if this.Id != that1.Id { + return false } - if len(m.UserNamespacePermissions) > 0 { - for iNdEx := len(m.UserNamespacePermissions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UserNamespacePermissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + if this.ResourceVersion != that1.ResourceVersion { + return false } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if this.RequestId != that1.RequestId { + return false } - return len(dAtA) - i, nil + return true } - -func (m *UpdateUserNamespacePermissionsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *DeleteAnyAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} -func (m *UpdateUserNamespacePermissionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateUserNamespacePermissionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*DeleteAnyAPIKeyResponse) + if !ok { + that2, ok := that.(DeleteAnyAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *UpdateAnyAPIKeyRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { - offset -= sovRequestResponse(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + that1, ok := that.(*UpdateAnyAPIKeyRequest) + if !ok { + that2, ok := that.(UpdateAnyAPIKeyRequest) + if ok { + that1 = &that2 + } else { + return false + } } - dAtA[offset] = uint8(v) - return base -} -func (m *GetRolesRequest) Size() (n int) { - if m == nil { - return 0 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - var l int - _ = l - if m.PageSize != 0 { - n += 1 + sovRequestResponse(uint64(m.PageSize)) + if this.Id != that1.Id { + return false } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if !this.Spec.Equal(that1.Spec) { + return false } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.ResourceVersion != that1.ResourceVersion { + return false } - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.RequestId != that1.RequestId { + return false } - return n + return true } - -func (m *GetRolesResponse) Size() (n int) { - if m == nil { - return 0 +func (this *UpdateAnyAPIKeyResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - var l int - _ = l - if len(m.Roles) > 0 { - for _, e := range m.Roles { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + + that1, ok := that.(*UpdateAnyAPIKeyResponse) + if !ok { + that2, ok := that.(UpdateAnyAPIKeyResponse) + if ok { + that1 = &that2 + } else { + return false } } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return n -} - -func (m *GetRolesByPermissionsRequest) Size() (n int) { - if m == nil { - return 0 + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false } - var l int - _ = l - if len(m.Specs) > 0 { - for _, e := range m.Specs { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } + return true +} +func (this *GetRoleRequest) GoString() string { + if this == nil { + return "nil" } - return n + s := make([]string, 0, 5) + s = append(s, "&authservice.GetRoleRequest{") + s = append(s, "RoleId: "+fmt.Sprintf("%#v", this.RoleId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *GetRolesByPermissionsResponse) Size() (n int) { - if m == nil { - return 0 +func (this *GetRoleResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if len(m.Roles) > 0 { - for _, e := range m.Roles { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } + s := make([]string, 0, 5) + s = append(s, "&authservice.GetRoleResponse{") + if this.Role != nil { + s = append(s, "Role: "+fmt.Sprintf("%#v", this.Role)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *GetUsersRequest) Size() (n int) { - if m == nil { - return 0 +func (this *GetRolesRequest) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.PageSize != 0 { - n += 1 + sovRequestResponse(uint64(m.PageSize)) + s := make([]string, 0, 8) + s = append(s, "&authservice.GetRolesRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRolesResponse) GoString() string { + if this == nil { + return "nil" } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&authservice.GetRolesResponse{") + if this.Roles != nil { + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") } - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRolesByPermissionsRequest) GoString() string { + if this == nil { + return "nil" } - if m.State != 0 { - n += 1 + sovRequestResponse(uint64(m.State)) + s := make([]string, 0, 5) + s = append(s, "&authservice.GetRolesByPermissionsRequest{") + if this.Specs != nil { + s = append(s, "Specs: "+fmt.Sprintf("%#v", this.Specs)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *GetUsersResponse) Size() (n int) { - if m == nil { - return 0 +func (this *GetRolesByPermissionsResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if len(m.Users) > 0 { - for _, e := range m.Users { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } + s := make([]string, 0, 5) + s = append(s, "&authservice.GetRolesByPermissionsResponse{") + if this.Roles != nil { + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetUsersRequest) GoString() string { + if this == nil { + return "nil" } - return n + s := make([]string, 0, 8) + s = append(s, "&authservice.GetUsersRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *GetUserRequest) Size() (n int) { - if m == nil { - return 0 +func (this *GetUsersResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&authservice.GetUsersResponse{") + if this.Users != nil { + s = append(s, "Users: "+fmt.Sprintf("%#v", this.Users)+",\n") } - l = len(m.UserEmail) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetUserRequest) GoString() string { + if this == nil { + return "nil" } - return n + s := make([]string, 0, 6) + s = append(s, "&authservice.GetUserRequest{") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *GetUserResponse) Size() (n int) { - if m == nil { - return 0 +func (this *GetUserResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.User != nil { - l = m.User.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.GetUserResponse{") + if this.User != nil { + s = append(s, "User: "+fmt.Sprintf("%#v", this.User)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *InviteUsersRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Specs) > 0 { - for _, e := range m.Specs { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } +func (this *InviteUsersRequest) GoString() string { + if this == nil { + return "nil" } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&authservice.InviteUsersRequest{") + if this.Specs != nil { + s = append(s, "Specs: "+fmt.Sprintf("%#v", this.Specs)+",\n") } - return n + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *InviteUsersResponse) Size() (n int) { - if m == nil { - return 0 +func (this *InviteUsersResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.InviteUsersResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *ResendUserInviteRequest) Size() (n int) { - if m == nil { - return 0 +func (this *ResendUserInviteRequest) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&authservice.ResendUserInviteRequest{") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResendUserInviteResponse) GoString() string { + if this == nil { + return "nil" } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.ResendUserInviteResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *ResendUserInviteResponse) Size() (n int) { - if m == nil { - return 0 +func (this *UpdateUserRequest) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 8) + s = append(s, "&authservice.UpdateUserRequest{") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") } - return n + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *UpdateUserRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) - } - if m.Spec != nil { - l = m.Spec.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } - l = len(m.ResourceVersion) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) +func (this *UpdateUserResponse) GoString() string { + if this == nil { + return "nil" } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.UpdateUserResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *UpdateUserResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) +func (this *DeleteUserRequest) GoString() string { + if this == nil { + return "nil" } - return n + s := make([]string, 0, 7) + s = append(s, "&authservice.DeleteUserRequest{") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *DeleteUserRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) - } - l = len(m.ResourceVersion) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) +func (this *DeleteUserResponse) GoString() string { + if this == nil { + return "nil" } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.DeleteUserResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - return n + s = append(s, "}") + return strings.Join(s, "") } - -func (m *DeleteUserResponse) Size() (n int) { - if m == nil { - return 0 +func (this *UpdateUserNamespacePermissionsRequest) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 7) + s = append(s, "&authservice.UpdateUserNamespacePermissionsRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.UserNamespacePermissions != nil { + s = append(s, "UserNamespacePermissions: "+fmt.Sprintf("%#v", this.UserNamespacePermissions)+",\n") } - return n + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *UpdateUserNamespacePermissionsRequest) Size() (n int) { - if m == nil { - return 0 +func (this *UpdateUserNamespacePermissionsResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 5) + s = append(s, "&authservice.UpdateUserNamespacePermissionsResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - if len(m.UserNamespacePermissions) > 0 { - for _, e := range m.UserNamespacePermissions { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CreateAPIKeyRequest) GoString() string { + if this == nil { + return "nil" } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 6) + s = append(s, "&authservice.CreateAPIKeyRequest{") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") } - return n + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } - -func (m *UpdateUserNamespacePermissionsResponse) Size() (n int) { - if m == nil { - return 0 +func (this *CreateAPIKeyResponse) GoString() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + s := make([]string, 0, 7) + s = append(s, "&authservice.CreateAPIKeyResponse{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "SecretKey: "+fmt.Sprintf("%#v", this.SecretKey)+",\n") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - return n -} - -func sovRequestResponse(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRequestResponse(x uint64) (n int) { - return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetRolesRequest) String() string { +func (this *GetAPIKeysRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetRolesRequest{`, - `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, - `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&authservice.GetAPIKeysRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetRolesResponse) String() string { +func (this *GetAPIKeysResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForRoles := "[]*Role{" - for _, f := range this.Roles { - repeatedStringForRoles += strings.Replace(fmt.Sprintf("%v", f), "Role", "v1.Role", 1) + "," + s := make([]string, 0, 6) + s = append(s, "&authservice.GetAPIKeysResponse{") + if this.ApiKeys != nil { + s = append(s, "ApiKeys: "+fmt.Sprintf("%#v", this.ApiKeys)+",\n") } - repeatedStringForRoles += "}" - s := strings.Join([]string{`&GetRolesResponse{`, - `Roles:` + repeatedStringForRoles + `,`, - `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, - `}`, - }, "") - return s + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetRolesByPermissionsRequest) String() string { +func (this *GetAPIKeyRequest) GoString() string { if this == nil { return "nil" } - repeatedStringForSpecs := "[]*RoleSpec{" - for _, f := range this.Specs { - repeatedStringForSpecs += strings.Replace(fmt.Sprintf("%v", f), "RoleSpec", "v1.RoleSpec", 1) + "," - } - repeatedStringForSpecs += "}" - s := strings.Join([]string{`&GetRolesByPermissionsRequest{`, - `Specs:` + repeatedStringForSpecs + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&authservice.GetAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetRolesByPermissionsResponse) String() string { +func (this *GetAPIKeyResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForRoles := "[]*Role{" - for _, f := range this.Roles { - repeatedStringForRoles += strings.Replace(fmt.Sprintf("%v", f), "Role", "v1.Role", 1) + "," + s := make([]string, 0, 5) + s = append(s, "&authservice.GetAPIKeyResponse{") + if this.ApiKey != nil { + s = append(s, "ApiKey: "+fmt.Sprintf("%#v", this.ApiKey)+",\n") } - repeatedStringForRoles += "}" - s := strings.Join([]string{`&GetRolesByPermissionsResponse{`, - `Roles:` + repeatedStringForRoles + `,`, - `}`, - }, "") - return s + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetUsersRequest) String() string { +func (this *DeleteAPIKeyRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetUsersRequest{`, - `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, - `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `State:` + fmt.Sprintf("%v", this.State) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 7) + s = append(s, "&authservice.DeleteAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetUsersResponse) String() string { +func (this *DeleteAPIKeyResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForUsers := "[]*User{" - for _, f := range this.Users { - repeatedStringForUsers += strings.Replace(fmt.Sprintf("%v", f), "User", "v1.User", 1) + "," + s := make([]string, 0, 5) + s = append(s, "&authservice.DeleteAPIKeyResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - repeatedStringForUsers += "}" - s := strings.Join([]string{`&GetUsersResponse{`, - `Users:` + repeatedStringForUsers + `,`, - `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, - `}`, - }, "") - return s + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetUserRequest) String() string { +func (this *UpdateAPIKeyRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetUserRequest{`, - `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, - `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, - `}`, - }, "") - return s -} -func (this *GetUserResponse) String() string { - if this == nil { - return "nil" + s := make([]string, 0, 8) + s = append(s, "&authservice.UpdateAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") } - s := strings.Join([]string{`&GetUserResponse{`, - `User:` + strings.Replace(fmt.Sprintf("%v", this.User), "User", "v1.User", 1) + `,`, - `}`, - }, "") - return s + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *InviteUsersRequest) String() string { +func (this *UpdateAPIKeyResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForSpecs := "[]*UserSpec{" - for _, f := range this.Specs { - repeatedStringForSpecs += strings.Replace(fmt.Sprintf("%v", f), "UserSpec", "v1.UserSpec", 1) + "," + s := make([]string, 0, 5) + s = append(s, "&authservice.UpdateAPIKeyResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - repeatedStringForSpecs += "}" - s := strings.Join([]string{`&InviteUsersRequest{`, - `Specs:` + repeatedStringForSpecs + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s = append(s, "}") + return strings.Join(s, "") } -func (this *InviteUsersResponse) String() string { +func (this *GetAllAPIKeysRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&InviteUsersResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 8) + s = append(s, "&authservice.GetAllAPIKeysRequest{") + s = append(s, "OwnerId: "+fmt.Sprintf("%#v", this.OwnerId)+",\n") + s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ResendUserInviteRequest) String() string { +func (this *GetAllAPIKeysResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResendUserInviteRequest{`, - `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&authservice.GetAllAPIKeysResponse{") + if this.ApiKeys != nil { + s = append(s, "ApiKeys: "+fmt.Sprintf("%#v", this.ApiKeys)+",\n") + } + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ResendUserInviteResponse) String() string { +func (this *GetAnyAPIKeyRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResendUserInviteResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&authservice.GetAnyAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateUserRequest) String() string { +func (this *GetAnyAPIKeyResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&UpdateUserRequest{`, - `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, - `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "UserSpec", "v1.UserSpec", 1) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&authservice.GetAnyAPIKeyResponse{") + if this.ApiKey != nil { + s = append(s, "ApiKey: "+fmt.Sprintf("%#v", this.ApiKey)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateUserResponse) String() string { +func (this *DeleteAnyAPIKeyRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&UpdateUserResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 7) + s = append(s, "&authservice.DeleteAnyAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *DeleteUserRequest) String() string { +func (this *DeleteAnyAPIKeyResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteUserRequest{`, - `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&authservice.DeleteAnyAPIKeyResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *DeleteUserResponse) String() string { +func (this *UpdateAnyAPIKeyRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteUserResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 8) + s = append(s, "&authservice.UpdateAnyAPIKeyRequest{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateUserNamespacePermissionsRequest) String() string { +func (this *UpdateAnyAPIKeyResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForUserNamespacePermissions := "[]*UserNamespacePermissions{" - for _, f := range this.UserNamespacePermissions { - repeatedStringForUserNamespacePermissions += strings.Replace(fmt.Sprintf("%v", f), "UserNamespacePermissions", "v1.UserNamespacePermissions", 1) + "," + s := make([]string, 0, 5) + s = append(s, "&authservice.UpdateAnyAPIKeyResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") } - repeatedStringForUserNamespacePermissions += "}" - s := strings.Join([]string{`&UpdateUserNamespacePermissionsRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `UserNamespacePermissions:` + repeatedStringForUserNamespacePermissions + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateUserNamespacePermissionsResponse) String() string { - if this == nil { +func valueToGoStringRequestResponse(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { return "nil" } - s := strings.Join([]string{`&UpdateUserNamespacePermissionsResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringRequestResponse(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *GetRoleRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRoleRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRoleRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RoleId) > 0 { + i -= len(m.RoleId) + copy(dAtA[i:], m.RoleId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RoleId))) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} + +func (m *GetRoleResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRoleResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Role != nil { + { + size, err := m.Role.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetRolesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRolesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRolesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0x22 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + } + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetRolesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRolesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRolesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Roles) > 0 { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Roles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetRolesByPermissionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRolesByPermissionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRolesByPermissionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Specs) > 0 { + for iNdEx := len(m.Specs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Specs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetRolesByPermissionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRolesByPermissionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRolesByPermissionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Roles) > 0 { + for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Roles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetUsersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUsersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUsersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x20 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + } + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetUsersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUsersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUsersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Users) > 0 { + for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Users[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetUserRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x12 + } + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetUserResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.User != nil { + { + size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InviteUsersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InviteUsersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InviteUsersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Specs) > 0 { + for iNdEx := len(m.Specs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Specs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *InviteUsersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InviteUsersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InviteUsersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResendUserInviteRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResendUserInviteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResendUserInviteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x12 + } + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResendUserInviteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResendUserInviteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResendUserInviteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateUserRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateUserRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateUserResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateUserResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteUserRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteUserRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteUserResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteUserResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateUserNamespacePermissionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateUserNamespacePermissionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateUserNamespacePermissionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if len(m.UserNamespacePermissions) > 0 { + for iNdEx := len(m.UserNamespacePermissions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UserNamespacePermissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateUserNamespacePermissionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateUserNamespacePermissionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateUserNamespacePermissionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x12 + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.SecretKey) > 0 { + i -= len(m.SecretKey) + copy(dAtA[i:], m.SecretKey) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.SecretKey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAPIKeysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAPIKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAPIKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetAPIKeysResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAPIKeysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAPIKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApiKeys) > 0 { + for iNdEx := len(m.ApiKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ApiKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ApiKey != nil { + { + size, err := m.ApiKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} + +func (m *UpdateAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAllAPIKeysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAllAPIKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAllAPIKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x22 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x18 + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerId) > 0 { + i -= len(m.OwnerId) + copy(dAtA[i:], m.OwnerId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.OwnerId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAllAPIKeysResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAllAPIKeysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAllAPIKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.ApiKeys) > 0 { + for iNdEx := len(m.ApiKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ApiKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetAnyAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAnyAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAnyAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAnyAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAnyAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetAnyAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ApiKey != nil { + { + size, err := m.ApiKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteAnyAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteAnyAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteAnyAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteAnyAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteAnyAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteAnyAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} + +func (m *UpdateAnyAPIKeyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAnyAPIKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAnyAPIKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateAnyAPIKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAnyAPIKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAnyAPIKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { + offset -= sovRequestResponse(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetRoleRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RoleId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRoleResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Role != nil { + l = m.Role.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRolesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRolesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Roles) > 0 { + for _, e := range m.Roles { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRolesByPermissionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Specs) > 0 { + for _, e := range m.Specs { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + return n +} + +func (m *GetRolesByPermissionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Roles) > 0 { + for _, e := range m.Roles { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + return n +} + +func (m *GetUsersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.State != 0 { + n += 1 + sovRequestResponse(uint64(m.State)) + } + return n +} + +func (m *GetUsersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Users) > 0 { + for _, e := range m.Users { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetUserResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.User != nil { + l = m.User.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *InviteUsersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Specs) > 0 { + for _, e := range m.Specs { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *InviteUsersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ResendUserInviteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ResendUserInviteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateUserResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteUserResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateUserNamespacePermissionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if len(m.UserNamespacePermissions) > 0 { + for _, e := range m.UserNamespacePermissions { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateUserNamespacePermissionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *CreateAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *CreateAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.SecretKey) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAPIKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAPIKeysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ApiKeys) > 0 { + for _, e := range m.ApiKeys { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ApiKey != nil { + l = m.ApiKey.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAllAPIKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAllAPIKeysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ApiKeys) > 0 { + for _, e := range m.ApiKeys { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAnyAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetAnyAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ApiKey != nil { + l = m.ApiKey.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteAnyAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteAnyAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateAnyAPIKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateAnyAPIKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func sovRequestResponse(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRequestResponse(x uint64) (n int) { + return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GetRoleRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRoleRequest{`, + `RoleId:` + fmt.Sprintf("%v", this.RoleId) + `,`, + `}`, + }, "") + return s +} +func (this *GetRoleResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRoleResponse{`, + `Role:` + strings.Replace(fmt.Sprintf("%v", this.Role), "Role", "v1.Role", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetRolesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRolesRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `}`, + }, "") + return s +} +func (this *GetRolesResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRoles := "[]*Role{" + for _, f := range this.Roles { + repeatedStringForRoles += strings.Replace(fmt.Sprintf("%v", f), "Role", "v1.Role", 1) + "," + } + repeatedStringForRoles += "}" + s := strings.Join([]string{`&GetRolesResponse{`, + `Roles:` + repeatedStringForRoles + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetRolesByPermissionsRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForSpecs := "[]*RoleSpec{" + for _, f := range this.Specs { + repeatedStringForSpecs += strings.Replace(fmt.Sprintf("%v", f), "RoleSpec", "v1.RoleSpec", 1) + "," + } + repeatedStringForSpecs += "}" + s := strings.Join([]string{`&GetRolesByPermissionsRequest{`, + `Specs:` + repeatedStringForSpecs + `,`, + `}`, + }, "") + return s +} +func (this *GetRolesByPermissionsResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRoles := "[]*Role{" + for _, f := range this.Roles { + repeatedStringForRoles += strings.Replace(fmt.Sprintf("%v", f), "Role", "v1.Role", 1) + "," + } + repeatedStringForRoles += "}" + s := strings.Join([]string{`&GetRolesByPermissionsResponse{`, + `Roles:` + repeatedStringForRoles + `,`, + `}`, + }, "") + return s +} +func (this *GetUsersRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetUsersRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `}`, + }, "") + return s +} +func (this *GetUsersResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForUsers := "[]*User{" + for _, f := range this.Users { + repeatedStringForUsers += strings.Replace(fmt.Sprintf("%v", f), "User", "v1.User", 1) + "," + } + repeatedStringForUsers += "}" + s := strings.Join([]string{`&GetUsersResponse{`, + `Users:` + repeatedStringForUsers + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetUserRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetUserRequest{`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, + `}`, + }, "") + return s +} +func (this *GetUserResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetUserResponse{`, + `User:` + strings.Replace(fmt.Sprintf("%v", this.User), "User", "v1.User", 1) + `,`, + `}`, + }, "") + return s +} +func (this *InviteUsersRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForSpecs := "[]*UserSpec{" + for _, f := range this.Specs { + repeatedStringForSpecs += strings.Replace(fmt.Sprintf("%v", f), "UserSpec", "v1.UserSpec", 1) + "," + } + repeatedStringForSpecs += "}" + s := strings.Join([]string{`&InviteUsersRequest{`, + `Specs:` + repeatedStringForSpecs + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *InviteUsersResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InviteUsersResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResendUserInviteRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResendUserInviteRequest{`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *ResendUserInviteResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResendUserInviteResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateUserRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateUserRequest{`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "UserSpec", "v1.UserSpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateUserResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateUserResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteUserRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteUserRequest{`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteUserResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteUserResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateUserNamespacePermissionsRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForUserNamespacePermissions := "[]*UserNamespacePermissions{" + for _, f := range this.UserNamespacePermissions { + repeatedStringForUserNamespacePermissions += strings.Replace(fmt.Sprintf("%v", f), "UserNamespacePermissions", "v1.UserNamespacePermissions", 1) + "," + } + repeatedStringForUserNamespacePermissions += "}" + s := strings.Join([]string{`&UpdateUserNamespacePermissionsRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `UserNamespacePermissions:` + repeatedStringForUserNamespacePermissions + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateUserNamespacePermissionsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateUserNamespacePermissionsResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateAPIKeyRequest{`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "APIKeySpec", "v1.APIKeySpec", 1) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *CreateAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateAPIKeyResponse{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `SecretKey:` + fmt.Sprintf("%v", this.SecretKey) + `,`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetAPIKeysRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAPIKeysRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetAPIKeysResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForApiKeys := "[]*APIKey{" + for _, f := range this.ApiKeys { + repeatedStringForApiKeys += strings.Replace(fmt.Sprintf("%v", f), "APIKey", "v1.APIKey", 1) + "," + } + repeatedStringForApiKeys += "}" + s := strings.Join([]string{`&GetAPIKeysResponse{`, + `ApiKeys:` + repeatedStringForApiKeys + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *GetAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAPIKeyResponse{`, + `ApiKey:` + strings.Replace(fmt.Sprintf("%v", this.ApiKey), "APIKey", "v1.APIKey", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteAPIKeyResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "APIKeySpec", "v1.APIKeySpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAPIKeyResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetAllAPIKeysRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAllAPIKeysRequest{`, + `OwnerId:` + fmt.Sprintf("%v", this.OwnerId) + `,`, + `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetAllAPIKeysResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForApiKeys := "[]*APIKey{" + for _, f := range this.ApiKeys { + repeatedStringForApiKeys += strings.Replace(fmt.Sprintf("%v", f), "APIKey", "v1.APIKey", 1) + "," + } + repeatedStringForApiKeys += "}" + s := strings.Join([]string{`&GetAllAPIKeysResponse{`, + `ApiKeys:` + repeatedStringForApiKeys + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetAnyAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAnyAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `}`, + }, "") + return s +} +func (this *GetAnyAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetAnyAPIKeyResponse{`, + `ApiKey:` + strings.Replace(fmt.Sprintf("%v", this.ApiKey), "APIKey", "v1.APIKey", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteAnyAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteAnyAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteAnyAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteAnyAPIKeyResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAnyAPIKeyRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAnyAPIKeyRequest{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "APIKeySpec", "v1.APIKeySpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAnyAPIKeyResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAnyAPIKeyResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v11.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringRequestResponse(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetRoleRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRoleRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRoleRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RoleId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRoleResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRoleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Role == nil { + m.Role = &v1.Role{} + } + if err := m.Role.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRolesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRolesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRolesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRolesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Roles = append(m.Roles, &v1.Role{}) + if err := m.Roles[len(m.Roles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRolesByPermissionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRolesByPermissionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRolesByPermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Specs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Specs = append(m.Specs, &v1.RoleSpec{}) + if err := m.Specs[len(m.Specs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRolesByPermissionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRolesByPermissionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRolesByPermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Roles = append(m.Roles, &v1.Role{}) + if err := m.Roles[len(m.Roles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUsersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUsersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= v1.UserState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUsersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUsersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUsersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Users = append(m.Users, &v1.User{}) + if err := m.Users[len(m.Users)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &v1.User{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InviteUsersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InviteUsersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InviteUsersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Specs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Specs = append(m.Specs, &v1.UserSpec{}) + if err := m.Specs[len(m.Specs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InviteUsersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InviteUsersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InviteUsersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResendUserInviteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResendUserInviteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResendUserInviteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResendUserInviteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResendUserInviteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateUserRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &v1.UserSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateUserResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateUserResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteUserRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteUserResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3130,17 +8333,17 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRolesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteUserResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRolesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } - m.PageSize = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3150,14 +8353,84 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PageSize |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateUserNamespacePermissionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateUserNamespacePermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3185,11 +8458,45 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PageToken = string(dAtA[iNdEx:postIndex]) + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserNamespacePermissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserNamespacePermissions = append(m.UserNamespacePermissions, &v1.UserNamespacePermissions{}) + if err := m.UserNamespacePermissions[len(m.UserNamespacePermissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3217,13 +8524,66 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateUserNamespacePermissionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateUserNamespacePermissionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateUserNamespacePermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3233,23 +8593,27 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.UserId = string(dAtA[iNdEx:postIndex]) + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3275,7 +8639,7 @@ func (m *GetRolesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { +func (m *CreateAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3298,15 +8662,15 @@ func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRolesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CreateAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRolesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3333,14 +8697,16 @@ func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Roles = append(m.Roles, &v1.Role{}) - if err := m.Roles[len(m.Roles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Spec == nil { + m.Spec = &v1.APIKeySpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3368,7 +8734,7 @@ func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) + m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3394,7 +8760,7 @@ func (m *GetRolesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetRolesByPermissionsRequest) Unmarshal(dAtA []byte) error { +func (m *CreateAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3417,15 +8783,79 @@ func (m *GetRolesByPermissionsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRolesByPermissionsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CreateAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRolesByPermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Specs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecretKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3452,8 +8882,10 @@ func (m *GetRolesByPermissionsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Specs = append(m.Specs, &v1.RoleSpec{}) - if err := m.Specs[len(m.Specs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3481,7 +8913,7 @@ func (m *GetRolesByPermissionsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetRolesByPermissionsResponse) Unmarshal(dAtA []byte) error { +func (m *GetAPIKeysRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3504,17 +8936,36 @@ func (m *GetRolesByPermissionsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRolesByPermissionsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAPIKeysRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRolesByPermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAPIKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3524,25 +8975,23 @@ func (m *GetRolesByPermissionsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.Roles = append(m.Roles, &v1.Role{}) - if err := m.Roles[len(m.Roles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.PageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3568,7 +9017,7 @@ func (m *GetRolesByPermissionsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { +func (m *GetAPIKeysResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3591,17 +9040,17 @@ func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetUsersRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAPIKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetUsersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAPIKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApiKeys", wireType) } - m.PageSize = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3611,14 +9060,29 @@ func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PageSize |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ApiKeys = append(m.ApiKeys, &v1.APIKey{}) + if err := m.ApiKeys[len(m.ApiKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3643,14 +9107,67 @@ func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLengthRequestResponse } - if postIndex > l { + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAPIKeyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.PageToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAPIKeyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3678,27 +9195,8 @@ func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= v1.UserState(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -3723,7 +9221,7 @@ func (m *GetUsersRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetUsersResponse) Unmarshal(dAtA []byte) error { +func (m *GetAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3746,15 +9244,15 @@ func (m *GetUsersResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetUsersResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetUsersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApiKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3781,42 +9279,12 @@ func (m *GetUsersResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Users = append(m.Users, &v1.User{}) - if err := m.Users[len(m.Users)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse + if m.ApiKey == nil { + m.ApiKey = &v1.APIKey{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.ApiKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3842,7 +9310,7 @@ func (m *GetUsersResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetUserRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3865,15 +9333,15 @@ func (m *GetUserRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetUserRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3901,11 +9369,11 @@ func (m *GetUserRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserId = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3933,7 +9401,39 @@ func (m *GetUserRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserEmail = string(dAtA[iNdEx:postIndex]) + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3959,7 +9459,7 @@ func (m *GetUserRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetUserResponse) Unmarshal(dAtA []byte) error { +func (m *DeleteAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3982,15 +9482,15 @@ func (m *GetUserResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetUserResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4017,10 +9517,10 @@ func (m *GetUserResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.User == nil { - m.User = &v1.User{} + if m.RequestStatus == nil { + m.RequestStatus = &v11.RequestStatus{} } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4048,7 +9548,7 @@ func (m *GetUserResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *InviteUsersRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4071,15 +9571,47 @@ func (m *InviteUsersRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InviteUsersRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InviteUsersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Specs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4106,12 +9638,46 @@ func (m *InviteUsersRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Specs = append(m.Specs, &v1.UserSpec{}) - if err := m.Specs[len(m.Specs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Spec == nil { + m.Spec = &v1.APIKeySpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } @@ -4167,7 +9733,7 @@ func (m *InviteUsersRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *InviteUsersResponse) Unmarshal(dAtA []byte) error { +func (m *UpdateAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4190,10 +9756,10 @@ func (m *InviteUsersResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InviteUsersResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InviteUsersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4256,7 +9822,7 @@ func (m *InviteUsersResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { +func (m *GetAllAPIKeysRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4275,19 +9841,51 @@ func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResendUserInviteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResendUserInviteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAllAPIKeysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAllAPIKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4315,11 +9913,30 @@ func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserId = string(dAtA[iNdEx:postIndex]) + m.UserEmail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4347,7 +9964,7 @@ func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RequestId = string(dAtA[iNdEx:postIndex]) + m.PageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4373,7 +9990,7 @@ func (m *ResendUserInviteRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResendUserInviteResponse) Unmarshal(dAtA []byte) error { +func (m *GetAllAPIKeysResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4396,15 +10013,15 @@ func (m *ResendUserInviteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResendUserInviteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAllAPIKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResendUserInviteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAllAPIKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApiKeys", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4431,13 +10048,43 @@ func (m *ResendUserInviteResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v11.RequestStatus{} - } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ApiKeys = append(m.ApiKeys, &v1.APIKey{}) + if err := m.ApiKeys[len(m.ApiKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -4462,7 +10109,7 @@ func (m *ResendUserInviteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateUserRequest) Unmarshal(dAtA []byte) error { +func (m *GetAnyAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4485,115 +10132,15 @@ func (m *UpdateUserRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateUserRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAnyAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAnyAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Spec == nil { - m.Spec = &v1.UserSpec{} - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4621,7 +10168,7 @@ func (m *UpdateUserRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RequestId = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4647,7 +10194,7 @@ func (m *UpdateUserRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateUserResponse) Unmarshal(dAtA []byte) error { +func (m *GetAnyAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4670,15 +10217,15 @@ func (m *UpdateUserResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateUserResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAnyAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAnyAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApiKey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4705,10 +10252,10 @@ func (m *UpdateUserResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v11.RequestStatus{} + if m.ApiKey == nil { + m.ApiKey = &v1.APIKey{} } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ApiKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4736,7 +10283,7 @@ func (m *UpdateUserResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteUserRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteAnyAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4759,15 +10306,15 @@ func (m *DeleteUserRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteUserRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAnyAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAnyAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4795,7 +10342,7 @@ func (m *DeleteUserRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserId = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -4885,7 +10432,7 @@ func (m *DeleteUserRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteUserResponse) Unmarshal(dAtA []byte) error { +func (m *DeleteAnyAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4908,13 +10455,13 @@ func (m *DeleteUserResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteUserResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAnyAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAnyAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } @@ -4974,7 +10521,7 @@ func (m *DeleteUserResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateAnyAPIKeyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4997,15 +10544,15 @@ func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateUserNamespacePermissionsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateAnyAPIKeyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateUserNamespacePermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateAnyAPIKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5033,11 +10580,11 @@ func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserNamespacePermissions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5064,12 +10611,46 @@ func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserNamespacePermissions = append(m.UserNamespacePermissions, &v1.UserNamespacePermissions{}) - if err := m.UserNamespacePermissions[len(m.UserNamespacePermissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Spec == nil { + m.Spec = &v1.APIKeySpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } @@ -5125,7 +10706,7 @@ func (m *UpdateUserNamespacePermissionsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateUserNamespacePermissionsResponse) Unmarshal(dAtA []byte) error { +func (m *UpdateAnyAPIKeyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5148,10 +10729,10 @@ func (m *UpdateUserNamespacePermissionsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateUserNamespacePermissionsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateAnyAPIKeyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateUserNamespacePermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateAnyAPIKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/protogen/api/authservice/v1/service.pb.go b/protogen/api/authservice/v1/service.pb.go index 38fd3887..50c1ec17 100644 --- a/protogen/api/authservice/v1/service.pb.go +++ b/protogen/api/authservice/v1/service.pb.go @@ -6,12 +6,11 @@ package authservice import ( context "context" fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -28,37 +27,47 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("api/authservice/v1/service.proto", fileDescriptor_80c42cd25eb3e22a) } var fileDescriptor_80c42cd25eb3e22a = []byte{ - // 397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x4a, 0xeb, 0x40, - 0x14, 0xc6, 0x33, 0x9b, 0xdb, 0xcb, 0x74, 0x73, 0x19, 0xb8, 0x9b, 0x2e, 0x0e, 0xd2, 0x6a, 0xc5, - 0x3f, 0x24, 0x56, 0x57, 0xea, 0xca, 0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 0x4c, 0x6a, 0x6d, - 0xd1, 0xe2, 0xa1, 0x13, 0x59, 0x01, 0x8a, 0x8d, 0xab, 0x79, 0xa9, 0x0c, 0x20, 0xed, 0xcb, 0x73, - 0xb9, 0xb4, 0xc1, 0xa5, 0xff, 0x1a, 0xc8, 0xd1, 0xe9, 0xbc, 0x0f, 0x04, 0xc2, 0xd6, 0xf2, 0xe2, - 0x9f, 0x29, 0xd9, 0xb5, 0xfe, 0x3d, 0x38, 0x2d, 0xbc, 0xa0, 0xb4, 0xe9, 0x75, 0x4c, 0xb1, 0x09, - 0x5b, 0xca, 0x4b, 0x4f, 0xe7, 0xb2, 0xa4, 0x3a, 0x0f, 0xcb, 0xea, 0xf7, 0xd1, 0x46, 0x95, 0x7e, - 0x3a, 0x57, 0xea, 0xb3, 0x58, 0xaa, 0x7f, 0x20, 0x14, 0xa6, 0xbd, 0x47, 0x66, 0x0f, 0xb9, 0x67, - 0xb6, 0x31, 0xfb, 0x25, 0x6f, 0xab, 0x77, 0xcd, 0xcb, 0xc8, 0x3d, 0x76, 0x7e, 0x13, 0x95, 0xbb, - 0xd5, 0x5b, 0xfd, 0x21, 0x68, 0x83, 0x21, 0x68, 0xe3, 0x21, 0x90, 0xbb, 0x18, 0xc8, 0x63, 0x0c, - 0xe4, 0x39, 0x06, 0xd2, 0x8f, 0x81, 0xbc, 0xc4, 0x40, 0x5e, 0x63, 0xd0, 0xc6, 0x31, 0x90, 0xfb, - 0x11, 0x68, 0xfd, 0x11, 0x68, 0x83, 0x11, 0x68, 0xe7, 0xab, 0x41, 0xcf, 0xf3, 0x6d, 0xbd, 0x6d, - 0xbb, 0x61, 0xc7, 0x98, 0x7d, 0x31, 0x76, 0x33, 0x7f, 0xaf, 0xfe, 0x4c, 0x5e, 0x8b, 0xad, 0xb7, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x10, 0xfd, 0xb7, 0x90, 0x04, 0x00, 0x00, + // 551 bytes of a gzipped FileDescriptorProto + 0x1f, 0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, 0x21, 0x25, 0x79, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -68,6 +77,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AuthServiceClient interface { + GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) GetRolesByPermissions(ctx context.Context, in *GetRolesByPermissionsRequest, opts ...grpc.CallOption) (*GetRolesByPermissionsResponse, error) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) @@ -77,16 +87,34 @@ type AuthServiceClient interface { UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) UpdateUserNamespacePermissions(ctx context.Context, in *UpdateUserNamespacePermissionsRequest, opts ...grpc.CallOption) (*UpdateUserNamespacePermissionsResponse, error) + CreateAPIKey(ctx context.Context, in *CreateAPIKeyRequest, opts ...grpc.CallOption) (*CreateAPIKeyResponse, error) + GetAPIKeys(ctx context.Context, in *GetAPIKeysRequest, opts ...grpc.CallOption) (*GetAPIKeysResponse, error) + GetAPIKey(ctx context.Context, in *GetAPIKeyRequest, opts ...grpc.CallOption) (*GetAPIKeyResponse, error) + DeleteAPIKey(ctx context.Context, in *DeleteAPIKeyRequest, opts ...grpc.CallOption) (*DeleteAPIKeyResponse, error) + UpdateAPIKey(ctx context.Context, in *UpdateAPIKeyRequest, opts ...grpc.CallOption) (*UpdateAPIKeyResponse, error) + GetAllAPIKeys(ctx context.Context, in *GetAllAPIKeysRequest, opts ...grpc.CallOption) (*GetAllAPIKeysResponse, error) + GetAnyAPIKey(ctx context.Context, in *GetAnyAPIKeyRequest, opts ...grpc.CallOption) (*GetAnyAPIKeyResponse, error) + DeleteAnyAPIKey(ctx context.Context, in *DeleteAnyAPIKeyRequest, opts ...grpc.CallOption) (*DeleteAnyAPIKeyResponse, error) + UpdateAnyAPIKey(ctx context.Context, in *UpdateAnyAPIKeyRequest, opts ...grpc.CallOption) (*UpdateAnyAPIKeyResponse, error) } type authServiceClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient { +func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { return &authServiceClient{cc} } +func (c *authServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) { + out := new(GetRoleResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *authServiceClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) { out := new(GetRolesResponse) err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetRoles", in, out, opts...) @@ -168,8 +196,90 @@ func (c *authServiceClient) UpdateUserNamespacePermissions(ctx context.Context, return out, nil } +func (c *authServiceClient) CreateAPIKey(ctx context.Context, in *CreateAPIKeyRequest, opts ...grpc.CallOption) (*CreateAPIKeyResponse, error) { + out := new(CreateAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/CreateAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetAPIKeys(ctx context.Context, in *GetAPIKeysRequest, opts ...grpc.CallOption) (*GetAPIKeysResponse, error) { + out := new(GetAPIKeysResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetAPIKeys", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetAPIKey(ctx context.Context, in *GetAPIKeyRequest, opts ...grpc.CallOption) (*GetAPIKeyResponse, error) { + out := new(GetAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) DeleteAPIKey(ctx context.Context, in *DeleteAPIKeyRequest, opts ...grpc.CallOption) (*DeleteAPIKeyResponse, error) { + out := new(DeleteAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/DeleteAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) UpdateAPIKey(ctx context.Context, in *UpdateAPIKeyRequest, opts ...grpc.CallOption) (*UpdateAPIKeyResponse, error) { + out := new(UpdateAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/UpdateAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetAllAPIKeys(ctx context.Context, in *GetAllAPIKeysRequest, opts ...grpc.CallOption) (*GetAllAPIKeysResponse, error) { + out := new(GetAllAPIKeysResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetAllAPIKeys", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetAnyAPIKey(ctx context.Context, in *GetAnyAPIKeyRequest, opts ...grpc.CallOption) (*GetAnyAPIKeyResponse, error) { + out := new(GetAnyAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/GetAnyAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) DeleteAnyAPIKey(ctx context.Context, in *DeleteAnyAPIKeyRequest, opts ...grpc.CallOption) (*DeleteAnyAPIKeyResponse, error) { + out := new(DeleteAnyAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/DeleteAnyAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) UpdateAnyAPIKey(ctx context.Context, in *UpdateAnyAPIKeyRequest, opts ...grpc.CallOption) (*UpdateAnyAPIKeyResponse, error) { + out := new(UpdateAnyAPIKeyResponse) + err := c.cc.Invoke(ctx, "/api.authservice.v1.AuthService/UpdateAnyAPIKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AuthServiceServer is the server API for AuthService service. type AuthServiceServer interface { + GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) GetRolesByPermissions(context.Context, *GetRolesByPermissionsRequest) (*GetRolesByPermissionsResponse, error) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) @@ -179,12 +289,24 @@ type AuthServiceServer interface { UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) UpdateUserNamespacePermissions(context.Context, *UpdateUserNamespacePermissionsRequest) (*UpdateUserNamespacePermissionsResponse, error) + CreateAPIKey(context.Context, *CreateAPIKeyRequest) (*CreateAPIKeyResponse, error) + GetAPIKeys(context.Context, *GetAPIKeysRequest) (*GetAPIKeysResponse, error) + GetAPIKey(context.Context, *GetAPIKeyRequest) (*GetAPIKeyResponse, error) + DeleteAPIKey(context.Context, *DeleteAPIKeyRequest) (*DeleteAPIKeyResponse, error) + UpdateAPIKey(context.Context, *UpdateAPIKeyRequest) (*UpdateAPIKeyResponse, error) + GetAllAPIKeys(context.Context, *GetAllAPIKeysRequest) (*GetAllAPIKeysResponse, error) + GetAnyAPIKey(context.Context, *GetAnyAPIKeyRequest) (*GetAnyAPIKeyResponse, error) + DeleteAnyAPIKey(context.Context, *DeleteAnyAPIKeyRequest) (*DeleteAnyAPIKeyResponse, error) + UpdateAnyAPIKey(context.Context, *UpdateAnyAPIKeyRequest) (*UpdateAnyAPIKeyResponse, error) } // UnimplementedAuthServiceServer can be embedded to have forward compatible implementations. type UnimplementedAuthServiceServer struct { } +func (*UnimplementedAuthServiceServer) GetRole(ctx context.Context, req *GetRoleRequest) (*GetRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") +} func (*UnimplementedAuthServiceServer) GetRoles(ctx context.Context, req *GetRolesRequest) (*GetRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRoles not implemented") } @@ -212,11 +334,56 @@ func (*UnimplementedAuthServiceServer) DeleteUser(ctx context.Context, req *Dele func (*UnimplementedAuthServiceServer) UpdateUserNamespacePermissions(ctx context.Context, req *UpdateUserNamespacePermissionsRequest) (*UpdateUserNamespacePermissionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserNamespacePermissions not implemented") } +func (*UnimplementedAuthServiceServer) CreateAPIKey(ctx context.Context, req *CreateAPIKeyRequest) (*CreateAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) GetAPIKeys(ctx context.Context, req *GetAPIKeysRequest) (*GetAPIKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAPIKeys not implemented") +} +func (*UnimplementedAuthServiceServer) GetAPIKey(ctx context.Context, req *GetAPIKeyRequest) (*GetAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) DeleteAPIKey(ctx context.Context, req *DeleteAPIKeyRequest) (*DeleteAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) UpdateAPIKey(ctx context.Context, req *UpdateAPIKeyRequest) (*UpdateAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) GetAllAPIKeys(ctx context.Context, req *GetAllAPIKeysRequest) (*GetAllAPIKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllAPIKeys not implemented") +} +func (*UnimplementedAuthServiceServer) GetAnyAPIKey(ctx context.Context, req *GetAnyAPIKeyRequest) (*GetAnyAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAnyAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) DeleteAnyAPIKey(ctx context.Context, req *DeleteAnyAPIKeyRequest) (*DeleteAnyAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAnyAPIKey not implemented") +} +func (*UnimplementedAuthServiceServer) UpdateAnyAPIKey(ctx context.Context, req *UpdateAnyAPIKeyRequest) (*UpdateAnyAPIKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAnyAPIKey not implemented") +} func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) { s.RegisterService(&_AuthService_serviceDesc, srv) } +func _AuthService_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/GetRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetRole(ctx, req.(*GetRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AuthService_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRolesRequest) if err := dec(in); err != nil { @@ -379,10 +546,176 @@ func _AuthService_UpdateUserNamespacePermissions_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _AuthService_CreateAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).CreateAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/CreateAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).CreateAPIKey(ctx, req.(*CreateAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetAPIKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAPIKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAPIKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/GetAPIKeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAPIKeys(ctx, req.(*GetAPIKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/GetAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAPIKey(ctx, req.(*GetAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_DeleteAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).DeleteAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/DeleteAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).DeleteAPIKey(ctx, req.(*DeleteAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_UpdateAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).UpdateAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/UpdateAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).UpdateAPIKey(ctx, req.(*UpdateAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetAllAPIKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllAPIKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAllAPIKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/GetAllAPIKeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAllAPIKeys(ctx, req.(*GetAllAPIKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetAnyAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAnyAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAnyAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/GetAnyAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAnyAPIKey(ctx, req.(*GetAnyAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_DeleteAnyAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAnyAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).DeleteAnyAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/DeleteAnyAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).DeleteAnyAPIKey(ctx, req.(*DeleteAnyAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_UpdateAnyAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAnyAPIKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).UpdateAnyAPIKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.authservice.v1.AuthService/UpdateAnyAPIKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).UpdateAnyAPIKey(ctx, req.(*UpdateAnyAPIKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AuthService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.authservice.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetRole", + Handler: _AuthService_GetRole_Handler, + }, { MethodName: "GetRoles", Handler: _AuthService_GetRoles_Handler, @@ -419,6 +752,42 @@ var _AuthService_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateUserNamespacePermissions", Handler: _AuthService_UpdateUserNamespacePermissions_Handler, }, + { + MethodName: "CreateAPIKey", + Handler: _AuthService_CreateAPIKey_Handler, + }, + { + MethodName: "GetAPIKeys", + Handler: _AuthService_GetAPIKeys_Handler, + }, + { + MethodName: "GetAPIKey", + Handler: _AuthService_GetAPIKey_Handler, + }, + { + MethodName: "DeleteAPIKey", + Handler: _AuthService_DeleteAPIKey_Handler, + }, + { + MethodName: "UpdateAPIKey", + Handler: _AuthService_UpdateAPIKey_Handler, + }, + { + MethodName: "GetAllAPIKeys", + Handler: _AuthService_GetAllAPIKeys_Handler, + }, + { + MethodName: "GetAnyAPIKey", + Handler: _AuthService_GetAnyAPIKey_Handler, + }, + { + MethodName: "DeleteAnyAPIKey", + Handler: _AuthService_DeleteAnyAPIKey_Handler, + }, + { + MethodName: "UpdateAnyAPIKey", + Handler: _AuthService_UpdateAnyAPIKey_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/authservice/v1/service.proto", diff --git a/protogen/api/common/v1/message.pb.go b/protogen/api/common/v1/message.pb.go new file mode 100644 index 00000000..29e71f17 --- /dev/null +++ b/protogen/api/common/v1/message.pb.go @@ -0,0 +1,848 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: api/common/v1/message.proto + +package common + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// (-- api-linter: core::0123::resource-annotation=disabled --) +type Region struct { + // E.g., aws, gcp, azure. + CloudProvider string `protobuf:"bytes,1,opt,name=cloud_provider,json=cloudProvider,proto3" json:"cloud_provider,omitempty"` + // Cloud-specific region name. E.g., us-west-2 for AWS and europe-west1 for GCP. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The flag indicates if the region supports global namespace. + SupportGlobalNamespace bool `protobuf:"varint,3,opt,name=support_global_namespace,json=supportGlobalNamespace,proto3" json:"support_global_namespace,omitempty"` // Deprecated: Do not use. + // The allow list of connection between the current region with a target region. + ConnectableRegions []*RegionID `protobuf:"bytes,4,rep,name=connectable_regions,json=connectableRegions,proto3" json:"connectable_regions,omitempty"` +} + +func (m *Region) Reset() { *m = Region{} } +func (*Region) ProtoMessage() {} +func (*Region) Descriptor() ([]byte, []int) { + return fileDescriptor_df4c2c740e1454e5, []int{0} +} +func (m *Region) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Region.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Region) XXX_Merge(src proto.Message) { + xxx_messageInfo_Region.Merge(m, src) +} +func (m *Region) XXX_Size() int { + return m.Size() +} +func (m *Region) XXX_DiscardUnknown() { + xxx_messageInfo_Region.DiscardUnknown(m) +} + +var xxx_messageInfo_Region proto.InternalMessageInfo + +func (m *Region) GetCloudProvider() string { + if m != nil { + return m.CloudProvider + } + return "" +} + +func (m *Region) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Deprecated: Do not use. +func (m *Region) GetSupportGlobalNamespace() bool { + if m != nil { + return m.SupportGlobalNamespace + } + return false +} + +func (m *Region) GetConnectableRegions() []*RegionID { + if m != nil { + return m.ConnectableRegions + } + return nil +} + +type RegionID struct { + // E.g., aws, gcp, azure. + CloudProvider string `protobuf:"bytes,1,opt,name=cloud_provider,json=cloudProvider,proto3" json:"cloud_provider,omitempty"` + // Cloud-specific region name. E.g., us-west-2 for AWS and europe-west1 for GCP. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *RegionID) Reset() { *m = RegionID{} } +func (*RegionID) ProtoMessage() {} +func (*RegionID) Descriptor() ([]byte, []int) { + return fileDescriptor_df4c2c740e1454e5, []int{1} +} +func (m *RegionID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegionID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegionID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RegionID) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegionID.Merge(m, src) +} +func (m *RegionID) XXX_Size() int { + return m.Size() +} +func (m *RegionID) XXX_DiscardUnknown() { + xxx_messageInfo_RegionID.DiscardUnknown(m) +} + +var xxx_messageInfo_RegionID proto.InternalMessageInfo + +func (m *RegionID) GetCloudProvider() string { + if m != nil { + return m.CloudProvider + } + return "" +} + +func (m *RegionID) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func init() { + proto.RegisterType((*Region)(nil), "api.common.v1.Region") + proto.RegisterType((*RegionID)(nil), "api.common.v1.RegionID") +} + +func init() { proto.RegisterFile("api/common/v1/message.proto", fileDescriptor_df4c2c740e1454e5) } + +var fileDescriptor_df4c2c740e1454e5 = []byte{ + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x31, 0x4b, 0x03, 0x31, + 0x1c, 0xc5, 0xef, 0xdf, 0x96, 0x52, 0x23, 0x75, 0x88, 0xa0, 0x01, 0xe1, 0xcf, 0x51, 0x10, 0x3a, + 0xe5, 0xa8, 0x8e, 0x3a, 0x15, 0x45, 0x5d, 0x44, 0x6e, 0x70, 0x70, 0x39, 0xd2, 0x6b, 0x28, 0x07, + 0x77, 0x97, 0x90, 0x5c, 0x3b, 0xfb, 0x11, 0xfc, 0x18, 0x7e, 0x14, 0xc1, 0xa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e, 0x1c, 0xc2, 0xd2, 0x21, 0x7c, 0x39, 0x84, 0x6f, 0x87, 0xc1, 0xc6, 0x21, 0xbc, + 0xd5, 0x18, 0x2c, 0x6b, 0x0c, 0x56, 0x35, 0x06, 0x2f, 0x61, 0x55, 0x68, 0x93, 0x73, 0xff, 0x7d, + 0xb4, 0x37, 0xc1, 0x55, 0xa3, 0x26, 0x5d, 0x3f, 0xc1, 0xe5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x53, 0x59, 0x1e, 0x0f, 0xa1, 0x01, 0x00, 0x00, +} + +func (this *Region) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Region) + if !ok { + that2, ok := that.(Region) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CloudProvider != that1.CloudProvider { + return false + } + if this.Name != that1.Name { + return false + } + if this.SupportGlobalNamespace != that1.SupportGlobalNamespace { + return false + } + if len(this.ConnectableRegions) != len(that1.ConnectableRegions) { + return false + } + for i := range this.ConnectableRegions { + if !this.ConnectableRegions[i].Equal(that1.ConnectableRegions[i]) { + return false + } + } + return true +} +func (this *RegionID) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RegionID) + if !ok { + that2, ok := that.(RegionID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CloudProvider != that1.CloudProvider { + return false + } + if this.Name != that1.Name { + return false + } + return true +} +func (this *Region) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&common.Region{") + s = append(s, "CloudProvider: "+fmt.Sprintf("%#v", this.CloudProvider)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "SupportGlobalNamespace: "+fmt.Sprintf("%#v", this.SupportGlobalNamespace)+",\n") + if this.ConnectableRegions != nil { + s = append(s, "ConnectableRegions: "+fmt.Sprintf("%#v", this.ConnectableRegions)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RegionID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&common.RegionID{") + s = append(s, "CloudProvider: "+fmt.Sprintf("%#v", this.CloudProvider)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMessage(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Region) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Region) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Region) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectableRegions) > 0 { + for iNdEx := len(m.ConnectableRegions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConnectableRegions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.SupportGlobalNamespace { + i-- + if m.SupportGlobalNamespace { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.CloudProvider) > 0 { + i -= len(m.CloudProvider) + copy(dAtA[i:], m.CloudProvider) + i = encodeVarintMessage(dAtA, i, uint64(len(m.CloudProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RegionID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RegionID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegionID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.CloudProvider) > 0 { + i -= len(m.CloudProvider) + copy(dAtA[i:], m.CloudProvider) + i = encodeVarintMessage(dAtA, i, uint64(len(m.CloudProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { + offset -= sovMessage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Region) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CloudProvider) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.SupportGlobalNamespace { + n += 2 + } + if len(m.ConnectableRegions) > 0 { + for _, e := range m.ConnectableRegions { + l = e.Size() + n += 1 + l + sovMessage(uint64(l)) + } + } + return n +} + +func (m *RegionID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CloudProvider) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func sovMessage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMessage(x uint64) (n int) { + return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Region) String() string { + if this == nil { + return "nil" + } + repeatedStringForConnectableRegions := "[]*RegionID{" + for _, f := range this.ConnectableRegions { + repeatedStringForConnectableRegions += strings.Replace(f.String(), "RegionID", "RegionID", 1) + "," + } + repeatedStringForConnectableRegions += "}" + s := strings.Join([]string{`&Region{`, + `CloudProvider:` + fmt.Sprintf("%v", this.CloudProvider) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `SupportGlobalNamespace:` + fmt.Sprintf("%v", this.SupportGlobalNamespace) + `,`, + `ConnectableRegions:` + repeatedStringForConnectableRegions + `,`, + `}`, + }, "") + return s +} +func (this *RegionID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RegionID{`, + `CloudProvider:` + fmt.Sprintf("%v", this.CloudProvider) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func valueToStringMessage(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Region) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Region: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Region: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CloudProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CloudProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupportGlobalNamespace", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupportGlobalNamespace = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectableRegions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConnectableRegions = append(m.ConnectableRegions, &RegionID{}) + if err := m.ConnectableRegions[len(m.ConnectableRegions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegionID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegionID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegionID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CloudProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CloudProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMessage(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMessage + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMessage + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protogen/api/namespace/v1/message.pb.go b/protogen/api/namespace/v1/message.pb.go index 19151bf0..dda77aab 100644 --- a/protogen/api/namespace/v1/message.pb.go +++ b/protogen/api/namespace/v1/message.pb.go @@ -5,16 +5,16 @@ package namespace import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + types "github.com/gogo/protobuf/types" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" io "io" math "math" math_bits "math/bits" reflect "reflect" strconv "strconv" strings "strings" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - types "github.com/gogo/protobuf/types" ) // Reference imports to suppress errors if they are not otherwise used. @@ -143,11 +143,11 @@ func (Environment) EnumDescriptor() ([]byte, []int) { } type NamespaceSpec struct { - // the region where the namespace is (or will be) located + // the region where the namespace is (or will be) active. Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` // the base64 encoded ca cert(s) that the clients can use for authentication and authorization AcceptedClientCa string `protobuf:"bytes,2,opt,name=accepted_client_ca,json=acceptedClientCa,proto3" json:"accepted_client_ca,omitempty"` - // the num of days the workflows's data will be retained for + // the num of days the workflows' data will be retained for RetentionDays int32 `protobuf:"varint,3,opt,name=retention_days,json=retentionDays,proto3" json:"retention_days,omitempty"` // the custom search attributes to use for the namespace SearchAttributes map[string]SearchAttributeType `protobuf:"bytes,4,rep,name=search_attributes,json=searchAttributes,proto3" json:"search_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=api.namespace.v1.SearchAttributeType"` @@ -157,6 +157,10 @@ type NamespaceSpec struct { // environment of the namespace. // NOTE: currently there is no additional SLA or functional guarantee implied by the value of this field. Environment Environment `protobuf:"varint,6,opt,name=environment,proto3,enum=api.namespace.v1.Environment" json:"environment,omitempty"` + // codec server property spec needed for user to set and retrieve + CodecSpec *CodecServerPropertySpec `protobuf:"bytes,8,opt,name=codec_spec,json=codecSpec,proto3" json:"codec_spec,omitempty"` + // the regions where the namespace is (or will be) located + PassiveRegions []string `protobuf:"bytes,9,rep,name=passive_regions,json=passiveRegions,proto3" json:"passive_regions,omitempty"` } func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } @@ -233,6 +237,82 @@ func (m *NamespaceSpec) GetEnvironment() Environment { return ENVIRONMENT_UNSPECIFIED } +func (m *NamespaceSpec) GetCodecSpec() *CodecServerPropertySpec { + if m != nil { + return m.CodecSpec + } + return nil +} + +func (m *NamespaceSpec) GetPassiveRegions() []string { + if m != nil { + return m.PassiveRegions + } + return nil +} + +type CodecServerPropertySpec struct { + // server endpoints + Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // whether to pass access token, i.e. jwt + PassAccessToken bool `protobuf:"varint,2,opt,name=pass_access_token,json=passAccessToken,proto3" json:"pass_access_token,omitempty"` + // whether to include credentials + IncludeCredentials bool `protobuf:"varint,3,opt,name=include_credentials,json=includeCredentials,proto3" json:"include_credentials,omitempty"` +} + +func (m *CodecServerPropertySpec) Reset() { *m = CodecServerPropertySpec{} } +func (*CodecServerPropertySpec) ProtoMessage() {} +func (*CodecServerPropertySpec) Descriptor() ([]byte, []int) { + return fileDescriptor_56458b48206aa18d, []int{1} +} +func (m *CodecServerPropertySpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CodecServerPropertySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CodecServerPropertySpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CodecServerPropertySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodecServerPropertySpec.Merge(m, src) +} +func (m *CodecServerPropertySpec) XXX_Size() int { + return m.Size() +} +func (m *CodecServerPropertySpec) XXX_DiscardUnknown() { + xxx_messageInfo_CodecServerPropertySpec.DiscardUnknown(m) +} + +var xxx_messageInfo_CodecServerPropertySpec proto.InternalMessageInfo + +func (m *CodecServerPropertySpec) GetEndpoint() string { + if m != nil { + return m.Endpoint + } + return "" +} + +func (m *CodecServerPropertySpec) GetPassAccessToken() bool { + if m != nil { + return m.PassAccessToken + } + return false +} + +func (m *CodecServerPropertySpec) GetIncludeCredentials() bool { + if m != nil { + return m.IncludeCredentials + } + return false +} + // a filter matches a certificate if the specified fields on the filter match the corresponding // fields on the certificate. A filter with zero specified fields is invalid and will be rejected // by the server. A field is either an exact string match, a prefix match (field starts with '*') or a @@ -249,7 +329,7 @@ type CertificateFilterSpec struct { func (m *CertificateFilterSpec) Reset() { *m = CertificateFilterSpec{} } func (*CertificateFilterSpec) ProtoMessage() {} func (*CertificateFilterSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_56458b48206aa18d, []int{1} + return fileDescriptor_56458b48206aa18d, []int{2} } func (m *CertificateFilterSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -311,12 +391,14 @@ type NamespaceURI struct { Web string `protobuf:"bytes,1,opt,name=web,proto3" json:"web,omitempty"` // the grpc address Grpc string `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"` + // the list of private links + VpcEndpointServiceNames []string `protobuf:"bytes,3,rep,name=vpc_endpoint_service_names,json=vpcEndpointServiceNames,proto3" json:"vpc_endpoint_service_names,omitempty"` } func (m *NamespaceURI) Reset() { *m = NamespaceURI{} } func (*NamespaceURI) ProtoMessage() {} func (*NamespaceURI) Descriptor() ([]byte, []int) { - return fileDescriptor_56458b48206aa18d, []int{2} + return fileDescriptor_56458b48206aa18d, []int{3} } func (m *NamespaceURI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,6 +441,57 @@ func (m *NamespaceURI) GetGrpc() string { return "" } +func (m *NamespaceURI) GetVpcEndpointServiceNames() []string { + if m != nil { + return m.VpcEndpointServiceNames + } + return nil +} + +type NamespaceEnvelope struct { + // the namespace may be throttled if its APS exceeds the limit + ActionsPerSecondLimit int32 `protobuf:"varint,1,opt,name=actions_per_second_limit,json=actionsPerSecondLimit,proto3" json:"actions_per_second_limit,omitempty"` +} + +func (m *NamespaceEnvelope) Reset() { *m = NamespaceEnvelope{} } +func (*NamespaceEnvelope) ProtoMessage() {} +func (*NamespaceEnvelope) Descriptor() ([]byte, []int) { + return fileDescriptor_56458b48206aa18d, []int{4} +} +func (m *NamespaceEnvelope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NamespaceEnvelope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NamespaceEnvelope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceEnvelope.Merge(m, src) +} +func (m *NamespaceEnvelope) XXX_Size() int { + return m.Size() +} +func (m *NamespaceEnvelope) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceEnvelope.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceEnvelope proto.InternalMessageInfo + +func (m *NamespaceEnvelope) GetActionsPerSecondLimit() int32 { + if m != nil { + return m.ActionsPerSecondLimit + } + return 0 +} + type Namespace struct { // the namespace Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` @@ -375,12 +508,18 @@ type Namespace struct { LastModifiedTime *types.Timestamp `protobuf:"bytes,6,opt,name=last_modified_time,json=lastModifiedTime,proto3" json:"last_modified_time,omitempty"` // the web uri for the namespace Uri *NamespaceURI `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"` + // namespace envelope is a list of service level agreements (SLAs) that can be provided around a given namespace + Envelope *NamespaceEnvelope `protobuf:"bytes,9,opt,name=envelope,proto3" json:"envelope,omitempty"` + // codec server information saved + CodecServerProperty *CodecServerPropertySpec `protobuf:"bytes,10,opt,name=codec_server_property,json=codecServerProperty,proto3" json:"codec_server_property,omitempty"` + // allowed principals is a list of principals that allowed to access the private links on the namespace + AllowedPrincipals []string `protobuf:"bytes,11,rep,name=allowed_principals,json=allowedPrincipals,proto3" json:"allowed_principals,omitempty"` } func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_56458b48206aa18d, []int{3} + return fileDescriptor_56458b48206aa18d, []int{5} } func (m *Namespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -458,82 +597,137 @@ func (m *Namespace) GetUri() *NamespaceURI { return nil } +func (m *Namespace) GetEnvelope() *NamespaceEnvelope { + if m != nil { + return m.Envelope + } + return nil +} + +func (m *Namespace) GetCodecServerProperty() *CodecServerPropertySpec { + if m != nil { + return m.CodecServerProperty + } + return nil +} + +func (m *Namespace) GetAllowedPrincipals() []string { + if m != nil { + return m.AllowedPrincipals + } + return nil +} + +var E_ApiVersion = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*string)(nil), + Field: 52000, + Name: "api.namespace.v1.api_version", + Tag: "bytes,52000,opt,name=api_version", + Filename: "api/namespace/v1/message.proto", +} + func init() { proto.RegisterEnum("api.namespace.v1.SearchAttributeType", SearchAttributeType_name, SearchAttributeType_value) proto.RegisterEnum("api.namespace.v1.State", State_name, State_value) proto.RegisterEnum("api.namespace.v1.Environment", Environment_name, Environment_value) proto.RegisterType((*NamespaceSpec)(nil), "api.namespace.v1.NamespaceSpec") proto.RegisterMapType((map[string]SearchAttributeType)(nil), "api.namespace.v1.NamespaceSpec.SearchAttributesEntry") + proto.RegisterType((*CodecServerPropertySpec)(nil), "api.namespace.v1.CodecServerPropertySpec") proto.RegisterType((*CertificateFilterSpec)(nil), "api.namespace.v1.CertificateFilterSpec") proto.RegisterType((*NamespaceURI)(nil), "api.namespace.v1.NamespaceURI") + proto.RegisterType((*NamespaceEnvelope)(nil), "api.namespace.v1.NamespaceEnvelope") proto.RegisterType((*Namespace)(nil), "api.namespace.v1.Namespace") + proto.RegisterExtension(E_ApiVersion) } func init() { proto.RegisterFile("api/namespace/v1/message.proto", fileDescriptor_56458b48206aa18d) } var fileDescriptor_56458b48206aa18d = []byte{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0x4b, 0x6f, 0x1b, 0x45, - 0x1c, 0xf7, 0xfa, 0x91, 0x92, 0xbf, 0xf3, 0x98, 0xfc, 0xdd, 0x34, 0x26, 0x34, 0x9b, 0xd4, 0x52, - 0x20, 0x44, 0x60, 0x53, 0x17, 0xa4, 0x8a, 0x1e, 0x90, 0xe3, 0x9d, 0xd0, 0x15, 0x89, 0x1d, 0xad, - 0xd7, 0xa1, 0x45, 0x48, 0xab, 0xf1, 0x7a, 0x62, 0xb6, 0xb5, 0x77, 0x97, 0xdd, 0xb1, 0xab, 0x70, - 0xe2, 0xc0, 0x07, 0xe0, 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0x4c, 0xc4, 0x0a, 0x3d, 0xa1, 0xa1, 0x78, 0x69, - 0x22, 0x0e, 0xb1, 0xb1, 0xf8, 0x0e, 0x6e, 0xc0, 0xea, 0x34, 0xa1, 0x90, 0xf7, 0x26, 0x15, 0x37, - 0x9a, 0x8d, 0x33, 0x5a, 0x53, 0x82, 0x08, 0xcb, 0x98, 0x87, 0xbb, 0x33, 0xe8, 0x28, 0x04, 0x60, - 0x0e, 0xd6, 0x67, 0x18, 0xaa, 0x90, 0xec, 0xe1, 0x4b, 0xc8, 0x4e, 0x3d, 0x7e, 0x41, 0xbf, 0xb4, - 0x76, 0xae, 0x6a, 0xf5, 0xda, 0x29, 0xad, 0xe9, 0x73, 0x23, 0xca, 0xc1, 0xfa, 0x34, 0xa9, 0xd0, - 0x73, 0x22, 0x05, 0x55, 0x4c, 0x83, 0x3a, 0x6d, 0x04, 0x3b, 0x9f, 0x43, 0xcf, 0xb4, 0xba, 0x42, - 0x52, 0x47, 0xdf, 0x5f, 0x5d, 0xcb, 0x89, 0xd7, 0xd7, 0x72, 0xe2, 0xcd, 0xb5, 0x2c, 0xfd, 0x3c, - 0x94, 0xa5, 0xdf, 0x87, 0xb2, 0xf4, 0xe7, 0x50, 0x96, 0xae, 0x86, 0xb2, 0xf4, 0xf7, 0x50, 0x96, - 0xfe, 0x1d, 0xca, 0x89, 0x37, 0x43, 0x59, 0xfa, 0xf5, 0x46, 0x4e, 0x5c, 0xdd, 0xc8, 0x89, 0xd7, - 0x37, 0x72, 0xe2, 0xbb, 0x0f, 0x45, 0xcf, 0xf5, 0xba, 0x45, 0xb3, 0xeb, 0xf4, 0xdb, 0xa5, 0xf9, - 0x3f, 0xd8, 0x27, 0xe3, 0x43, 0x6b, 0x29, 0xfc, 0x82, 0x1e, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, - 0xf8, 0x37, 0x72, 0x9a, 0x85, 0x07, 0x00, 0x00, + // 1314 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4d, 0x73, 0xd3, 0x46, + 0x18, 0x8e, 0x62, 0x3b, 0xd8, 0xaf, 0x49, 0xa2, 0x6c, 0x08, 0x11, 0x29, 0x11, 0xc6, 0x1d, 0x4a, + 0xc8, 0x34, 0x4e, 0x30, 0xd3, 0xc2, 0xc0, 0x81, 0x71, 0x62, 0xa5, 0x98, 0x06, 0xdb, 0x23, 0x2b, + 0x29, 0x74, 0xa6, 0xa3, 0x51, 0x56, 0x9b, 0x74, 0x41, 0x96, 0xc4, 0x6a, 0x6d, 0x26, 0x3d, 0x75, + 0x3a, 0xfd, 0x01, 0x9d, 0xce, 0xb4, 0xe7, 0x1e, 0x39, 0xf7, 0x4f, 0xb4, 0x47, 0x8e, 0x1c, 0xc1, + 0x5c, 0x7a, 0xe4, 0x27, 0x74, 0x76, 0x25, 0x7f, 0xc4, 0x31, 0x74, 0x7a, 0xb3, 0x9e, 0xe7, 0x79, + 0x77, 0x9f, 0x77, 0xdf, 0x8f, 0x04, 0x74, 0x27, 0xa4, 0x9b, 0xbe, 0xd3, 0x26, 0x51, 0xe8, 0x60, + 0xb2, 0xd9, 0xbd, 0xb9, 0xd9, 0x26, 0x51, 0xe4, 0x1c, 0x93, 0x52, 0xc8, 0x02, 0x1e, 0x20, 0xd5, + 0x09, 0x69, 0x69, 0xc0, 0x97, 0xba, 0x37, 0x57, 0xae, 0x1c, 0x07, 0xc1, 0xb1, 0x47, 0x36, 0x25, + 0x7f, 0xd8, 0x39, 0xda, 0xe4, 0xb4, 0x4d, 0x22, 0xee, 0xb4, 0xc3, 0x38, 0x64, 0xa5, 0x30, 0x2e, + 0x70, 0x49, 0x84, 0x19, 0x0d, 0x79, 0xc0, 0x62, 0x45, 0xf1, 0x4d, 0x1a, 0x66, 0xeb, 0xfd, 0x33, + 0x5b, 0x21, 0xc1, 0xe8, 0x22, 0xcc, 0x30, 0x72, 0x4c, 0x03, 0x5f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 0x9f, + 0xef, 0xe3, 0x07, 0x31, 0x8c, 0x6e, 0x41, 0x5a, 0x4e, 0x55, 0x4a, 0x4e, 0xd5, 0x95, 0xff, 0xd8, + 0x26, 0xa6, 0x14, 0xa3, 0x0d, 0xc8, 0x44, 0xdc, 0xe1, 0xf1, 0x9b, 0xcf, 0x95, 0x97, 0x27, 0xb4, + 0xbc, 0xa0, 0xcd, 0x58, 0x85, 0x56, 0x01, 0x18, 0x79, 0xde, 0x21, 0x11, 0xb7, 0xa9, 0xab, 0x65, + 0x62, 0xb7, 0x09, 0x52, 0x73, 0xd1, 0x03, 0x40, 0x9e, 0x13, 0x71, 0xbb, 0x1d, 0xb8, 0xf4, 0x88, + 0x12, 0xd7, 0x16, 0xfb, 0x59, 0xae, 0x89, 0x7c, 0x79, 0xa5, 0x14, 0xef, 0xe6, 0x52, 0x7f, 0x37, + 0x97, 0xac, 0xfe, 0xf2, 0x36, 0x55, 0x11, 0xf5, 0x28, 0x09, 0x12, 0x30, 0xda, 0x82, 0x54, 0x87, + 0x51, 0xed, 0x9c, 0x0c, 0xd5, 0x3f, 0x92, 0xcb, 0xbe, 0x59, 0x33, 0x85, 0x14, 0xdd, 0x17, 0x93, + 0x15, 0x97, 0x46, 0xcb, 0xc9, 0xb0, 0x4f, 0x3f, 0x12, 0xd6, 0xaf, 0xa2, 0x39, 0x08, 0x42, 0xdf, + 0xc1, 0x52, 0xb2, 0x9b, 0xe4, 0xd8, 0xda, 0x61, 0x32, 0xb7, 0x1a, 0xfc, 0xdf, 0x35, 0xb5, 0x88, + 0xcf, 0x12, 0x68, 0x03, 0x90, 0xe3, 0x79, 0xc1, 0x0b, 0xe2, 0xda, 0x21, 0xa3, 0x3e, 0xa6, 0xa1, + 0x18, 0xd8, 0xbc, 0x6c, 0xbc, 0x85, 0x84, 0x69, 0x0e, 0x88, 0x87, 0xe9, 0x6c, 0x56, 0xcd, 0xad, + 0xff, 0x3c, 0x0d, 0x8b, 0x13, 0x76, 0x0e, 0xba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 0x0e, 0x99, 0x57, 0xc2, 0x5e, 0xd0, 0x71, 0x37, 0xc7, 0xff, 0x85, 0xbc, 0x37, 0xf8, 0x38, + 0x9c, 0x91, 0xc6, 0x6e, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x29, 0x7e, 0x8b, 0x67, 0x0a, + 0x00, 0x00, } func (x SearchAttributeType) String() string { @@ -604,6 +798,47 @@ func (this *NamespaceSpec) Equal(that interface{}) bool { if this.Environment != that1.Environment { return false } + if !this.CodecSpec.Equal(that1.CodecSpec) { + return false + } + if len(this.PassiveRegions) != len(that1.PassiveRegions) { + return false + } + for i := range this.PassiveRegions { + if this.PassiveRegions[i] != that1.PassiveRegions[i] { + return false + } + } + return true +} +func (this *CodecServerPropertySpec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CodecServerPropertySpec) + if !ok { + that2, ok := that.(CodecServerPropertySpec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Endpoint != that1.Endpoint { + return false + } + if this.PassAccessToken != that1.PassAccessToken { + return false + } + if this.IncludeCredentials != that1.IncludeCredentials { + return false + } return true } func (this *CertificateFilterSpec) Equal(that interface{}) bool { @@ -664,6 +899,38 @@ func (this *NamespaceURI) Equal(that interface{}) bool { if this.Grpc != that1.Grpc { return false } + if len(this.VpcEndpointServiceNames) != len(that1.VpcEndpointServiceNames) { + return false + } + for i := range this.VpcEndpointServiceNames { + if this.VpcEndpointServiceNames[i] != that1.VpcEndpointServiceNames[i] { + return false + } + } + return true +} +func (this *NamespaceEnvelope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NamespaceEnvelope) + if !ok { + that2, ok := that.(NamespaceEnvelope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ActionsPerSecondLimit != that1.ActionsPerSecondLimit { + return false + } return true } func (this *Namespace) Equal(that interface{}) bool { @@ -706,13 +973,27 @@ func (this *Namespace) Equal(that interface{}) bool { if !this.Uri.Equal(that1.Uri) { return false } + if !this.Envelope.Equal(that1.Envelope) { + return false + } + if !this.CodecServerProperty.Equal(that1.CodecServerProperty) { + return false + } + if len(this.AllowedPrincipals) != len(that1.AllowedPrincipals) { + return false + } + for i := range this.AllowedPrincipals { + if this.AllowedPrincipals[i] != that1.AllowedPrincipals[i] { + return false + } + } return true } func (this *NamespaceSpec) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) + s := make([]string, 0, 12) s = append(s, "&namespace.NamespaceSpec{") s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") s = append(s, "AcceptedClientCa: "+fmt.Sprintf("%#v", this.AcceptedClientCa)+",\n") @@ -734,6 +1015,22 @@ func (this *NamespaceSpec) GoString() string { s = append(s, "CertificateFilters: "+fmt.Sprintf("%#v", this.CertificateFilters)+",\n") } s = append(s, "Environment: "+fmt.Sprintf("%#v", this.Environment)+",\n") + if this.CodecSpec != nil { + s = append(s, "CodecSpec: "+fmt.Sprintf("%#v", this.CodecSpec)+",\n") + } + s = append(s, "PassiveRegions: "+fmt.Sprintf("%#v", this.PassiveRegions)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CodecServerPropertySpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&namespace.CodecServerPropertySpec{") + s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n") + s = append(s, "PassAccessToken: "+fmt.Sprintf("%#v", this.PassAccessToken)+",\n") + s = append(s, "IncludeCredentials: "+fmt.Sprintf("%#v", this.IncludeCredentials)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -754,10 +1051,21 @@ func (this *NamespaceURI) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&namespace.NamespaceURI{") s = append(s, "Web: "+fmt.Sprintf("%#v", this.Web)+",\n") s = append(s, "Grpc: "+fmt.Sprintf("%#v", this.Grpc)+",\n") + s = append(s, "VpcEndpointServiceNames: "+fmt.Sprintf("%#v", this.VpcEndpointServiceNames)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NamespaceEnvelope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&namespace.NamespaceEnvelope{") + s = append(s, "ActionsPerSecondLimit: "+fmt.Sprintf("%#v", this.ActionsPerSecondLimit)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -765,7 +1073,7 @@ func (this *Namespace) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 11) + s := make([]string, 0, 14) s = append(s, "&namespace.Namespace{") s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") @@ -780,6 +1088,13 @@ func (this *Namespace) GoString() string { if this.Uri != nil { s = append(s, "Uri: "+fmt.Sprintf("%#v", this.Uri)+",\n") } + if this.Envelope != nil { + s = append(s, "Envelope: "+fmt.Sprintf("%#v", this.Envelope)+",\n") + } + if this.CodecServerProperty != nil { + s = append(s, "CodecServerProperty: "+fmt.Sprintf("%#v", this.CodecServerProperty)+",\n") + } + s = append(s, "AllowedPrincipals: "+fmt.Sprintf("%#v", this.AllowedPrincipals)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -811,6 +1126,27 @@ func (m *NamespaceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PassiveRegions) > 0 { + for iNdEx := len(m.PassiveRegions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PassiveRegions[iNdEx]) + copy(dAtA[i:], m.PassiveRegions[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.PassiveRegions[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if m.CodecSpec != nil { + { + size, err := m.CodecSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if m.Environment != 0 { i = encodeVarintMessage(dAtA, i, uint64(m.Environment)) i-- @@ -869,6 +1205,56 @@ func (m *NamespaceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *CodecServerPropertySpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CodecServerPropertySpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CodecServerPropertySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IncludeCredentials { + i-- + if m.IncludeCredentials { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.PassAccessToken { + i-- + if m.PassAccessToken { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Endpoint) > 0 { + i -= len(m.Endpoint) + copy(dAtA[i:], m.Endpoint) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Endpoint))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *CertificateFilterSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -940,6 +1326,15 @@ func (m *NamespaceURI) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VpcEndpointServiceNames) > 0 { + for iNdEx := len(m.VpcEndpointServiceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.VpcEndpointServiceNames[iNdEx]) + copy(dAtA[i:], m.VpcEndpointServiceNames[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.VpcEndpointServiceNames[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.Grpc) > 0 { i -= len(m.Grpc) copy(dAtA[i:], m.Grpc) @@ -957,6 +1352,34 @@ func (m *NamespaceURI) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *NamespaceEnvelope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NamespaceEnvelope) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ActionsPerSecondLimit != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.ActionsPerSecondLimit)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Namespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -977,6 +1400,39 @@ func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AllowedPrincipals) > 0 { + for iNdEx := len(m.AllowedPrincipals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllowedPrincipals[iNdEx]) + copy(dAtA[i:], m.AllowedPrincipals[iNdEx]) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AllowedPrincipals[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if m.CodecServerProperty != nil { + { + size, err := m.CodecServerProperty.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.Envelope != nil { + { + size, err := m.Envelope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } if m.Uri != nil { { size, err := m.Uri.MarshalToSizedBuffer(dAtA[:i]) @@ -1087,6 +1543,35 @@ func (m *NamespaceSpec) Size() (n int) { if m.Environment != 0 { n += 1 + sovMessage(uint64(m.Environment)) } + if m.CodecSpec != nil { + l = m.CodecSpec.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.PassiveRegions) > 0 { + for _, s := range m.PassiveRegions { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + return n +} + +func (m *CodecServerPropertySpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Endpoint) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.PassAccessToken { + n += 2 + } + if m.IncludeCredentials { + n += 2 + } return n } @@ -1129,6 +1614,24 @@ func (m *NamespaceURI) Size() (n int) { if l > 0 { n += 1 + l + sovMessage(uint64(l)) } + if len(m.VpcEndpointServiceNames) > 0 { + for _, s := range m.VpcEndpointServiceNames { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } + return n +} + +func (m *NamespaceEnvelope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ActionsPerSecondLimit != 0 { + n += 1 + sovMessage(uint64(m.ActionsPerSecondLimit)) + } return n } @@ -1165,6 +1668,20 @@ func (m *Namespace) Size() (n int) { l = m.Uri.Size() n += 1 + l + sovMessage(uint64(l)) } + if m.Envelope != nil { + l = m.Envelope.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.CodecServerProperty != nil { + l = m.CodecServerProperty.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if len(m.AllowedPrincipals) > 0 { + for _, s := range m.AllowedPrincipals { + l = len(s) + n += 1 + l + sovMessage(uint64(l)) + } + } return n } @@ -1200,6 +1717,20 @@ func (this *NamespaceSpec) String() string { `SearchAttributes:` + mapStringForSearchAttributes + `,`, `CertificateFilters:` + repeatedStringForCertificateFilters + `,`, `Environment:` + fmt.Sprintf("%v", this.Environment) + `,`, + `CodecSpec:` + strings.Replace(this.CodecSpec.String(), "CodecServerPropertySpec", "CodecServerPropertySpec", 1) + `,`, + `PassiveRegions:` + fmt.Sprintf("%v", this.PassiveRegions) + `,`, + `}`, + }, "") + return s +} +func (this *CodecServerPropertySpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CodecServerPropertySpec{`, + `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, + `PassAccessToken:` + fmt.Sprintf("%v", this.PassAccessToken) + `,`, + `IncludeCredentials:` + fmt.Sprintf("%v", this.IncludeCredentials) + `,`, `}`, }, "") return s @@ -1224,6 +1755,17 @@ func (this *NamespaceURI) String() string { s := strings.Join([]string{`&NamespaceURI{`, `Web:` + fmt.Sprintf("%v", this.Web) + `,`, `Grpc:` + fmt.Sprintf("%v", this.Grpc) + `,`, + `VpcEndpointServiceNames:` + fmt.Sprintf("%v", this.VpcEndpointServiceNames) + `,`, + `}`, + }, "") + return s +} +func (this *NamespaceEnvelope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamespaceEnvelope{`, + `ActionsPerSecondLimit:` + fmt.Sprintf("%v", this.ActionsPerSecondLimit) + `,`, `}`, }, "") return s @@ -1240,6 +1782,9 @@ func (this *Namespace) String() string { `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, `LastModifiedTime:` + strings.Replace(fmt.Sprintf("%v", this.LastModifiedTime), "Timestamp", "types.Timestamp", 1) + `,`, `Uri:` + strings.Replace(this.Uri.String(), "NamespaceURI", "NamespaceURI", 1) + `,`, + `Envelope:` + strings.Replace(this.Envelope.String(), "NamespaceEnvelope", "NamespaceEnvelope", 1) + `,`, + `CodecServerProperty:` + strings.Replace(this.CodecServerProperty.String(), "CodecServerPropertySpec", "CodecServerPropertySpec", 1) + `,`, + `AllowedPrincipals:` + fmt.Sprintf("%v", this.AllowedPrincipals) + `,`, `}`, }, "") return s @@ -1530,6 +2075,199 @@ func (m *NamespaceSpec) Unmarshal(dAtA []byte) error { break } } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodecSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CodecSpec == nil { + m.CodecSpec = &CodecServerPropertySpec{} + } + if err := m.CodecSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PassiveRegions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PassiveRegions = append(m.PassiveRegions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CodecServerPropertySpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CodecServerPropertySpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CodecServerPropertySpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PassAccessToken", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PassAccessToken = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeCredentials", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeCredentials = bool(v != 0) default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) @@ -1828,6 +2566,110 @@ func (m *NamespaceURI) Unmarshal(dAtA []byte) error { } m.Grpc = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VpcEndpointServiceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VpcEndpointServiceNames = append(m.VpcEndpointServiceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamespaceEnvelope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamespaceEnvelope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamespaceEnvelope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActionsPerSecondLimit", wireType) + } + m.ActionsPerSecondLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ActionsPerSecondLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) @@ -2104,6 +2946,110 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Envelope", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Envelope == nil { + m.Envelope = &NamespaceEnvelope{} + } + if err := m.Envelope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodecServerProperty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CodecServerProperty == nil { + m.CodecServerProperty = &CodecServerPropertySpec{} + } + if err := m.CodecServerProperty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedPrincipals", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedPrincipals = append(m.AllowedPrincipals, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) diff --git a/protogen/api/namespaceservice/v1/request_response.pb.go b/protogen/api/namespaceservice/v1/request_response.pb.go index 17964320..5d314ec0 100644 --- a/protogen/api/namespaceservice/v1/request_response.pb.go +++ b/protogen/api/namespaceservice/v1/request_response.pb.go @@ -14,6 +14,7 @@ import ( v11 "github.com/temporalio/tcld/protogen/api/auth/v1" v1 "github.com/temporalio/tcld/protogen/api/namespace/v1" v12 "github.com/temporalio/tcld/protogen/api/request/v1" + v13 "github.com/temporalio/tcld/protogen/api/sink/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -791,366 +792,865 @@ func (m *DeleteNamespaceResponse) GetRequestStatus() *v12.RequestStatus { return nil } -func init() { - proto.RegisterType((*CreateNamespaceRequest)(nil), "api.namespaceservice.v1.CreateNamespaceRequest") - proto.RegisterType((*CreateNamespaceResponse)(nil), "api.namespaceservice.v1.CreateNamespaceResponse") - proto.RegisterType((*ListNamespacesRequest)(nil), "api.namespaceservice.v1.ListNamespacesRequest") - proto.RegisterType((*ListNamespacesResponse)(nil), "api.namespaceservice.v1.ListNamespacesResponse") - proto.RegisterType((*GetNamespacesRequest)(nil), "api.namespaceservice.v1.GetNamespacesRequest") - proto.RegisterType((*GetNamespacesResponse)(nil), "api.namespaceservice.v1.GetNamespacesResponse") - proto.RegisterType((*GetNamespaceRequest)(nil), "api.namespaceservice.v1.GetNamespaceRequest") - proto.RegisterType((*GetNamespaceResponse)(nil), "api.namespaceservice.v1.GetNamespaceResponse") - proto.RegisterType((*UpdateNamespaceRequest)(nil), "api.namespaceservice.v1.UpdateNamespaceRequest") - proto.RegisterType((*UpdateNamespaceResponse)(nil), "api.namespaceservice.v1.UpdateNamespaceResponse") - proto.RegisterType((*RenameCustomSearchAttributeRequest)(nil), "api.namespaceservice.v1.RenameCustomSearchAttributeRequest") - proto.RegisterType((*RenameCustomSearchAttributeResponse)(nil), "api.namespaceservice.v1.RenameCustomSearchAttributeResponse") - proto.RegisterType((*DeleteNamespaceRequest)(nil), "api.namespaceservice.v1.DeleteNamespaceRequest") - proto.RegisterType((*DeleteNamespaceResponse)(nil), "api.namespaceservice.v1.DeleteNamespaceResponse") +type CreateExportSinkRequest struct { + // the namespace the sink is configured under + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the spec for the sink + Spec *v13.ExportSinkSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` } -func init() { - proto.RegisterFile("api/namespaceservice/v1/request_response.proto", fileDescriptor_667e39c23eb47b7c) +func (m *CreateExportSinkRequest) Reset() { *m = CreateExportSinkRequest{} } +func (*CreateExportSinkRequest) ProtoMessage() {} +func (*CreateExportSinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{14} } - -var fileDescriptor_667e39c23eb47b7c = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xce, 0x36, 0x29, 0x22, 0x13, 0x95, 0x22, 0x43, 0xd3, 0xd0, 0x9f, 0x25, 0x04, 0x15, 0x85, - 0x8b, 0xa3, 0xa6, 0x5c, 0x50, 0x4f, 0xd0, 0x0a, 0x84, 0x84, 0x50, 0x71, 0x28, 0x07, 0x2e, 0xc6, - 0x75, 0x46, 0xad, 0x69, 0x63, 0x9b, 0xdd, 0x75, 0x5a, 0x55, 0x1c, 0xfa, 0x08, 0x3c, 0x05, 0xe2, - 0x05, 0x78, 0x07, 0x8e, 0x3d, 0xf6, 0x48, 0xdd, 0x0b, 0x37, 0xfa, 0x08, 0x68, 0x37, 0xb6, 0x9b, - 0xda, 0x69, 0x08, 0x28, 0xe2, 0x98, 0x99, 0xd9, 0xef, 0xfb, 0xe6, 0x9b, 0x99, 0x18, 0x74, 0xcb, - 0x77, 0x1a, 0xae, 0xd5, 0x41, 0xee, 0x5b, 0x36, 0x72, 0x64, 0x5d, 0xc7, 0xc6, 0x46, 0x77, 0xb9, - 0xc1, 0xf0, 0x63, 0x80, 0x5c, 0x98, 0x0c, 0xb9, 0xef, 0xb9, 0x1c, 0x75, 0x9f, 0x79, 0xc2, 0xd3, - 0x66, 0x2d, 0xdf, 0xd1, 0xd3, 0xf5, 0x7a, 0x77, 0x79, 0xee, 0x8e, 0x04, 0xb2, 0x02, 0xb1, 0x23, - 0x1f, 0x77, 0x90, 0x73, 0x6b, 0x3b, 0x7a, 0x33, 0x47, 0x2f, 0x71, 0x64, 0xf3, 0x0b, 0x32, 0x1f, - 0xf1, 0x65, 0xb2, 0xb5, 0x5f, 0x04, 0xca, 0x6b, 0x0c, 0x2d, 0x81, 0xaf, 0x62, 0x08, 0xa3, 0x57, - 0xab, 0x2d, 0x40, 0x31, 0x81, 0xad, 0x90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0xb8, 0x3f, 0xd4, 0xa7, 0xb1, 0x4e, 0xe5, 0x88, 0x40, 0x79, 0x1d, 0xf7, - 0xf0, 0xaf, 0xd7, 0x75, 0x50, 0xbf, 0x13, 0xa3, 0xf4, 0x9b, 0x1f, 0xb0, 0x79, 0x19, 0x05, 0xe3, - 0xec, 0xf1, 0xe9, 0x87, 0xe3, 0x53, 0x9a, 0x3b, 0x39, 0xa5, 0xb9, 0xf3, 0x53, 0x4a, 0x8e, 0x42, - 0x4a, 0xbe, 0x86, 0x94, 0x7c, 0x0f, 0x29, 0x39, 0x0e, 0x29, 0xf9, 0x11, 0x52, 0xf2, 0x33, 0xa4, - 0xb9, 0xf3, 0x90, 0x92, 0xcf, 0x67, 0x34, 0x77, 0x7c, 0x46, 0x73, 0x27, 0x67, 0x34, 0xf7, 0xee, - 0x91, 0xe8, 0xf8, 0x6c, 0x4f, 0xb7, 0xf7, 0xbc, 0xa0, 0xdd, 0xb8, 0xe2, 0xd3, 0xbe, 0x9a, 0x8e, - 0x6d, 0x5d, 0x53, 0x5f, 0xda, 0x95, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0x5b, 0xeb, 0xc2, - 0x0d, 0x08, 0x00, 0x00, +func (m *CreateExportSinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (this *CreateNamespaceRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CreateNamespaceRequest) - if !ok { - that2, ok := that.(CreateNamespaceRequest) - if ok { - that1 = &that2 - } else { - return false +func (m *CreateExportSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateExportSinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Namespace != that1.Namespace { - return false - } - if !this.Spec.Equal(that1.Spec) { - return false - } - if this.RequestId != that1.RequestId { - return false - } - if len(this.UserNamespacePermissions) != len(that1.UserNamespacePermissions) { - return false +} +func (m *CreateExportSinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateExportSinkRequest.Merge(m, src) +} +func (m *CreateExportSinkRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateExportSinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateExportSinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateExportSinkRequest proto.InternalMessageInfo + +func (m *CreateExportSinkRequest) GetNamespace() string { + if m != nil { + return m.Namespace } - for i := range this.UserNamespacePermissions { - if !this.UserNamespacePermissions[i].Equal(that1.UserNamespacePermissions[i]) { - return false - } + return "" +} + +func (m *CreateExportSinkRequest) GetSpec() *v13.ExportSinkSpec { + if m != nil { + return m.Spec } - return true + return nil } -func (this *CreateNamespaceResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *CreateExportSinkRequest) GetRequestId() string { + if m != nil { + return m.RequestId } + return "" +} - that1, ok := that.(*CreateNamespaceResponse) - if !ok { - that2, ok := that.(CreateNamespaceResponse) - if ok { - that1 = &that2 - } else { - return false +type CreateExportSinkResponse struct { + // the request status of the create operation + RequestStatus *v12.RequestStatus `protobuf:"bytes,1,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *CreateExportSinkResponse) Reset() { *m = CreateExportSinkResponse{} } +func (*CreateExportSinkResponse) ProtoMessage() {} +func (*CreateExportSinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{15} +} +func (m *CreateExportSinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateExportSinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateExportSinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RequestStatus.Equal(that1.RequestStatus) { - return false - } - return true } -func (this *ListNamespacesRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *CreateExportSinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateExportSinkResponse.Merge(m, src) +} +func (m *CreateExportSinkResponse) XXX_Size() int { + return m.Size() +} +func (m *CreateExportSinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateExportSinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateExportSinkResponse proto.InternalMessageInfo + +func (m *CreateExportSinkResponse) GetRequestStatus() *v12.RequestStatus { + if m != nil { + return m.RequestStatus } + return nil +} - that1, ok := that.(*ListNamespacesRequest) - if !ok { - that2, ok := that.(ListNamespacesRequest) - if ok { - that1 = &that2 - } else { - return false +type GetExportSinkRequest struct { + // the namespace the sink is scoped to + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the sink name under the namespace to retrieve + SinkName string `protobuf:"bytes,2,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` +} + +func (m *GetExportSinkRequest) Reset() { *m = GetExportSinkRequest{} } +func (*GetExportSinkRequest) ProtoMessage() {} +func (*GetExportSinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{16} +} +func (m *GetExportSinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExportSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExportSinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PageSize != that1.PageSize { - return false - } - if this.PageToken != that1.PageToken { - return false +} +func (m *GetExportSinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExportSinkRequest.Merge(m, src) +} +func (m *GetExportSinkRequest) XXX_Size() int { + return m.Size() +} +func (m *GetExportSinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetExportSinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExportSinkRequest proto.InternalMessageInfo + +func (m *GetExportSinkRequest) GetNamespace() string { + if m != nil { + return m.Namespace } - return true + return "" } -func (this *ListNamespacesResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *GetExportSinkRequest) GetSinkName() string { + if m != nil { + return m.SinkName } + return "" +} - that1, ok := that.(*ListNamespacesResponse) - if !ok { - that2, ok := that.(ListNamespacesResponse) - if ok { - that1 = &that2 - } else { - return false +type GetExportSinkResponse struct { + // the sink + Sink *v13.ExportSink `protobuf:"bytes,1,opt,name=sink,proto3" json:"sink,omitempty"` +} + +func (m *GetExportSinkResponse) Reset() { *m = GetExportSinkResponse{} } +func (*GetExportSinkResponse) ProtoMessage() {} +func (*GetExportSinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{17} +} +func (m *GetExportSinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExportSinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExportSinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Namespaces) != len(that1.Namespaces) { - return false +} +func (m *GetExportSinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExportSinkResponse.Merge(m, src) +} +func (m *GetExportSinkResponse) XXX_Size() int { + return m.Size() +} +func (m *GetExportSinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetExportSinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExportSinkResponse proto.InternalMessageInfo + +func (m *GetExportSinkResponse) GetSink() *v13.ExportSink { + if m != nil { + return m.Sink } - for i := range this.Namespaces { - if this.Namespaces[i] != that1.Namespaces[i] { - return false + return nil +} + +type DeleteExportSinkRequest struct { + // the namespace the sink is scoped to + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the sink name under the namespace to delete + SinkName string `protobuf:"bytes,2,opt,name=sink_name,json=sinkName,proto3" json:"sink_name,omitempty"` + // the version of the sink for which this delete is intended for + // the latest version can be found by getting the sink + ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *DeleteExportSinkRequest) Reset() { *m = DeleteExportSinkRequest{} } +func (*DeleteExportSinkRequest) ProtoMessage() {} +func (*DeleteExportSinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{18} +} +func (m *DeleteExportSinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteExportSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteExportSinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if this.NextPageToken != that1.NextPageToken { - return false +} +func (m *DeleteExportSinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteExportSinkRequest.Merge(m, src) +} +func (m *DeleteExportSinkRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteExportSinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteExportSinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteExportSinkRequest proto.InternalMessageInfo + +func (m *DeleteExportSinkRequest) GetNamespace() string { + if m != nil { + return m.Namespace } - return true + return "" } -func (this *GetNamespacesRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *DeleteExportSinkRequest) GetSinkName() string { + if m != nil { + return m.SinkName } + return "" +} - that1, ok := that.(*GetNamespacesRequest) - if !ok { - that2, ok := that.(GetNamespacesRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.PageSize != that1.PageSize { - return false - } - if this.PageToken != that1.PageToken { - return false +func (m *DeleteExportSinkRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion } - return true + return "" } -func (this *GetNamespacesResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*GetNamespacesResponse) - if !ok { - that2, ok := that.(GetNamespacesResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Namespaces) != len(that1.Namespaces) { - return false +func (m *DeleteExportSinkRequest) GetRequestId() string { + if m != nil { + return m.RequestId } - for i := range this.Namespaces { - if !this.Namespaces[i].Equal(that1.Namespaces[i]) { - return false + return "" +} + +type DeleteExportSinkResponse struct { + // the request status of the delete operation + RequestStatus *v12.RequestStatus `protobuf:"bytes,1,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *DeleteExportSinkResponse) Reset() { *m = DeleteExportSinkResponse{} } +func (*DeleteExportSinkResponse) ProtoMessage() {} +func (*DeleteExportSinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{19} +} +func (m *DeleteExportSinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteExportSinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteExportSinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if this.NextPageToken != that1.NextPageToken { - return false - } - return true } -func (this *GetNamespaceRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *DeleteExportSinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteExportSinkResponse.Merge(m, src) +} +func (m *DeleteExportSinkResponse) XXX_Size() int { + return m.Size() +} +func (m *DeleteExportSinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteExportSinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteExportSinkResponse proto.InternalMessageInfo + +func (m *DeleteExportSinkResponse) GetRequestStatus() *v12.RequestStatus { + if m != nil { + return m.RequestStatus } + return nil +} - that1, ok := that.(*GetNamespaceRequest) - if !ok { - that2, ok := that.(GetNamespaceRequest) - if ok { - that1 = &that2 - } else { - return false +type UpdateExportSinkRequest struct { + // the namespace the sink is scoped to + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the updated sink specification + Spec *v13.ExportSinkSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + // the version of the sink for which this update is intended for + // the latest version can be found by getting the sink + ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + // the request id to use for this operation - optional + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (m *UpdateExportSinkRequest) Reset() { *m = UpdateExportSinkRequest{} } +func (*UpdateExportSinkRequest) ProtoMessage() {} +func (*UpdateExportSinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{20} +} +func (m *UpdateExportSinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateExportSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateExportSinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Namespace != that1.Namespace { - return false - } - return true } -func (this *GetNamespaceResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } +func (m *UpdateExportSinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateExportSinkRequest.Merge(m, src) +} +func (m *UpdateExportSinkRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateExportSinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateExportSinkRequest.DiscardUnknown(m) +} - that1, ok := that.(*GetNamespaceResponse) - if !ok { - that2, ok := that.(GetNamespaceResponse) - if ok { - that1 = &that2 - } else { - return false - } +var xxx_messageInfo_UpdateExportSinkRequest proto.InternalMessageInfo + +func (m *UpdateExportSinkRequest) GetNamespace() string { + if m != nil { + return m.Namespace } - if that1 == nil { - return this == nil - } else if this == nil { - return false + return "" +} + +func (m *UpdateExportSinkRequest) GetSpec() *v13.ExportSinkSpec { + if m != nil { + return m.Spec } - if !this.Namespace.Equal(that1.Namespace) { - return false + return nil +} + +func (m *UpdateExportSinkRequest) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion } - return true + return "" } -func (this *UpdateNamespaceRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *UpdateExportSinkRequest) GetRequestId() string { + if m != nil { + return m.RequestId } + return "" +} - that1, ok := that.(*UpdateNamespaceRequest) - if !ok { - that2, ok := that.(UpdateNamespaceRequest) - if ok { - that1 = &that2 - } else { - return false +type UpdateExportSinkResponse struct { + // the request status of the update operation + RequestStatus *v12.RequestStatus `protobuf:"bytes,1,opt,name=request_status,json=requestStatus,proto3" json:"request_status,omitempty"` +} + +func (m *UpdateExportSinkResponse) Reset() { *m = UpdateExportSinkResponse{} } +func (*UpdateExportSinkResponse) ProtoMessage() {} +func (*UpdateExportSinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{21} +} +func (m *UpdateExportSinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateExportSinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateExportSinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Namespace != that1.Namespace { - return false - } - if !this.Spec.Equal(that1.Spec) { - return false - } - if this.ResourceVersion != that1.ResourceVersion { - return false - } - if this.RequestId != that1.RequestId { - return false - } - return true } -func (this *UpdateNamespaceResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil +func (m *UpdateExportSinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateExportSinkResponse.Merge(m, src) +} +func (m *UpdateExportSinkResponse) XXX_Size() int { + return m.Size() +} +func (m *UpdateExportSinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateExportSinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateExportSinkResponse proto.InternalMessageInfo + +func (m *UpdateExportSinkResponse) GetRequestStatus() *v12.RequestStatus { + if m != nil { + return m.RequestStatus } + return nil +} - that1, ok := that.(*UpdateNamespaceResponse) - if !ok { - that2, ok := that.(UpdateNamespaceResponse) - if ok { - that1 = &that2 - } else { - return false +type ListExportSinksRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the requested size of the page to retrive + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (m *ListExportSinksRequest) Reset() { *m = ListExportSinksRequest{} } +func (*ListExportSinksRequest) ProtoMessage() {} +func (*ListExportSinksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{22} +} +func (m *ListExportSinksRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListExportSinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListExportSinksRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.RequestStatus.Equal(that1.RequestStatus) { - return false +} +func (m *ListExportSinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListExportSinksRequest.Merge(m, src) +} +func (m *ListExportSinksRequest) XXX_Size() int { + return m.Size() +} +func (m *ListExportSinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListExportSinksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListExportSinksRequest proto.InternalMessageInfo + +func (m *ListExportSinksRequest) GetNamespace() string { + if m != nil { + return m.Namespace } - return true + return "" } -func (this *RenameCustomSearchAttributeRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil + +func (m *ListExportSinksRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize } + return 0 +} - that1, ok := that.(*RenameCustomSearchAttributeRequest) +func (m *ListExportSinksRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +type ListExportSinksResponse struct { + // the list of export sink names + SinkNames []string `protobuf:"bytes,1,rep,name=sink_names,json=sinkNames,proto3" json:"sink_names,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *ListExportSinksResponse) Reset() { *m = ListExportSinksResponse{} } +func (*ListExportSinksResponse) ProtoMessage() {} +func (*ListExportSinksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{23} +} +func (m *ListExportSinksResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListExportSinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListExportSinksResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListExportSinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListExportSinksResponse.Merge(m, src) +} +func (m *ListExportSinksResponse) XXX_Size() int { + return m.Size() +} +func (m *ListExportSinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListExportSinksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListExportSinksResponse proto.InternalMessageInfo + +func (m *ListExportSinksResponse) GetSinkNames() []string { + if m != nil { + return m.SinkNames + } + return nil +} + +func (m *ListExportSinksResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +type GetExportSinksRequest struct { + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the requested size of the page to retrive + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (m *GetExportSinksRequest) Reset() { *m = GetExportSinksRequest{} } +func (*GetExportSinksRequest) ProtoMessage() {} +func (*GetExportSinksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{24} +} +func (m *GetExportSinksRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExportSinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExportSinksRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExportSinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExportSinksRequest.Merge(m, src) +} +func (m *GetExportSinksRequest) XXX_Size() int { + return m.Size() +} +func (m *GetExportSinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetExportSinksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExportSinksRequest proto.InternalMessageInfo + +func (m *GetExportSinksRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *GetExportSinksRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *GetExportSinksRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +type GetExportSinksResponse struct { + // the list of export sinks + Sinks []*v13.ExportSink `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetExportSinksResponse) Reset() { *m = GetExportSinksResponse{} } +func (*GetExportSinksResponse) ProtoMessage() {} +func (*GetExportSinksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{25} +} +func (m *GetExportSinksResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetExportSinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetExportSinksResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetExportSinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetExportSinksResponse.Merge(m, src) +} +func (m *GetExportSinksResponse) XXX_Size() int { + return m.Size() +} +func (m *GetExportSinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetExportSinksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetExportSinksResponse proto.InternalMessageInfo + +func (m *GetExportSinksResponse) GetSinks() []*v13.ExportSink { + if m != nil { + return m.Sinks + } + return nil +} + +func (m *GetExportSinksResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +type ValidateExportSinkRequest struct { + // the namespace the sink is scoped to + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // the sink specification needs to be validated + Spec *v13.ExportSinkSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (m *ValidateExportSinkRequest) Reset() { *m = ValidateExportSinkRequest{} } +func (*ValidateExportSinkRequest) ProtoMessage() {} +func (*ValidateExportSinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{26} +} +func (m *ValidateExportSinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidateExportSinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidateExportSinkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidateExportSinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidateExportSinkRequest.Merge(m, src) +} +func (m *ValidateExportSinkRequest) XXX_Size() int { + return m.Size() +} +func (m *ValidateExportSinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ValidateExportSinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidateExportSinkRequest proto.InternalMessageInfo + +func (m *ValidateExportSinkRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *ValidateExportSinkRequest) GetSpec() *v13.ExportSinkSpec { + if m != nil { + return m.Spec + } + return nil +} + +type ValidateExportSinkResponse struct { +} + +func (m *ValidateExportSinkResponse) Reset() { *m = ValidateExportSinkResponse{} } +func (*ValidateExportSinkResponse) ProtoMessage() {} +func (*ValidateExportSinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_667e39c23eb47b7c, []int{27} +} +func (m *ValidateExportSinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidateExportSinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidateExportSinkResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidateExportSinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidateExportSinkResponse.Merge(m, src) +} +func (m *ValidateExportSinkResponse) XXX_Size() int { + return m.Size() +} +func (m *ValidateExportSinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ValidateExportSinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidateExportSinkResponse proto.InternalMessageInfo + + +func init() { + proto.RegisterType((*CreateNamespaceRequest)(nil), "api.namespaceservice.v1.CreateNamespaceRequest") + proto.RegisterType((*CreateNamespaceResponse)(nil), "api.namespaceservice.v1.CreateNamespaceResponse") + proto.RegisterType((*ListNamespacesRequest)(nil), "api.namespaceservice.v1.ListNamespacesRequest") + proto.RegisterType((*ListNamespacesResponse)(nil), "api.namespaceservice.v1.ListNamespacesResponse") + proto.RegisterType((*GetNamespacesRequest)(nil), "api.namespaceservice.v1.GetNamespacesRequest") + proto.RegisterType((*GetNamespacesResponse)(nil), "api.namespaceservice.v1.GetNamespacesResponse") + proto.RegisterType((*GetNamespaceRequest)(nil), "api.namespaceservice.v1.GetNamespaceRequest") + proto.RegisterType((*GetNamespaceResponse)(nil), "api.namespaceservice.v1.GetNamespaceResponse") + proto.RegisterType((*UpdateNamespaceRequest)(nil), "api.namespaceservice.v1.UpdateNamespaceRequest") + proto.RegisterType((*UpdateNamespaceResponse)(nil), "api.namespaceservice.v1.UpdateNamespaceResponse") + proto.RegisterType((*RenameCustomSearchAttributeRequest)(nil), "api.namespaceservice.v1.RenameCustomSearchAttributeRequest") + proto.RegisterType((*RenameCustomSearchAttributeResponse)(nil), "api.namespaceservice.v1.RenameCustomSearchAttributeResponse") + proto.RegisterType((*DeleteNamespaceRequest)(nil), "api.namespaceservice.v1.DeleteNamespaceRequest") + proto.RegisterType((*DeleteNamespaceResponse)(nil), "api.namespaceservice.v1.DeleteNamespaceResponse") + proto.RegisterType((*CreateExportSinkRequest)(nil), "api.namespaceservice.v1.CreateExportSinkRequest") + proto.RegisterType((*CreateExportSinkResponse)(nil), "api.namespaceservice.v1.CreateExportSinkResponse") + proto.RegisterType((*GetExportSinkRequest)(nil), "api.namespaceservice.v1.GetExportSinkRequest") + proto.RegisterType((*GetExportSinkResponse)(nil), "api.namespaceservice.v1.GetExportSinkResponse") + proto.RegisterType((*DeleteExportSinkRequest)(nil), "api.namespaceservice.v1.DeleteExportSinkRequest") + proto.RegisterType((*DeleteExportSinkResponse)(nil), "api.namespaceservice.v1.DeleteExportSinkResponse") + proto.RegisterType((*UpdateExportSinkRequest)(nil), "api.namespaceservice.v1.UpdateExportSinkRequest") + proto.RegisterType((*UpdateExportSinkResponse)(nil), "api.namespaceservice.v1.UpdateExportSinkResponse") + proto.RegisterType((*ListExportSinksRequest)(nil), "api.namespaceservice.v1.ListExportSinksRequest") + proto.RegisterType((*ListExportSinksResponse)(nil), "api.namespaceservice.v1.ListExportSinksResponse") + proto.RegisterType((*GetExportSinksRequest)(nil), "api.namespaceservice.v1.GetExportSinksRequest") + proto.RegisterType((*GetExportSinksResponse)(nil), "api.namespaceservice.v1.GetExportSinksResponse") + proto.RegisterType((*ValidateExportSinkRequest)(nil), "api.namespaceservice.v1.ValidateExportSinkRequest") + proto.RegisterType((*ValidateExportSinkResponse)(nil), "api.namespaceservice.v1.ValidateExportSinkResponse") +} + +func init() { + proto.RegisterFile("api/namespaceservice/v1/request_response.proto", fileDescriptor_667e39c23eb47b7c) +} + +var fileDescriptor_667e39c23eb47b7c = []byte{ + // 958 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f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xf2, 0xfd, 0x2d, 0x31, 0x0c, 0xd8, 0xa0, 0xed, + 0x0e, 0xfc, 0xf0, 0xb8, 0xb3, 0xe0, 0x99, 0x7c, 0x3b, 0x6b, 0x7b, 0xf4, 0x56, 0xf4, 0xfa, 0xdc, + 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xff, 0xd3, 0x77, 0x59, 0x0f, 0x00, 0x00, +} + +func (this *CreateNamespaceRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CreateNamespaceRequest) if !ok { - that2, ok := that.(RenameCustomSearchAttributeRequest) + that2, ok := that.(CreateNamespaceRequest) if ok { that1 = &that2 } else { @@ -1165,28 +1665,30 @@ func (this *RenameCustomSearchAttributeRequest) Equal(that interface{}) bool { if this.Namespace != that1.Namespace { return false } - if this.ExistingCustomSearchAttributeName != that1.ExistingCustomSearchAttributeName { + if !this.Spec.Equal(that1.Spec) { return false } - if this.NewCustomSearchAttributeName != that1.NewCustomSearchAttributeName { + if this.RequestId != that1.RequestId { return false } - if this.ResourceVersion != that1.ResourceVersion { + if len(this.UserNamespacePermissions) != len(that1.UserNamespacePermissions) { return false } - if this.RequestId != that1.RequestId { - return false + for i := range this.UserNamespacePermissions { + if !this.UserNamespacePermissions[i].Equal(that1.UserNamespacePermissions[i]) { + return false + } } return true } -func (this *RenameCustomSearchAttributeResponse) Equal(that interface{}) bool { +func (this *CreateNamespaceResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*RenameCustomSearchAttributeResponse) + that1, ok := that.(*CreateNamespaceResponse) if !ok { - that2, ok := that.(RenameCustomSearchAttributeResponse) + that2, ok := that.(CreateNamespaceResponse) if ok { that1 = &that2 } else { @@ -1203,14 +1705,14 @@ func (this *RenameCustomSearchAttributeResponse) Equal(that interface{}) bool { } return true } -func (this *DeleteNamespaceRequest) Equal(that interface{}) bool { +func (this *ListNamespacesRequest) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*DeleteNamespaceRequest) + that1, ok := that.(*ListNamespacesRequest) if !ok { - that2, ok := that.(DeleteNamespaceRequest) + that2, ok := that.(ListNamespacesRequest) if ok { that1 = &that2 } else { @@ -1222,25 +1724,22 @@ func (this *DeleteNamespaceRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Namespace != that1.Namespace { - return false - } - if this.ResourceVersion != that1.ResourceVersion { + if this.PageSize != that1.PageSize { return false } - if this.RequestId != that1.RequestId { + if this.PageToken != that1.PageToken { return false } return true } -func (this *DeleteNamespaceResponse) Equal(that interface{}) bool { +func (this *ListNamespacesResponse) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*DeleteNamespaceResponse) + that1, ok := that.(*ListNamespacesResponse) if !ok { - that2, ok := that.(DeleteNamespaceResponse) + that2, ok := that.(ListNamespacesResponse) if ok { that1 = &that2 } else { @@ -1252,1214 +1751,4503 @@ func (this *DeleteNamespaceResponse) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.RequestStatus.Equal(that1.RequestStatus) { + if len(this.Namespaces) != len(that1.Namespaces) { + return false + } + for i := range this.Namespaces { + if this.Namespaces[i] != that1.Namespaces[i] { + return false + } + } + if this.NextPageToken != that1.NextPageToken { return false } return true } -func (this *CreateNamespaceRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&namespaceservice.CreateNamespaceRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - if this.Spec != nil { - s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") +func (this *GetNamespacesRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - if this.UserNamespacePermissions != nil { - s = append(s, "UserNamespacePermissions: "+fmt.Sprintf("%#v", this.UserNamespacePermissions)+",\n") + + that1, ok := that.(*GetNamespacesRequest) + if !ok { + that2, ok := that.(GetNamespacesRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *CreateNamespaceResponse) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.CreateNamespaceResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if this.PageSize != that1.PageSize { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ListNamespacesRequest) GoString() string { - if this == nil { - return "nil" + if this.PageToken != that1.PageToken { + return false } - s := make([]string, 0, 6) - s = append(s, "&namespaceservice.ListNamespacesRequest{") - s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") - s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *ListNamespacesResponse) GoString() string { - if this == nil { - return "nil" +func (this *GetNamespacesResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 6) - s = append(s, "&namespaceservice.ListNamespacesResponse{") - s = append(s, "Namespaces: "+fmt.Sprintf("%#v", this.Namespaces)+",\n") - s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetNamespacesRequest) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*GetNamespacesResponse) + if !ok { + that2, ok := that.(GetNamespacesResponse) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 6) - s = append(s, "&namespaceservice.GetNamespacesRequest{") - s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") - s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetNamespacesResponse) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 6) - s = append(s, "&namespaceservice.GetNamespacesResponse{") - if this.Namespaces != nil { - s = append(s, "Namespaces: "+fmt.Sprintf("%#v", this.Namespaces)+",\n") + if len(this.Namespaces) != len(that1.Namespaces) { + return false } - s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetNamespaceRequest) GoString() string { - if this == nil { - return "nil" + for i := range this.Namespaces { + if !this.Namespaces[i].Equal(that1.Namespaces[i]) { + return false + } } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.GetNamespaceRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "}") - return strings.Join(s, "") + if this.NextPageToken != that1.NextPageToken { + return false + } + return true } -func (this *GetNamespaceResponse) GoString() string { - if this == nil { - return "nil" +func (this *GetNamespaceRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.GetNamespaceResponse{") - if this.Namespace != nil { - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + + that1, ok := that.(*GetNamespaceRequest) + if !ok { + that2, ok := that.(GetNamespaceRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UpdateNamespaceRequest) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 8) - s = append(s, "&namespaceservice.UpdateNamespaceRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - if this.Spec != nil { - s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + if this.Namespace != that1.Namespace { + return false } - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") + return true } -func (this *UpdateNamespaceResponse) GoString() string { - if this == nil { - return "nil" +func (this *GetNamespaceResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.UpdateNamespaceResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + + that1, ok := that.(*GetNamespaceResponse) + if !ok { + that2, ok := that.(GetNamespaceResponse) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RenameCustomSearchAttributeRequest) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 9) - s = append(s, "&namespaceservice.RenameCustomSearchAttributeRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "ExistingCustomSearchAttributeName: "+fmt.Sprintf("%#v", this.ExistingCustomSearchAttributeName)+",\n") - s = append(s, "NewCustomSearchAttributeName: "+fmt.Sprintf("%#v", this.NewCustomSearchAttributeName)+",\n") - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") + if !this.Namespace.Equal(that1.Namespace) { + return false + } + return true } -func (this *RenameCustomSearchAttributeResponse) GoString() string { - if this == nil { - return "nil" +func (this *UpdateNamespaceRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.RenameCustomSearchAttributeResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + + that1, ok := that.(*UpdateNamespaceRequest) + if !ok { + that2, ok := that.(UpdateNamespaceRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeleteNamespaceRequest) GoString() string { - if this == nil { - return "nil" + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s := make([]string, 0, 7) - s = append(s, "&namespaceservice.DeleteNamespaceRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DeleteNamespaceResponse) GoString() string { - if this == nil { - return "nil" + if this.Namespace != that1.Namespace { + return false } - s := make([]string, 0, 5) - s = append(s, "&namespaceservice.DeleteNamespaceResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if !this.Spec.Equal(that1.Spec) { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringRequestResponse(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + if this.ResourceVersion != that1.ResourceVersion { + return false } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *CreateNamespaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if this.RequestId != that1.RequestId { + return false } - return dAtA[:n], nil -} - -func (m *CreateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return true } +func (this *UpdateNamespaceResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *CreateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserNamespacePermissions) > 0 { - for iNdEx := len(m.UserNamespacePermissions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UserNamespacePermissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + that1, ok := that.(*UpdateNamespaceResponse) + if !ok { + that2, ok := that.(UpdateNamespaceResponse) + if ok { + that1 = &that2 + } else { + return false } } - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x1a - } - if m.Spec != nil { - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false } - return len(dAtA) - i, nil + return true } - -func (m *CreateNamespaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *RenameCustomSearchAttributeRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *CreateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *CreateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*RenameCustomSearchAttributeRequest) + if !ok { + that2, ok := that.(RenameCustomSearchAttributeRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *ListNamespacesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *ListNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListNamespacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PageToken) > 0 { - i -= len(m.PageToken) - copy(dAtA[i:], m.PageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) - i-- - dAtA[i] = 0x12 + if this.Namespace != that1.Namespace { + return false } - if m.PageSize != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x8 + if this.ExistingCustomSearchAttributeName != that1.ExistingCustomSearchAttributeName { + return false } - return len(dAtA) - i, nil -} - -func (m *ListNamespacesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if this.NewCustomSearchAttributeName != that1.NewCustomSearchAttributeName { + return false } - return dAtA[:n], nil -} - -func (m *ListNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListNamespacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NextPageToken) > 0 { - i -= len(m.NextPageToken) - copy(dAtA[i:], m.NextPageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) - i-- - dAtA[i] = 0x12 + if this.ResourceVersion != that1.ResourceVersion { + return false } - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Namespaces[iNdEx]) - copy(dAtA[i:], m.Namespaces[iNdEx]) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) - i-- - dAtA[i] = 0xa - } + if this.RequestId != that1.RequestId { + return false } - return len(dAtA) - i, nil + return true } - -func (m *GetNamespacesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *RenameCustomSearchAttributeResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *GetNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *GetNamespacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PageToken) > 0 { - i -= len(m.PageToken) - copy(dAtA[i:], m.PageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) - i-- - dAtA[i] = 0x12 + that1, ok := that.(*RenameCustomSearchAttributeResponse) + if !ok { + that2, ok := that.(RenameCustomSearchAttributeResponse) + if ok { + that1 = &that2 + } else { + return false + } } - if m.PageSize != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) - i-- - dAtA[i] = 0x8 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return len(dAtA) - i, nil + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *DeleteNamespaceRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetNamespacesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + that1, ok := that.(*DeleteNamespaceRequest) + if !ok { + that2, ok := that.(DeleteNamespaceRequest) + if ok { + that1 = &that2 + } else { + return false + } } - return dAtA[:n], nil -} - -func (m *GetNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetNamespacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NextPageToken) > 0 { - i -= len(m.NextPageToken) - copy(dAtA[i:], m.NextPageToken) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if this.Namespace != that1.Namespace { + return false } - return len(dAtA) - i, nil -} - -func (m *GetNamespaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if this.ResourceVersion != that1.ResourceVersion { + return false } - return dAtA[:n], nil -} - -func (m *GetNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if this.RequestId != that1.RequestId { + return false } - return len(dAtA) - i, nil + return true } - -func (m *GetNamespaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *DeleteNamespaceResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} -func (m *GetNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Namespace != nil { - { - size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*DeleteNamespaceResponse) + if !ok { + that2, ok := that.(DeleteNamespaceResponse) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *UpdateNamespaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *UpdateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *CreateExportSinkRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x22 + that1, ok := that.(*CreateExportSinkRequest) + if !ok { + that2, ok := that.(CreateExportSinkRequest) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.ResourceVersion) > 0 { - i -= len(m.ResourceVersion) - copy(dAtA[i:], m.ResourceVersion) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) - i-- - dAtA[i] = 0x1a + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if m.Spec != nil { - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if this.Namespace != that1.Namespace { + return false } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if !this.Spec.Equal(that1.Spec) { + return false } - return len(dAtA) - i, nil -} - -func (m *UpdateNamespaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if this.RequestId != that1.RequestId { + return false } - return dAtA[:n], nil -} - -func (m *UpdateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return true } +func (this *CreateExportSinkResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*CreateExportSinkResponse) + if !ok { + that2, ok := that.(CreateExportSinkResponse) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil -} - -func (m *RenameCustomSearchAttributeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } - -func (m *RenameCustomSearchAttributeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RenameCustomSearchAttributeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x2a +func (this *GetExportSinkRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - if len(m.ResourceVersion) > 0 { - i -= len(m.ResourceVersion) - copy(dAtA[i:], m.ResourceVersion) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) - i-- - dAtA[i] = 0x22 + + that1, ok := that.(*GetExportSinkRequest) + if !ok { + that2, ok := that.(GetExportSinkRequest) + if ok { + that1 = &that2 + } else { + return false + } } - if len(m.NewCustomSearchAttributeName) > 0 { - i -= len(m.NewCustomSearchAttributeName) - copy(dAtA[i:], m.NewCustomSearchAttributeName) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NewCustomSearchAttributeName))) - i-- - dAtA[i] = 0x1a + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.ExistingCustomSearchAttributeName) > 0 { - i -= len(m.ExistingCustomSearchAttributeName) - copy(dAtA[i:], m.ExistingCustomSearchAttributeName) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ExistingCustomSearchAttributeName))) - i-- - dAtA[i] = 0x12 + if this.Namespace != that1.Namespace { + return false } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if this.SinkName != that1.SinkName { + return false } - return len(dAtA) - i, nil + return true } - -func (m *RenameCustomSearchAttributeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *GetExportSinkResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *RenameCustomSearchAttributeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *RenameCustomSearchAttributeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*GetExportSinkResponse) + if !ok { + that2, ok := that.(GetExportSinkResponse) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteNamespaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RequestId) > 0 { - i -= len(m.RequestId) - copy(dAtA[i:], m.RequestId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) - i-- - dAtA[i] = 0x1a } - if len(m.ResourceVersion) > 0 { - i -= len(m.ResourceVersion) - copy(dAtA[i:], m.ResourceVersion) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) - i-- - dAtA[i] = 0x12 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa + if !this.Sink.Equal(that1.Sink) { + return false } - return len(dAtA) - i, nil + return true } - -func (m *DeleteNamespaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *DeleteExportSinkRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *DeleteNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *DeleteNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RequestStatus != nil { - { - size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + that1, ok := that.(*DeleteExportSinkRequest) + if !ok { + that2, ok := that.(DeleteExportSinkRequest) + if ok { + that1 = &that2 + } else { + return false } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { - offset -= sovRequestResponse(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ } - dAtA[offset] = uint8(v) - return base -} -func (m *CreateNamespaceRequest) Size() (n int) { - if m == nil { - return 0 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.Namespace != that1.Namespace { + return false } - if m.Spec != nil { - l = m.Spec.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + if this.SinkName != that1.SinkName { + return false } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.ResourceVersion != that1.ResourceVersion { + return false } - if len(m.UserNamespacePermissions) > 0 { - for _, e := range m.UserNamespacePermissions { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } + if this.RequestId != that1.RequestId { + return false } - return n + return true } +func (this *DeleteExportSinkResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *CreateNamespaceResponse) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*DeleteExportSinkResponse) + if !ok { + that2, ok := that.(DeleteExportSinkResponse) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return n + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false + } + return true } +func (this *UpdateExportSinkRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *ListNamespacesRequest) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*UpdateExportSinkRequest) + if !ok { + that2, ok := that.(UpdateExportSinkRequest) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - if m.PageSize != 0 { - n += 1 + sovRequestResponse(uint64(m.PageSize)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.Namespace != that1.Namespace { + return false } - return n -} - -func (m *ListNamespacesResponse) Size() (n int) { - if m == nil { - return 0 + if !this.Spec.Equal(that1.Spec) { + return false } - var l int - _ = l - if len(m.Namespaces) > 0 { - for _, s := range m.Namespaces { - l = len(s) - n += 1 + l + sovRequestResponse(uint64(l)) - } + if this.ResourceVersion != that1.ResourceVersion { + return false } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.RequestId != that1.RequestId { + return false } - return n + return true } +func (this *UpdateExportSinkResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *GetNamespacesRequest) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*UpdateExportSinkResponse) + if !ok { + that2, ok := that.(UpdateExportSinkResponse) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - if m.PageSize != 0 { - n += 1 + sovRequestResponse(uint64(m.PageSize)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - l = len(m.PageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if !this.RequestStatus.Equal(that1.RequestStatus) { + return false } - return n + return true } - -func (m *GetNamespacesResponse) Size() (n int) { - if m == nil { - return 0 +func (this *ListExportSinksRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - var l int - _ = l - if len(m.Namespaces) > 0 { - for _, e := range m.Namespaces { - l = e.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + + that1, ok := that.(*ListExportSinksRequest) + if !ok { + that2, ok := that.(ListExportSinksRequest) + if ok { + that1 = &that2 + } else { + return false } } - l = len(m.NextPageToken) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) - } - return n -} - -func (m *GetNamespaceRequest) Size() (n int) { - if m == nil { - return 0 + if that1 == nil { + return this == nil + } else if this == nil { + return false } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.Namespace != that1.Namespace { + return false } - return n -} - -func (m *GetNamespaceResponse) Size() (n int) { - if m == nil { - return 0 + if this.PageSize != that1.PageSize { + return false } - var l int - _ = l - if m.Namespace != nil { - l = m.Namespace.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + if this.PageToken != that1.PageToken { + return false } - return n + return true } +func (this *ListExportSinksResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *UpdateNamespaceRequest) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*ListExportSinksResponse) + if !ok { + that2, ok := that.(ListExportSinksResponse) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - if m.Spec != nil { - l = m.Spec.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + if len(this.SinkNames) != len(that1.SinkNames) { + return false } - l = len(m.ResourceVersion) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + for i := range this.SinkNames { + if this.SinkNames[i] != that1.SinkNames[i] { + return false + } } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.NextPageToken != that1.NextPageToken { + return false } - return n + return true } - -func (m *UpdateNamespaceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) +func (this *GetExportSinksRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return n -} -func (m *RenameCustomSearchAttributeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + that1, ok := that.(*GetExportSinksRequest) + if !ok { + that2, ok := that.(GetExportSinksRequest) + if ok { + that1 = &that2 + } else { + return false + } } - l = len(m.ExistingCustomSearchAttributeName) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - l = len(m.NewCustomSearchAttributeName) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.Namespace != that1.Namespace { + return false } - l = len(m.ResourceVersion) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.PageSize != that1.PageSize { + return false } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if this.PageToken != that1.PageToken { + return false } - return n + return true } - -func (m *RenameCustomSearchAttributeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) +func (this *GetExportSinksResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return n -} -func (m *DeleteNamespaceRequest) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*GetExportSinksResponse) + if !ok { + that2, ok := that.(GetExportSinksResponse) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - l = len(m.ResourceVersion) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if len(this.Sinks) != len(that1.Sinks) { + return false } - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + for i := range this.Sinks { + if !this.Sinks[i].Equal(that1.Sinks[i]) { + return false + } } - return n + if this.NextPageToken != that1.NextPageToken { + return false + } + return true } +func (this *ValidateExportSinkRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func (m *DeleteNamespaceResponse) Size() (n int) { - if m == nil { - return 0 + that1, ok := that.(*ValidateExportSinkRequest) + if !ok { + that2, ok := that.(ValidateExportSinkRequest) + if ok { + that1 = &that2 + } else { + return false + } } - var l int - _ = l - if m.RequestStatus != nil { - l = m.RequestStatus.Size() - n += 1 + l + sovRequestResponse(uint64(l)) + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return n + if this.Namespace != that1.Namespace { + return false + } + if !this.Spec.Equal(that1.Spec) { + return false + } + return true } +func (this *ValidateExportSinkResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } -func sovRequestResponse(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRequestResponse(x uint64) (n int) { - return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + that1, ok := that.(*ValidateExportSinkResponse) + if !ok { + that2, ok := that.(ValidateExportSinkResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true } -func (this *CreateNamespaceRequest) String() string { +func (this *CreateNamespaceRequest) GoString() string { if this == nil { return "nil" } - repeatedStringForUserNamespacePermissions := "[]*UserNamespacePermissions{" - for _, f := range this.UserNamespacePermissions { - repeatedStringForUserNamespacePermissions += strings.Replace(fmt.Sprintf("%v", f), "UserNamespacePermissions", "v11.UserNamespacePermissions", 1) + "," + s := make([]string, 0, 8) + s = append(s, "&namespaceservice.CreateNamespaceRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") } - repeatedStringForUserNamespacePermissions += "}" - s := strings.Join([]string{`&CreateNamespaceRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NamespaceSpec", "v1.NamespaceSpec", 1) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `UserNamespacePermissions:` + repeatedStringForUserNamespacePermissions + `,`, - `}`, - }, "") - return s + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + if this.UserNamespacePermissions != nil { + s = append(s, "UserNamespacePermissions: "+fmt.Sprintf("%#v", this.UserNamespacePermissions)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *CreateNamespaceResponse) String() string { +func (this *CreateNamespaceResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CreateNamespaceResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.CreateNamespaceResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *ListNamespacesRequest) String() string { +func (this *ListNamespacesRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListNamespacesRequest{`, - `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, - `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.ListNamespacesRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *ListNamespacesResponse) String() string { +func (this *ListNamespacesResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListNamespacesResponse{`, - `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, - `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.ListNamespacesResponse{") + s = append(s, "Namespaces: "+fmt.Sprintf("%#v", this.Namespaces)+",\n") + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetNamespacesRequest) String() string { +func (this *GetNamespacesRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetNamespacesRequest{`, - `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, - `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.GetNamespacesRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetNamespacesResponse) String() string { +func (this *GetNamespacesResponse) GoString() string { if this == nil { return "nil" } - repeatedStringForNamespaces := "[]*Namespace{" - for _, f := range this.Namespaces { - repeatedStringForNamespaces += strings.Replace(fmt.Sprintf("%v", f), "Namespace", "v1.Namespace", 1) + "," + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.GetNamespacesResponse{") + if this.Namespaces != nil { + s = append(s, "Namespaces: "+fmt.Sprintf("%#v", this.Namespaces)+",\n") } - repeatedStringForNamespaces += "}" - s := strings.Join([]string{`&GetNamespacesResponse{`, - `Namespaces:` + repeatedStringForNamespaces + `,`, - `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, - `}`, - }, "") - return s + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetNamespaceRequest) String() string { +func (this *GetNamespaceRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetNamespaceRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.GetNamespaceRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *GetNamespaceResponse) String() string { +func (this *GetNamespaceResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetNamespaceResponse{`, - `Namespace:` + strings.Replace(fmt.Sprintf("%v", this.Namespace), "Namespace", "v1.Namespace", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.GetNamespaceResponse{") + if this.Namespace != nil { + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateNamespaceRequest) String() string { +func (this *UpdateNamespaceRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&UpdateNamespaceRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NamespaceSpec", "v1.NamespaceSpec", 1) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 8) + s = append(s, "&namespaceservice.UpdateNamespaceRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *UpdateNamespaceResponse) String() string { +func (this *UpdateNamespaceResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&UpdateNamespaceResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.UpdateNamespaceResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *RenameCustomSearchAttributeRequest) String() string { +func (this *RenameCustomSearchAttributeRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RenameCustomSearchAttributeRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `ExistingCustomSearchAttributeName:` + fmt.Sprintf("%v", this.ExistingCustomSearchAttributeName) + `,`, - `NewCustomSearchAttributeName:` + fmt.Sprintf("%v", this.NewCustomSearchAttributeName) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 9) + s = append(s, "&namespaceservice.RenameCustomSearchAttributeRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "ExistingCustomSearchAttributeName: "+fmt.Sprintf("%#v", this.ExistingCustomSearchAttributeName)+",\n") + s = append(s, "NewCustomSearchAttributeName: "+fmt.Sprintf("%#v", this.NewCustomSearchAttributeName)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *RenameCustomSearchAttributeResponse) String() string { +func (this *RenameCustomSearchAttributeResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RenameCustomSearchAttributeResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.RenameCustomSearchAttributeResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func (this *DeleteNamespaceRequest) String() string { +func (this *DeleteNamespaceRequest) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteNamespaceRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 7) + s = append(s, "&namespaceservice.DeleteNamespaceRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") } -func (this *DeleteNamespaceResponse) String() string { +func (this *DeleteNamespaceResponse) GoString() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteNamespaceResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, - `}`, - }, "") - return s + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.DeleteNamespaceResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") } -func valueToStringRequestResponse(v interface{}) string { +func (this *CreateExportSinkRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&namespaceservice.CreateExportSinkRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CreateExportSinkResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.CreateExportSinkResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetExportSinkRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.GetExportSinkRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "SinkName: "+fmt.Sprintf("%#v", this.SinkName)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetExportSinkResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.GetExportSinkResponse{") + if this.Sink != nil { + s = append(s, "Sink: "+fmt.Sprintf("%#v", this.Sink)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeleteExportSinkRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&namespaceservice.DeleteExportSinkRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "SinkName: "+fmt.Sprintf("%#v", this.SinkName)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeleteExportSinkResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.DeleteExportSinkResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateExportSinkRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&namespaceservice.UpdateExportSinkRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateExportSinkResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&namespaceservice.UpdateExportSinkResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ListExportSinksRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&namespaceservice.ListExportSinksRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ListExportSinksResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.ListExportSinksResponse{") + s = append(s, "SinkNames: "+fmt.Sprintf("%#v", this.SinkNames)+",\n") + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetExportSinksRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&namespaceservice.GetExportSinksRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetExportSinksResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.GetExportSinksResponse{") + if this.Sinks != nil { + s = append(s, "Sinks: "+fmt.Sprintf("%#v", this.Sinks)+",\n") + } + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ValidateExportSinkRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&namespaceservice.ValidateExportSinkRequest{") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ValidateExportSinkResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&namespaceservice.ValidateExportSinkResponse{") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringRequestResponse(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *CreateNamespaceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserNamespacePermissions) > 0 { + for iNdEx := len(m.UserNamespacePermissions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UserNamespacePermissions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateNamespaceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListNamespacesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListNamespacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListNamespacesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListNamespacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespaces) > 0 { + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Namespaces[iNdEx]) + copy(dAtA[i:], m.Namespaces[iNdEx]) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetNamespacesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetNamespacesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespaces) > 0 { + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetNamespaceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetNamespaceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Namespace != nil { + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateNamespaceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateNamespaceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RenameCustomSearchAttributeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RenameCustomSearchAttributeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RenameCustomSearchAttributeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x2a + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x22 + } + if len(m.NewCustomSearchAttributeName) > 0 { + i -= len(m.NewCustomSearchAttributeName) + copy(dAtA[i:], m.NewCustomSearchAttributeName) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NewCustomSearchAttributeName))) + i-- + dAtA[i] = 0x1a + } + if len(m.ExistingCustomSearchAttributeName) > 0 { + i -= len(m.ExistingCustomSearchAttributeName) + copy(dAtA[i:], m.ExistingCustomSearchAttributeName) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ExistingCustomSearchAttributeName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RenameCustomSearchAttributeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RenameCustomSearchAttributeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RenameCustomSearchAttributeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteNamespaceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteNamespaceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateExportSinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateExportSinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateExportSinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateExportSinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateExportSinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateExportSinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExportSinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExportSinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExportSinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SinkName) > 0 { + i -= len(m.SinkName) + copy(dAtA[i:], m.SinkName) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.SinkName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExportSinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExportSinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExportSinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sink != nil { + { + size, err := m.Sink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteExportSinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteExportSinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteExportSinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if len(m.SinkName) > 0 { + i -= len(m.SinkName) + copy(dAtA[i:], m.SinkName) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.SinkName))) + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeleteExportSinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteExportSinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteExportSinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateExportSinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateExportSinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateExportSinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestId) > 0 { + i -= len(m.RequestId) + copy(dAtA[i:], m.RequestId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.RequestId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x1a + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateExportSinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateExportSinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateExportSinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RequestStatus != nil { + { + size, err := m.RequestStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListExportSinksRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListExportSinksRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListExportSinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x1a + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListExportSinksResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListExportSinksResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListExportSinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.SinkNames) > 0 { + for iNdEx := len(m.SinkNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SinkNames[iNdEx]) + copy(dAtA[i:], m.SinkNames[iNdEx]) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.SinkNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetExportSinksRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExportSinksRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExportSinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x1a + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x10 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetExportSinksResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetExportSinksResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetExportSinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sinks) > 0 { + for iNdEx := len(m.Sinks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sinks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ValidateExportSinkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateExportSinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidateExportSinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidateExportSinkResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateExportSinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidateExportSinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { + offset -= sovRequestResponse(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CreateNamespaceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if len(m.UserNamespacePermissions) > 0 { + for _, e := range m.UserNamespacePermissions { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + return n +} + +func (m *CreateNamespaceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ListNamespacesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ListNamespacesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Namespaces) > 0 { + for _, s := range m.Namespaces { + l = len(s) + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetNamespacesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetNamespacesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Namespaces) > 0 { + for _, e := range m.Namespaces { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetNamespaceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetNamespaceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Namespace != nil { + l = m.Namespace.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateNamespaceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateNamespaceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *RenameCustomSearchAttributeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ExistingCustomSearchAttributeName) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.NewCustomSearchAttributeName) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *RenameCustomSearchAttributeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteNamespaceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteNamespaceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *CreateExportSinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *CreateExportSinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetExportSinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.SinkName) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetExportSinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sink != nil { + l = m.Sink.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteExportSinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.SinkName) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *DeleteExportSinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateExportSinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *UpdateExportSinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestStatus != nil { + l = m.RequestStatus.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ListExportSinksRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ListExportSinksResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SinkNames) > 0 { + for _, s := range m.SinkNames { + l = len(s) + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetExportSinksRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetExportSinksResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Sinks) > 0 { + for _, e := range m.Sinks { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ValidateExportSinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *ValidateExportSinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + + +func sovRequestResponse(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRequestResponse(x uint64) (n int) { + return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *CreateNamespaceRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForUserNamespacePermissions := "[]*UserNamespacePermissions{" + for _, f := range this.UserNamespacePermissions { + repeatedStringForUserNamespacePermissions += strings.Replace(fmt.Sprintf("%v", f), "UserNamespacePermissions", "v11.UserNamespacePermissions", 1) + "," + } + repeatedStringForUserNamespacePermissions += "}" + s := strings.Join([]string{`&CreateNamespaceRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NamespaceSpec", "v1.NamespaceSpec", 1) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `UserNamespacePermissions:` + repeatedStringForUserNamespacePermissions + `,`, + `}`, + }, "") + return s +} +func (this *CreateNamespaceResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateNamespaceResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListNamespacesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListNamespacesRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *ListNamespacesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListNamespacesResponse{`, + `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetNamespacesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetNamespacesRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetNamespacesResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForNamespaces := "[]*Namespace{" + for _, f := range this.Namespaces { + repeatedStringForNamespaces += strings.Replace(fmt.Sprintf("%v", f), "Namespace", "v1.Namespace", 1) + "," + } + repeatedStringForNamespaces += "}" + s := strings.Join([]string{`&GetNamespacesResponse{`, + `Namespaces:` + repeatedStringForNamespaces + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetNamespaceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetNamespaceRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func (this *GetNamespaceResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetNamespaceResponse{`, + `Namespace:` + strings.Replace(fmt.Sprintf("%v", this.Namespace), "Namespace", "v1.Namespace", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateNamespaceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateNamespaceRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "NamespaceSpec", "v1.NamespaceSpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateNamespaceResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateNamespaceResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RenameCustomSearchAttributeRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RenameCustomSearchAttributeRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `ExistingCustomSearchAttributeName:` + fmt.Sprintf("%v", this.ExistingCustomSearchAttributeName) + `,`, + `NewCustomSearchAttributeName:` + fmt.Sprintf("%v", this.NewCustomSearchAttributeName) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *RenameCustomSearchAttributeResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RenameCustomSearchAttributeResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteNamespaceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteNamespaceRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteNamespaceResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteNamespaceResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateExportSinkRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateExportSinkRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ExportSinkSpec", "v13.ExportSinkSpec", 1) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *CreateExportSinkResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateExportSinkResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetExportSinkRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetExportSinkRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SinkName:` + fmt.Sprintf("%v", this.SinkName) + `,`, + `}`, + }, "") + return s +} +func (this *GetExportSinkResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetExportSinkResponse{`, + `Sink:` + strings.Replace(fmt.Sprintf("%v", this.Sink), "ExportSink", "v13.ExportSink", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteExportSinkRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteExportSinkRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SinkName:` + fmt.Sprintf("%v", this.SinkName) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteExportSinkResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteExportSinkResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateExportSinkRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateExportSinkRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ExportSinkSpec", "v13.ExportSinkSpec", 1) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateExportSinkResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateExportSinkResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v12.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListExportSinksRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListExportSinksRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *ListExportSinksResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListExportSinksResponse{`, + `SinkNames:` + fmt.Sprintf("%v", this.SinkNames) + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetExportSinksRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetExportSinksRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetExportSinksResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForSinks := "[]*ExportSink{" + for _, f := range this.Sinks { + repeatedStringForSinks += strings.Replace(fmt.Sprintf("%v", f), "ExportSink", "v13.ExportSink", 1) + "," + } + repeatedStringForSinks += "}" + s := strings.Join([]string{`&GetExportSinksResponse{`, + `Sinks:` + repeatedStringForSinks + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *ValidateExportSinkRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidateExportSinkRequest{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "ExportSinkSpec", "v13.ExportSinkSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidateExportSinkResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidateExportSinkResponse{`, + `}`, + }, "") + return s +} + +func valueToStringRequestResponse(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateNamespaceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &v1.NamespaceSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserNamespacePermissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserNamespacePermissions = append(m.UserNamespacePermissions, &v11.UserNamespacePermissions{}) + if err := m.UserNamespacePermissions[len(m.UserNamespacePermissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateNamespaceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListNamespacesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListNamespacesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNamespacesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNamespacesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNamespacesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNamespacesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, &v1.Namespace{}) + if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNamespaceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetNamespaceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Namespace == nil { + m.Namespace = &v1.Namespace{} + } + if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateNamespaceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &v1.NamespaceSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateNamespaceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RenameCustomSearchAttributeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RenameCustomSearchAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExistingCustomSearchAttributeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExistingCustomSearchAttributeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewCustomSearchAttributeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewCustomSearchAttributeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RenameCustomSearchAttributeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RenameCustomSearchAttributeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RenameCustomSearchAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2482,10 +6270,10 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateNamespaceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2522,9 +6310,9 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -2534,27 +6322,23 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Spec == nil { - m.Spec = &v1.NamespaceSpec{} - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2588,9 +6372,62 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { } m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteNamespaceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteNamespaceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserNamespacePermissions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2617,8 +6454,10 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserNamespacePermissions = append(m.UserNamespacePermissions, &v11.UserNamespacePermissions{}) - if err := m.UserNamespacePermissions[len(m.UserNamespacePermissions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2646,7 +6485,7 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { +func (m *CreateExportSinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2669,15 +6508,47 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateNamespaceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CreateExportSinkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateExportSinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2704,13 +6575,45 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v12.RequestStatus{} + if m.Spec == nil { + m.Spec = &v13.ExportSinkSpec{} } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -2735,7 +6638,7 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { +func (m *CreateExportSinkResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2758,36 +6661,17 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListNamespacesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CreateExportSinkResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateExportSinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -2797,23 +6681,27 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.PageToken = string(dAtA[iNdEx:postIndex]) + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2839,7 +6727,7 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { +func (m *GetExportSinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2862,15 +6750,15 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListNamespacesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetExportSinkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetExportSinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2898,11 +6786,11 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2930,7 +6818,7 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) + m.SinkName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2956,7 +6844,7 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetNamespacesRequest) Unmarshal(dAtA []byte) error { +func (m *GetExportSinkResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2979,36 +6867,17 @@ func (m *GetNamespacesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetNamespacesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetExportSinkResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetExportSinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) - } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sink", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3018,23 +6887,27 @@ func (m *GetNamespacesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.PageToken = string(dAtA[iNdEx:postIndex]) + if m.Sink == nil { + m.Sink = &v13.ExportSink{} + } + if err := m.Sink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3060,7 +6933,7 @@ func (m *GetNamespacesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetNamespacesResponse) Unmarshal(dAtA []byte) error { +func (m *DeleteExportSinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3083,17 +6956,17 @@ func (m *GetNamespacesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetNamespacesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteExportSinkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteExportSinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3103,29 +6976,27 @@ func (m *GetNamespacesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespaces = append(m.Namespaces, &v1.Namespace{}) - if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3153,64 +7024,43 @@ func (m *GetNamespacesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NextPageToken = string(dAtA[iNdEx:postIndex]) + m.SinkName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRequestResponse(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) } - if skippy < 0 { - return ErrInvalidLengthRequestResponse + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthRequestResponse } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetNamespaceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3238,7 +7088,7 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3264,7 +7114,7 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { +func (m *DeleteExportSinkResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3287,15 +7137,15 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetNamespaceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteExportSinkResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteExportSinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3322,10 +7172,10 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Namespace == nil { - m.Namespace = &v1.Namespace{} + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} } - if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3353,7 +7203,7 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateExportSinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3376,10 +7226,10 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UpdateNamespaceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateExportSinkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateExportSinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3444,7 +7294,7 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Spec == nil { - m.Spec = &v1.NamespaceSpec{} + m.Spec = &v13.ExportSinkSpec{} } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3538,7 +7388,96 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { +func (m *UpdateExportSinkResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateExportSinkResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateExportSinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v12.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListExportSinksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3557,21 +7496,72 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateNamespaceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListExportSinksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListExportSinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3581,27 +7571,23 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v12.RequestStatus{} - } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.PageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3627,7 +7613,7 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { +func (m *ListExportSinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3650,15 +7636,15 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RenameCustomSearchAttributeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListExportSinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RenameCustomSearchAttributeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListExportSinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SinkNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3686,11 +7672,11 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.SinkNames = append(m.SinkNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExistingCustomSearchAttributeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3718,11 +7704,64 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExistingCustomSearchAttributeName = string(dAtA[iNdEx:postIndex]) + m.NextPageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetExportSinksRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetExportSinksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetExportSinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewCustomSearchAttributeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3750,13 +7789,13 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewCustomSearchAttributeName = string(dAtA[iNdEx:postIndex]) + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) } - var stringLen uint64 + m.PageSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -3766,27 +7805,14 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.PageSize |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3814,7 +7840,7 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RequestId = string(dAtA[iNdEx:postIndex]) + m.PageToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3840,7 +7866,7 @@ func (m *RenameCustomSearchAttributeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *RenameCustomSearchAttributeResponse) Unmarshal(dAtA []byte) error { +func (m *GetExportSinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3863,15 +7889,15 @@ func (m *RenameCustomSearchAttributeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RenameCustomSearchAttributeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetExportSinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RenameCustomSearchAttributeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetExportSinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sinks", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3898,13 +7924,43 @@ func (m *RenameCustomSearchAttributeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v12.RequestStatus{} - } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Sinks = append(m.Sinks, &v13.ExportSink{}) + if err := m.Sinks[len(m.Sinks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -3929,7 +7985,7 @@ func (m *RenameCustomSearchAttributeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { +func (m *ValidateExportSinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3952,10 +8008,10 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteNamespaceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ValidateExportSinkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidateExportSinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3992,9 +8048,9 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -4004,55 +8060,27 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthRequestResponse } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRequestResponse } if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse + if m.Spec == nil { + m.Spec = &v13.ExportSinkSpec{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.RequestId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4078,7 +8106,7 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteNamespaceResponse) Unmarshal(dAtA []byte) error { +func (m *ValidateExportSinkResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4101,48 +8129,12 @@ func (m *DeleteNamespaceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteNamespaceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ValidateExportSinkResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidateExportSinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestStatus == nil { - m.RequestStatus = &v12.RequestStatus{} - } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -4167,6 +8159,7 @@ func (m *DeleteNamespaceResponse) Unmarshal(dAtA []byte) error { } return nil } + func skipRequestResponse(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -4250,4 +8243,4 @@ var ( ErrInvalidLengthRequestResponse = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRequestResponse = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRequestResponse = fmt.Errorf("proto: unexpected end of group") -) \ No newline at end of file +) diff --git a/protogen/api/namespaceservice/v1/service.pb.go b/protogen/api/namespaceservice/v1/service.pb.go index 2bc9295b..7fdc4b72 100644 --- a/protogen/api/namespaceservice/v1/service.pb.go +++ b/protogen/api/namespaceservice/v1/service.pb.go @@ -29,29 +29,38 @@ func init() { } var fileDescriptor_d746e5fd89aff5eb = []byte{ - // 351 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0xed, 0xa5, 0x83, 0x75, 0x2f, 0x45, 0x5e, 0x90, 0x8a, 0x74, 0x06, 0x24, 0x36, 0xea, - 0x50, 0x60, 0x2b, 0x0b, 0x14, 0x89, 0x05, 0x31, 0xb4, 0x62, 0x61, 0x41, 0x69, 0x7a, 0x24, 0x82, - 0x9a, 0xc6, 0xd8, 0x4e, 0x66, 0x1e, 0x81, 0x99, 0x27, 0xe0, 0x51, 0x18, 0x3b, 0x76, 0xa4, 0xee, - 0xc2, 0x82, 0xd4, 0x47, 0x40, 0xd0, 0x26, 0x4a, 0x53, 0x85, 0x5a, 0x6c, 0x51, 0xce, 0xf7, 0xff, - 0x9f, 0x75, 0x2c, 0xb3, 0x7d, 0x5f, 0x86, 0xde, 0xc8, 0x8f, 0x50, 0x4b, 0x3f, 0x40, 0x8d, 0x2a, - 0x0d, 0x03, 0xf4, 0xd2, 0x96, 0xb7, 0xfc, 0x14, 0x52, 0xc5, 0x26, 0xe6, 0x3b, 0xbe, 0x0c, 0x45, - 0x19, 0x13, 0x69, 0xab, 0x21, 0xaa, 0xf2, 0x0a, 0x1f, 0x13, 0xd4, 0xe6, 0x4e, 0xa1, 0x96, 0xf1, - 0x48, 0x2f, 0x8b, 0x8e, 0x3e, 0x6b, 0x6c, 0xfb, 0x3a, 0xc3, 0x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d5, - 0x50, 0x04, 0xc3, 0x38, 0x19, 0x78, 0x15, 0x2f, 0xbc, 0x5d, 0xfe, 0xd7, 0xaf, 0xfd, 0x3c, 0xf1, - 0xe3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x0d, 0x48, 0xd1, 0x54, 0x04, 0x00, 0x00, + // 492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0x3f, 0x6f, 0x13, 0x31, + 0x18, 0x87, 0xef, 0x16, 0x06, 0x0b, 0xda, 0xe2, 0x05, 0xa9, 0x48, 0x1e, 0x90, 0xd8, 0xa8, 0x8f, + 0xa4, 0x6c, 0x65, 0x81, 0xf2, 0x67, 0x41, 0x0c, 0x8d, 0x60, 0x60, 0x41, 0x6e, 0xfa, 0x4a, 0x18, + 0x2e, 0x39, 0x63, 0x3b, 0x27, 0x90, 0x90, 0xe0, 0x23, 0x30, 0xf3, 0x09, 0xf8, 0x10, 0x7c, 0x00, + 0xc6, 0x8c, 0x1d, 0xc9, 0x65, 0x61, 0xec, 0x47, 0x40, 0xe5, 0x62, 0xc7, 0xb1, 0xe5, 0x3b, 0xa7, + 0x5b, 0x14, 0x3f, 0xbf, 0xf7, 0x39, 0xdb, 0xef, 0xbd, 0x87, 0xee, 0x32, 0xc1, 0x8b, 0x29, 0x9b, + 0x80, 0x12, 0x6c, 0x0c, 0x0a, 0x64, 0xcd, 0xc7, 0x50, 0xd4, 0x83, 0x62, 0xf5, 0x93, 0x0a, 0x59, + 0xe9, 0x0a, 0xdf, 0x62, 0x82, 0x53, 0x1f, 0xa3, 0xf5, 0x60, 0x9f, 0xc6, 0xf2, 0x12, 0x3e, 0xce, + 0x40, 0xe9, 0xb7, 0x12, 0x94, 0xa8, 0xa6, 0x6a, 0x55, 0x68, 0xf8, 0x6b, 0x07, 0xed, 0xbd, 0x34, + 0xf8, 0xa8, 0xc5, 0x71, 0x8d, 0x76, 0x8f, 0x25, 0x30, 0x0d, 0x76, 0x05, 0x17, 0x34, 0x62, 0xa4, + 0x1e, 0x79, 0xd2, 0x7a, 0xf6, 0xef, 0xa7, 0x07, 0xda, 0x07, 0xba, 0x93, 0x61, 0x85, 0x76, 0x5e, + 0x70, 0xa5, 0xed, 0x92, 0xc2, 0x34, 0x5a, 0x65, 0x13, 0x34, 0xd6, 0x22, 0x99, 0xb7, 0x52, 0x81, + 0x6e, 0x3c, 0x07, 0xd7, 0x79, 0x10, 0xad, 0xb1, 0xc1, 0x19, 0x25, 0x4d, 0xc5, 0xad, 0x71, 0x82, + 0xae, 0xbb, 0x4b, 0xf8, 0x5e, 0x52, 0x05, 0xe3, 0x3b, 0x48, 0xa4, 0xad, 0xae, 0x46, 0xbb, 0xaf, + 0xc4, 0x59, 0xe2, 0x6d, 0x7a, 0x64, 0xff, 0x6d, 0x06, 0x01, 0xeb, 0xfd, 0x91, 0xa3, 0xdb, 0x27, + 0x70, 0x99, 0x39, 0x9e, 0x29, 0x5d, 0x4d, 0x46, 0xc0, 0xe4, 0xf8, 0xdd, 0x23, 0xad, 0x25, 0x3f, + 0x9d, 0x69, 0xc0, 0x47, 0xd1, 0x9a, 0x1d, 0x29, 0xf3, 0x40, 0x0f, 0xaf, 0x16, 0x76, 0x0f, 0xe5, + 0x09, 0x94, 0x90, 0x76, 0x28, 0x1e, 0xd9, 0x7f, 0x28, 0x41, 0xc0, 0x7a, 0x3f, 0xa3, 0xbd, 0xb6, + 0xff, 0x9f, 0x7e, 0x12, 0x95, 0xd4, 0x23, 0x3e, 0xfd, 0x80, 0xfb, 0x5e, 0x95, 0x35, 0x6a, 0xcc, + 0x83, 0x2d, 0x12, 0x5e, 0xa3, 0x3b, 0xde, 0xce, 0x4e, 0x0a, 0xa5, 0x34, 0x15, 0x77, 0x37, 0xdb, + 0x9e, 0x44, 0xd2, 0x66, 0x7d, 0xb4, 0x7f, 0xb3, 0x61, 0xc2, 0x55, 0xb7, 0x9d, 0x99, 0xa4, 0xf6, + 0xd1, 0x7e, 0x75, 0x98, 0x70, 0x5b, 0xeb, 0x72, 0xd8, 0xac, 0xd7, 0x14, 0xee, 0x1e, 0x4b, 0x0e, + 0xd9, 0xdf, 0x5a, 0x41, 0xc0, 0x7a, 0xbf, 0x22, 0xfc, 0x9a, 0x95, 0xdc, 0xdb, 0xf4, 0x30, 0x5a, + 0x29, 0x84, 0x8d, 0xfd, 0x70, 0xab, 0x8c, 0x3b, 0xbe, 0x37, 0x3a, 0xa1, 0x6b, 0x7c, 0x6f, 0x82, + 0xfd, 0xe3, 0xdb, 0xe7, 0xad, 0xf4, 0x0b, 0xba, 0xf9, 0x8c, 0xf1, 0xb2, 0xaa, 0x41, 0xae, 0x5f, + 0xe5, 0xf8, 0xbd, 0x05, 0xac, 0x51, 0x0f, 0xb7, 0x89, 0x18, 0xfb, 0xe3, 0xf7, 0xf3, 0x05, 0xc9, + 0xce, 0x17, 0x24, 0xbb, 0x58, 0x90, 0xfc, 0x5b, 0x43, 0xf2, 0x9f, 0x0d, 0xc9, 0x7f, 0x37, 0x24, + 0x9f, 0x37, 0x24, 0xff, 0xd3, 0x90, 0xfc, 0x6f, 0x43, 0xb2, 0x8b, 0x86, 0xe4, 0xdf, 0x97, 0x24, + 0x9b, 0x2f, 0x49, 0x76, 0xbe, 0x24, 0xd9, 0x9b, 0x07, 0x7a, 0x22, 0x64, 0x49, 0xc7, 0x65, 0x35, + 0x3b, 0x2b, 0x22, 0x1f, 0xec, 0x23, 0xff, 0xbf, 0xd3, 0x6b, 0xff, 0xbf, 0xd8, 0x87, 0xff, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xde, 0x54, 0xaa, 0xf1, 0x23, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -80,6 +89,20 @@ type NamespaceServiceClient interface { RenameCustomSearchAttribute(ctx context.Context, in *RenameCustomSearchAttributeRequest, opts ...grpc.CallOption) (*RenameCustomSearchAttributeResponse, error) // DeleteNamespace deletes an existing namespace on Temporal cloud. DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) + // CreateExportSink creates a new sink under the specified namespace on Temporal cloud + CreateExportSink(ctx context.Context, in *CreateExportSinkRequest, opts ...grpc.CallOption) (*CreateExportSinkResponse, error) + // GetExportSink gets the specified sink under the specified namespace on Temporal cloud + GetExportSink(ctx context.Context, in *GetExportSinkRequest, opts ...grpc.CallOption) (*GetExportSinkResponse, error) + // DeleteExportSink deletes the specified sink under the specified namespace on Temporal cloud + DeleteExportSink(ctx context.Context, in *DeleteExportSinkRequest, opts ...grpc.CallOption) (*DeleteExportSinkResponse, error) + // UpdateExportSink updates the specified sink under the specified namespace on Temporal Cloud + UpdateExportSink(ctx context.Context, in *UpdateExportSinkRequest, opts ...grpc.CallOption) (*UpdateExportSinkResponse, error) + // ListExportSinks lists the export sinks under the specified namespace on Temporal Cloud + ListExportSinks(ctx context.Context, in *ListExportSinksRequest, opts ...grpc.CallOption) (*ListExportSinksResponse, error) + // ValidateExportSink that could write test file to sink on Temporal Cloud + ValidateExportSink(ctx context.Context, in *ValidateExportSinkRequest, opts ...grpc.CallOption) (*ValidateExportSinkResponse, error) + // GetExportSinks retrieves the export sinks under the specified namespace on Temporal Cloud + GetExportSinks(ctx context.Context, in *GetExportSinksRequest, opts ...grpc.CallOption) (*GetExportSinksResponse, error) } type namespaceServiceClient struct { @@ -153,6 +176,69 @@ func (c *namespaceServiceClient) DeleteNamespace(ctx context.Context, in *Delete return out, nil } +func (c *namespaceServiceClient) CreateExportSink(ctx context.Context, in *CreateExportSinkRequest, opts ...grpc.CallOption) (*CreateExportSinkResponse, error) { + out := new(CreateExportSinkResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/CreateExportSink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) GetExportSink(ctx context.Context, in *GetExportSinkRequest, opts ...grpc.CallOption) (*GetExportSinkResponse, error) { + out := new(GetExportSinkResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/GetExportSink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) DeleteExportSink(ctx context.Context, in *DeleteExportSinkRequest, opts ...grpc.CallOption) (*DeleteExportSinkResponse, error) { + out := new(DeleteExportSinkResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/DeleteExportSink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) UpdateExportSink(ctx context.Context, in *UpdateExportSinkRequest, opts ...grpc.CallOption) (*UpdateExportSinkResponse, error) { + out := new(UpdateExportSinkResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/UpdateExportSink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) ListExportSinks(ctx context.Context, in *ListExportSinksRequest, opts ...grpc.CallOption) (*ListExportSinksResponse, error) { + out := new(ListExportSinksResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/ListExportSinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) ValidateExportSink(ctx context.Context, in *ValidateExportSinkRequest, opts ...grpc.CallOption) (*ValidateExportSinkResponse, error) { + out := new(ValidateExportSinkResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/ValidateExportSink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) GetExportSinks(ctx context.Context, in *GetExportSinksRequest, opts ...grpc.CallOption) (*GetExportSinksResponse, error) { + out := new(GetExportSinksResponse) + err := c.cc.Invoke(ctx, "/api.namespaceservice.v1.NamespaceService/GetExportSinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NamespaceServiceServer is the server API for NamespaceService service. type NamespaceServiceServer interface { // CreateNamespace creates a new namespace on Temporal cloud. @@ -169,6 +255,20 @@ type NamespaceServiceServer interface { RenameCustomSearchAttribute(context.Context, *RenameCustomSearchAttributeRequest) (*RenameCustomSearchAttributeResponse, error) // DeleteNamespace deletes an existing namespace on Temporal cloud. DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) + // CreateExportSink creates a new sink under the specified namespace on Temporal cloud + CreateExportSink(context.Context, *CreateExportSinkRequest) (*CreateExportSinkResponse, error) + // GetExportSink gets the specified sink under the specified namespace on Temporal cloud + GetExportSink(context.Context, *GetExportSinkRequest) (*GetExportSinkResponse, error) + // DeleteExportSink deletes the specified sink under the specified namespace on Temporal cloud + DeleteExportSink(context.Context, *DeleteExportSinkRequest) (*DeleteExportSinkResponse, error) + // UpdateExportSink updates the specified sink under the specified namespace on Temporal Cloud + UpdateExportSink(context.Context, *UpdateExportSinkRequest) (*UpdateExportSinkResponse, error) + // ListExportSinks lists the export sinks under the specified namespace on Temporal Cloud + ListExportSinks(context.Context, *ListExportSinksRequest) (*ListExportSinksResponse, error) + // ValidateExportSink that could write test file to sink on Temporal Cloud + ValidateExportSink(context.Context, *ValidateExportSinkRequest) (*ValidateExportSinkResponse, error) + // GetExportSinks retrieves the export sinks under the specified namespace on Temporal Cloud + GetExportSinks(context.Context, *GetExportSinksRequest) (*GetExportSinksResponse, error) } // UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations. @@ -196,6 +296,27 @@ func (*UnimplementedNamespaceServiceServer) RenameCustomSearchAttribute(ctx cont func (*UnimplementedNamespaceServiceServer) DeleteNamespace(ctx context.Context, req *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespace not implemented") } +func (*UnimplementedNamespaceServiceServer) CreateExportSink(ctx context.Context, req *CreateExportSinkRequest) (*CreateExportSinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateExportSink not implemented") +} +func (*UnimplementedNamespaceServiceServer) GetExportSink(ctx context.Context, req *GetExportSinkRequest) (*GetExportSinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExportSink not implemented") +} +func (*UnimplementedNamespaceServiceServer) DeleteExportSink(ctx context.Context, req *DeleteExportSinkRequest) (*DeleteExportSinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExportSink not implemented") +} +func (*UnimplementedNamespaceServiceServer) UpdateExportSink(ctx context.Context, req *UpdateExportSinkRequest) (*UpdateExportSinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateExportSink not implemented") +} +func (*UnimplementedNamespaceServiceServer) ListExportSinks(ctx context.Context, req *ListExportSinksRequest) (*ListExportSinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExportSinks not implemented") +} +func (*UnimplementedNamespaceServiceServer) ValidateExportSink(ctx context.Context, req *ValidateExportSinkRequest) (*ValidateExportSinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateExportSink not implemented") +} +func (*UnimplementedNamespaceServiceServer) GetExportSinks(ctx context.Context, req *GetExportSinksRequest) (*GetExportSinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExportSinks not implemented") +} func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer) { s.RegisterService(&_NamespaceService_serviceDesc, srv) @@ -327,6 +448,132 @@ func _NamespaceService_DeleteNamespace_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _NamespaceService_CreateExportSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateExportSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).CreateExportSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/CreateExportSink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).CreateExportSink(ctx, req.(*CreateExportSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_GetExportSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExportSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).GetExportSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/GetExportSink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).GetExportSink(ctx, req.(*GetExportSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_DeleteExportSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExportSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).DeleteExportSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/DeleteExportSink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).DeleteExportSink(ctx, req.(*DeleteExportSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_UpdateExportSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateExportSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).UpdateExportSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/UpdateExportSink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).UpdateExportSink(ctx, req.(*UpdateExportSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_ListExportSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExportSinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ListExportSinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/ListExportSinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ListExportSinks(ctx, req.(*ListExportSinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_ValidateExportSink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateExportSinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ValidateExportSink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/ValidateExportSink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ValidateExportSink(ctx, req.(*ValidateExportSinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_GetExportSinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExportSinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).GetExportSinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.namespaceservice.v1.NamespaceService/GetExportSinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).GetExportSinks(ctx, req.(*GetExportSinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _NamespaceService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.namespaceservice.v1.NamespaceService", HandlerType: (*NamespaceServiceServer)(nil), @@ -359,7 +606,35 @@ var _NamespaceService_serviceDesc = grpc.ServiceDesc{ MethodName: "DeleteNamespace", Handler: _NamespaceService_DeleteNamespace_Handler, }, + { + MethodName: "CreateExportSink", + Handler: _NamespaceService_CreateExportSink_Handler, + }, + { + MethodName: "GetExportSink", + Handler: _NamespaceService_GetExportSink_Handler, + }, + { + MethodName: "DeleteExportSink", + Handler: _NamespaceService_DeleteExportSink_Handler, + }, + { + MethodName: "UpdateExportSink", + Handler: _NamespaceService_UpdateExportSink_Handler, + }, + { + MethodName: "ListExportSinks", + Handler: _NamespaceService_ListExportSinks_Handler, + }, + { + MethodName: "ValidateExportSink", + Handler: _NamespaceService_ValidateExportSink_Handler, + }, + { + MethodName: "GetExportSinks", + Handler: _NamespaceService_GetExportSinks_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/namespaceservice/v1/service.proto", -} \ No newline at end of file +} diff --git a/protogen/api/request/v1/message.pb.go b/protogen/api/request/v1/message.pb.go index 9c50b162..ffd3a620 100644 --- a/protogen/api/request/v1/message.pb.go +++ b/protogen/api/request/v1/message.pb.go @@ -5,15 +5,14 @@ package request import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" reflect "reflect" strconv "strconv" strings "strings" - - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protogen/api/requestservice/v1/request_response.pb.go b/protogen/api/requestservice/v1/request_response.pb.go index 2ac47454..cc2a955d 100644 --- a/protogen/api/requestservice/v1/request_response.pb.go +++ b/protogen/api/requestservice/v1/request_response.pb.go @@ -5,13 +5,12 @@ package requestservice import ( fmt "fmt" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" reflect "reflect" strings "strings" - - proto "github.com/gogo/protobuf/proto" v1 "github.com/temporalio/tcld/protogen/api/request/v1" ) @@ -114,9 +113,398 @@ func (m *GetRequestStatusResponse) GetRequestStatus() *v1.RequestStatus { return nil } +type GetRequestStatusesRequest struct { + // the requested size of the page to retrive, defaults to 10 + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // whether to list only open requests + // if set, will only return requests in pending and in-progress states + // if not set, will return all known requests + Open bool `protobuf:"varint,3,opt,name=open,proto3" json:"open,omitempty"` +} + +func (m *GetRequestStatusesRequest) Reset() { *m = GetRequestStatusesRequest{} } +func (*GetRequestStatusesRequest) ProtoMessage() {} +func (*GetRequestStatusesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{2} +} +func (m *GetRequestStatusesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesRequest.Merge(m, src) +} +func (m *GetRequestStatusesRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesRequest proto.InternalMessageInfo + +func (m *GetRequestStatusesRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *GetRequestStatusesRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +func (m *GetRequestStatusesRequest) GetOpen() bool { + if m != nil { + return m.Open + } + return false +} + +type GetRequestStatusesResponse struct { + // the request statuses + // the requests will be ordered by the start_time, newest first + RequestStatuses []*v1.RequestStatus `protobuf:"bytes,1,rep,name=request_statuses,json=requestStatuses,proto3" json:"request_statuses,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetRequestStatusesResponse) Reset() { *m = GetRequestStatusesResponse{} } +func (*GetRequestStatusesResponse) ProtoMessage() {} +func (*GetRequestStatusesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{3} +} +func (m *GetRequestStatusesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesResponse.Merge(m, src) +} +func (m *GetRequestStatusesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesResponse proto.InternalMessageInfo + +func (m *GetRequestStatusesResponse) GetRequestStatuses() []*v1.RequestStatus { + if m != nil { + return m.RequestStatuses + } + return nil +} + +func (m *GetRequestStatusesResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +type GetRequestStatusesForUserRequest struct { + // the requested size of the page to retrive, defaults to 10 + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // the id of the user + UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + // or the email address of the user + UserEmail string `protobuf:"bytes,4,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // whether to list only open requests + // if set, will only return requests in pending and in-progress states started by the user + // if not set, will return all known requests started by the user + Open bool `protobuf:"varint,5,opt,name=open,proto3" json:"open,omitempty"` +} + +func (m *GetRequestStatusesForUserRequest) Reset() { *m = GetRequestStatusesForUserRequest{} } +func (*GetRequestStatusesForUserRequest) ProtoMessage() {} +func (*GetRequestStatusesForUserRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{4} +} +func (m *GetRequestStatusesForUserRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesForUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesForUserRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesForUserRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesForUserRequest.Merge(m, src) +} +func (m *GetRequestStatusesForUserRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesForUserRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesForUserRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesForUserRequest proto.InternalMessageInfo + +func (m *GetRequestStatusesForUserRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *GetRequestStatusesForUserRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +func (m *GetRequestStatusesForUserRequest) GetUserId() string { + if m != nil { + return m.UserId + } + return "" +} + +func (m *GetRequestStatusesForUserRequest) GetUserEmail() string { + if m != nil { + return m.UserEmail + } + return "" +} + +func (m *GetRequestStatusesForUserRequest) GetOpen() bool { + if m != nil { + return m.Open + } + return false +} + +type GetRequestStatusesForUserResponse struct { + // the request statuses + // the requests will be ordered by the start_time, newest first + RequestStatuses []*v1.RequestStatus `protobuf:"bytes,1,rep,name=request_statuses,json=requestStatuses,proto3" json:"request_statuses,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetRequestStatusesForUserResponse) Reset() { *m = GetRequestStatusesForUserResponse{} } +func (*GetRequestStatusesForUserResponse) ProtoMessage() {} +func (*GetRequestStatusesForUserResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{5} +} +func (m *GetRequestStatusesForUserResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesForUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesForUserResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesForUserResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesForUserResponse.Merge(m, src) +} +func (m *GetRequestStatusesForUserResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesForUserResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesForUserResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesForUserResponse proto.InternalMessageInfo + +func (m *GetRequestStatusesForUserResponse) GetRequestStatuses() []*v1.RequestStatus { + if m != nil { + return m.RequestStatuses + } + return nil +} + +func (m *GetRequestStatusesForUserResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +type GetRequestStatusesForNamespaceRequest struct { + // the requested size of the page to retrive, defaults to 10 + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // the page token + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // the namespace + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // whether to list only open requests + // if set, will only return requests in pending and in-progress states for the namespace + // if not set, will return all known requests for the namespace + Open bool `protobuf:"varint,4,opt,name=open,proto3" json:"open,omitempty"` +} + +func (m *GetRequestStatusesForNamespaceRequest) Reset() { *m = GetRequestStatusesForNamespaceRequest{} } +func (*GetRequestStatusesForNamespaceRequest) ProtoMessage() {} +func (*GetRequestStatusesForNamespaceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{6} +} +func (m *GetRequestStatusesForNamespaceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesForNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesForNamespaceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesForNamespaceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesForNamespaceRequest.Merge(m, src) +} +func (m *GetRequestStatusesForNamespaceRequest) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesForNamespaceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesForNamespaceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesForNamespaceRequest proto.InternalMessageInfo + +func (m *GetRequestStatusesForNamespaceRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *GetRequestStatusesForNamespaceRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +func (m *GetRequestStatusesForNamespaceRequest) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *GetRequestStatusesForNamespaceRequest) GetOpen() bool { + if m != nil { + return m.Open + } + return false +} + +type GetRequestStatusesForNamespaceResponse struct { + // the request statuses + // the requests will be ordered by the start_time, newest first + RequestStatuses []*v1.RequestStatus `protobuf:"bytes,1,rep,name=request_statuses,json=requestStatuses,proto3" json:"request_statuses,omitempty"` + // the next page's token + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (m *GetRequestStatusesForNamespaceResponse) Reset() { + *m = GetRequestStatusesForNamespaceResponse{} +} +func (*GetRequestStatusesForNamespaceResponse) ProtoMessage() {} +func (*GetRequestStatusesForNamespaceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9fd9a82732f91270, []int{7} +} +func (m *GetRequestStatusesForNamespaceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRequestStatusesForNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRequestStatusesForNamespaceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRequestStatusesForNamespaceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRequestStatusesForNamespaceResponse.Merge(m, src) +} +func (m *GetRequestStatusesForNamespaceResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRequestStatusesForNamespaceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRequestStatusesForNamespaceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRequestStatusesForNamespaceResponse proto.InternalMessageInfo + +func (m *GetRequestStatusesForNamespaceResponse) GetRequestStatuses() []*v1.RequestStatus { + if m != nil { + return m.RequestStatuses + } + return nil +} + +func (m *GetRequestStatusesForNamespaceResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + func init() { proto.RegisterType((*GetRequestStatusRequest)(nil), "api.requestservice.v1.GetRequestStatusRequest") proto.RegisterType((*GetRequestStatusResponse)(nil), "api.requestservice.v1.GetRequestStatusResponse") + proto.RegisterType((*GetRequestStatusesRequest)(nil), "api.requestservice.v1.GetRequestStatusesRequest") + proto.RegisterType((*GetRequestStatusesResponse)(nil), "api.requestservice.v1.GetRequestStatusesResponse") + proto.RegisterType((*GetRequestStatusesForUserRequest)(nil), "api.requestservice.v1.GetRequestStatusesForUserRequest") + proto.RegisterType((*GetRequestStatusesForUserResponse)(nil), "api.requestservice.v1.GetRequestStatusesForUserResponse") + proto.RegisterType((*GetRequestStatusesForNamespaceRequest)(nil), "api.requestservice.v1.GetRequestStatusesForNamespaceRequest") + proto.RegisterType((*GetRequestStatusesForNamespaceResponse)(nil), "api.requestservice.v1.GetRequestStatusesForNamespaceResponse") } func init() { @@ -124,23 +512,37 @@ func init() { } var fileDescriptor_9fd9a82732f91270 = []byte{ - // 254 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x49, 0x2c, 0xc8, 0xd4, - 0x2f, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x29, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2f, - 0x33, 0x84, 0x89, 0xc4, 0x17, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0xea, 0x15, 0x14, 0xe5, - 0x97, 0xe4, 0x0b, 0x89, 0x26, 0x16, 0x64, 0xea, 0xa1, 0xaa, 0xd6, 0x2b, 0x33, 0x94, 0x92, 0x41, - 0x32, 0x04, 0xa4, 0x3b, 0x37, 0xb5, 0xb8, 0x38, 0x31, 0x1d, 0xaa, 0x49, 0xc9, 0x8e, 0x4b, 0xdc, - 0x3d, 0xb5, 0x24, 0x08, 0x22, 0x1d, 0x5c, 0x92, 0x58, 0x52, 0x5a, 0x0c, 0xe5, 0x08, 0xc9, 0x72, - 0x71, 0xc1, 0x6c, 0xca, 0x4c, 0x91, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x84, 0x8a, 0x78, - 0xa6, 0x78, 0xb1, 0x70, 0x30, 0x0a, 0x30, 0x29, 0x25, 0x70, 0x49, 0x60, 0xea, 0x87, 0x38, 0x4b, - 0xc8, 0x85, 0x8b, 0x0f, 0x66, 0x40, 0x31, 0x58, 0x46, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, - 0x56, 0x0f, 0xc9, 0xa5, 0x7a, 0x65, 0x86, 0x7a, 0xa8, 0xda, 0x79, 0x8b, 0x90, 0xb9, 0x4e, 0x69, - 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, - 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, - 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0x4a, 0x72, 0x0b, 0x8a, 0x72, 0xf4, 0x92, - 0x73, 0xf2, 0x4b, 0x53, 0xf4, 0xb1, 0x06, 0xa3, 0x35, 0xaa, 0x48, 0x12, 0x1b, 0x38, 0x40, 0x8c, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0xeb, 0xf5, 0x3c, 0x75, 0x01, 0x00, 0x00, + // 468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x3d, 0x6f, 0xd3, 0x50, + 0x14, 0xf5, 0x6d, 0xd2, 0x92, 0x5c, 0x54, 0x5a, 0x59, 0x42, 0x35, 0xa5, 0x7d, 0x0a, 0x96, 0x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, 0xb3, 0x09, + 0x83, 0xcf, 0x29, 0x83, 0xef, 0x29, 0x83, 0x9f, 0x29, 0x83, 0x71, 0xca, 0xe0, 0x57, 0xca, 0xe0, + 0x77, 0xca, 0xac, 0xb3, 0x94, 0xc1, 0xd7, 0x29, 0xb3, 0xc6, 0x53, 0x66, 0x9d, 0x4e, 0x99, 0xf5, + 0xf6, 0xae, 0x0e, 0x84, 0x1c, 0x79, 0x83, 0x51, 0x14, 0x0f, 0x3b, 0x4b, 0x9f, 0xaf, 0x07, 0x55, + 0xe4, 0xfd, 0x5a, 0xf6, 0x10, 0xdd, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x99, 0xd2, 0x0a, + 0xed, 0x04, 0x00, 0x00, } func (this *GetRequestStatusRequest) Equal(that interface{}) bool { @@ -191,38 +593,311 @@ func (this *GetRequestStatusResponse) Equal(that interface{}) bool { } return true } -func (this *GetRequestStatusRequest) GoString() string { - if this == nil { - return "nil" +func (this *GetRequestStatusesRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil } - s := make([]string, 0, 5) - s = append(s, "&requestservice.GetRequestStatusRequest{") - s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetRequestStatusResponse) GoString() string { - if this == nil { - return "nil" + + that1, ok := that.(*GetRequestStatusesRequest) + if !ok { + that2, ok := that.(GetRequestStatusesRequest) + if ok { + that1 = &that2 + } else { + return false + } } - s := make([]string, 0, 5) - s = append(s, "&requestservice.GetRequestStatusResponse{") - if this.RequestStatus != nil { - s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + if that1 == nil { + return this == nil + } else if this == nil { + return false } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringRequestResponse(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + if this.PageSize != that1.PageSize { + return false } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *GetRequestStatusRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() + if this.PageToken != that1.PageToken { + return false + } + if this.Open != that1.Open { + return false + } + return true +} +func (this *GetRequestStatusesResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRequestStatusesResponse) + if !ok { + that2, ok := that.(GetRequestStatusesResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.RequestStatuses) != len(that1.RequestStatuses) { + return false + } + for i := range this.RequestStatuses { + if !this.RequestStatuses[i].Equal(that1.RequestStatuses[i]) { + return false + } + } + if this.NextPageToken != that1.NextPageToken { + return false + } + return true +} +func (this *GetRequestStatusesForUserRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRequestStatusesForUserRequest) + if !ok { + that2, ok := that.(GetRequestStatusesForUserRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.PageSize != that1.PageSize { + return false + } + if this.PageToken != that1.PageToken { + return false + } + if this.UserId != that1.UserId { + return false + } + if this.UserEmail != that1.UserEmail { + return false + } + if this.Open != that1.Open { + return false + } + return true +} +func (this *GetRequestStatusesForUserResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRequestStatusesForUserResponse) + if !ok { + that2, ok := that.(GetRequestStatusesForUserResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.RequestStatuses) != len(that1.RequestStatuses) { + return false + } + for i := range this.RequestStatuses { + if !this.RequestStatuses[i].Equal(that1.RequestStatuses[i]) { + return false + } + } + if this.NextPageToken != that1.NextPageToken { + return false + } + return true +} +func (this *GetRequestStatusesForNamespaceRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRequestStatusesForNamespaceRequest) + if !ok { + that2, ok := that.(GetRequestStatusesForNamespaceRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.PageSize != that1.PageSize { + return false + } + if this.PageToken != that1.PageToken { + return false + } + if this.Namespace != that1.Namespace { + return false + } + if this.Open != that1.Open { + return false + } + return true +} +func (this *GetRequestStatusesForNamespaceResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GetRequestStatusesForNamespaceResponse) + if !ok { + that2, ok := that.(GetRequestStatusesForNamespaceResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.RequestStatuses) != len(that1.RequestStatuses) { + return false + } + for i := range this.RequestStatuses { + if !this.RequestStatuses[i].Equal(that1.RequestStatuses[i]) { + return false + } + } + if this.NextPageToken != that1.NextPageToken { + return false + } + return true +} +func (this *GetRequestStatusRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&requestservice.GetRequestStatusRequest{") + s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&requestservice.GetRequestStatusResponse{") + if this.RequestStatus != nil { + s = append(s, "RequestStatus: "+fmt.Sprintf("%#v", this.RequestStatus)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&requestservice.GetRequestStatusesRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "Open: "+fmt.Sprintf("%#v", this.Open)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&requestservice.GetRequestStatusesResponse{") + if this.RequestStatuses != nil { + s = append(s, "RequestStatuses: "+fmt.Sprintf("%#v", this.RequestStatuses)+",\n") + } + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesForUserRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&requestservice.GetRequestStatusesForUserRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "UserId: "+fmt.Sprintf("%#v", this.UserId)+",\n") + s = append(s, "UserEmail: "+fmt.Sprintf("%#v", this.UserEmail)+",\n") + s = append(s, "Open: "+fmt.Sprintf("%#v", this.Open)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesForUserResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&requestservice.GetRequestStatusesForUserResponse{") + if this.RequestStatuses != nil { + s = append(s, "RequestStatuses: "+fmt.Sprintf("%#v", this.RequestStatuses)+",\n") + } + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesForNamespaceRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&requestservice.GetRequestStatusesForNamespaceRequest{") + s = append(s, "PageSize: "+fmt.Sprintf("%#v", this.PageSize)+",\n") + s = append(s, "PageToken: "+fmt.Sprintf("%#v", this.PageToken)+",\n") + s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") + s = append(s, "Open: "+fmt.Sprintf("%#v", this.Open)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetRequestStatusesForNamespaceResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&requestservice.GetRequestStatusesForNamespaceResponse{") + if this.RequestStatuses != nil { + s = append(s, "RequestStatuses: "+fmt.Sprintf("%#v", this.RequestStatuses)+",\n") + } + s = append(s, "NextPageToken: "+fmt.Sprintf("%#v", this.NextPageToken)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringRequestResponse(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *GetRequestStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { @@ -286,78 +961,1303 @@ func (m *GetRequestStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { - offset -= sovRequestResponse(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *GetRequestStatusesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *GetRequestStatusRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *GetRequestStatusesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.RequestId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) + if m.Open { + i-- + if m.Open { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - return n + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *GetRequestStatusResponse) Size() (n int) { - if m == nil { - return 0 +func (m *GetRequestStatusesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l + return dAtA[:n], nil +} + +func (m *GetRequestStatusesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.RequestStatuses) > 0 { + for iNdEx := len(m.RequestStatuses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RequestStatuses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetRequestStatusesForUserRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequestStatusesForUserRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesForUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Open { + i-- + if m.Open { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x22 + } + if len(m.UserId) > 0 { + i -= len(m.UserId) + copy(dAtA[i:], m.UserId) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.UserId))) + i-- + dAtA[i] = 0x1a + } + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetRequestStatusesForUserResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequestStatusesForUserResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesForUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.RequestStatuses) > 0 { + for iNdEx := len(m.RequestStatuses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RequestStatuses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetRequestStatusesForNamespaceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequestStatusesForNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesForNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Open { + i-- + if m.Open { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + } + if len(m.PageToken) > 0 { + i -= len(m.PageToken) + copy(dAtA[i:], m.PageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.PageToken))) + i-- + dAtA[i] = 0x12 + } + if m.PageSize != 0 { + i = encodeVarintRequestResponse(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetRequestStatusesForNamespaceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRequestStatusesForNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequestStatusesForNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextPageToken) > 0 { + i -= len(m.NextPageToken) + copy(dAtA[i:], m.NextPageToken) + i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NextPageToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.RequestStatuses) > 0 { + for iNdEx := len(m.RequestStatuses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RequestStatuses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestResponse(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintRequestResponse(dAtA []byte, offset int, v uint64) int { + offset -= sovRequestResponse(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetRequestStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RequestId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRequestStatusResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l if m.RequestStatus != nil { l = m.RequestStatus.Size() n += 1 + l + sovRequestResponse(uint64(l)) } - return n -} + return n +} + +func (m *GetRequestStatusesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Open { + n += 2 + } + return n +} + +func (m *GetRequestStatusesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RequestStatuses) > 0 { + for _, e := range m.RequestStatuses { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRequestStatusesForUserRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.UserId) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Open { + n += 2 + } + return n +} + +func (m *GetRequestStatusesForUserResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RequestStatuses) > 0 { + for _, e := range m.RequestStatuses { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func (m *GetRequestStatusesForNamespaceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PageSize != 0 { + n += 1 + sovRequestResponse(uint64(m.PageSize)) + } + l = len(m.PageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + if m.Open { + n += 2 + } + return n +} + +func (m *GetRequestStatusesForNamespaceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RequestStatuses) > 0 { + for _, e := range m.RequestStatuses { + l = e.Size() + n += 1 + l + sovRequestResponse(uint64(l)) + } + } + l = len(m.NextPageToken) + if l > 0 { + n += 1 + l + sovRequestResponse(uint64(l)) + } + return n +} + +func sovRequestResponse(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRequestResponse(x uint64) (n int) { + return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GetRequestStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRequestStatusRequest{`, + `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRequestStatusResponse{`, + `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v1.RequestStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRequestStatusesRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `Open:` + fmt.Sprintf("%v", this.Open) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequestStatuses := "[]*RequestStatus{" + for _, f := range this.RequestStatuses { + repeatedStringForRequestStatuses += strings.Replace(fmt.Sprintf("%v", f), "RequestStatus", "v1.RequestStatus", 1) + "," + } + repeatedStringForRequestStatuses += "}" + s := strings.Join([]string{`&GetRequestStatusesResponse{`, + `RequestStatuses:` + repeatedStringForRequestStatuses + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesForUserRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRequestStatusesForUserRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `UserId:` + fmt.Sprintf("%v", this.UserId) + `,`, + `UserEmail:` + fmt.Sprintf("%v", this.UserEmail) + `,`, + `Open:` + fmt.Sprintf("%v", this.Open) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesForUserResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequestStatuses := "[]*RequestStatus{" + for _, f := range this.RequestStatuses { + repeatedStringForRequestStatuses += strings.Replace(fmt.Sprintf("%v", f), "RequestStatus", "v1.RequestStatus", 1) + "," + } + repeatedStringForRequestStatuses += "}" + s := strings.Join([]string{`&GetRequestStatusesForUserResponse{`, + `RequestStatuses:` + repeatedStringForRequestStatuses + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesForNamespaceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetRequestStatusesForNamespaceRequest{`, + `PageSize:` + fmt.Sprintf("%v", this.PageSize) + `,`, + `PageToken:` + fmt.Sprintf("%v", this.PageToken) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Open:` + fmt.Sprintf("%v", this.Open) + `,`, + `}`, + }, "") + return s +} +func (this *GetRequestStatusesForNamespaceResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequestStatuses := "[]*RequestStatus{" + for _, f := range this.RequestStatuses { + repeatedStringForRequestStatuses += strings.Replace(fmt.Sprintf("%v", f), "RequestStatus", "v1.RequestStatus", 1) + "," + } + repeatedStringForRequestStatuses += "}" + s := strings.Join([]string{`&GetRequestStatusesForNamespaceResponse{`, + `RequestStatuses:` + repeatedStringForRequestStatuses + `,`, + `NextPageToken:` + fmt.Sprintf("%v", this.NextPageToken) + `,`, + `}`, + }, "") + return s +} +func valueToStringRequestResponse(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetRequestStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequestStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestStatus == nil { + m.RequestStatus = &v1.RequestStatus{} + } + if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequestStatusesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Open", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Open = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequestStatusesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestStatuses = append(m.RequestStatuses, &v1.RequestStatus{}) + if err := m.RequestStatuses[len(m.RequestStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRequestStatusesForUserRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusesForUserRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusesForUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Open", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Open = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovRequestResponse(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRequestResponse(x uint64) (n int) { - return sovRequestResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *GetRequestStatusRequest) String() string { - if this == nil { - return "nil" + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&GetRequestStatusRequest{`, - `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, - `}`, - }, "") - return s + return nil } -func (this *GetRequestStatusResponse) String() string { - if this == nil { - return "nil" +func (m *GetRequestStatusesForUserResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRequestStatusesForUserResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRequestStatusesForUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestStatuses = append(m.RequestStatuses, &v1.RequestStatus{}) + if err := m.RequestStatuses[len(m.RequestStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRequestResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&GetRequestStatusResponse{`, - `RequestStatus:` + strings.Replace(fmt.Sprintf("%v", this.RequestStatus), "RequestStatus", "v1.RequestStatus", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringRequestResponse(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *GetRequestStatusRequest) Unmarshal(dAtA []byte) error { +func (m *GetRequestStatusesForNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -380,15 +2280,34 @@ func (m *GetRequestStatusRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRequestStatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetRequestStatusesForNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRequestStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetRequestStatusesForNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PageToken", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -416,8 +2335,60 @@ func (m *GetRequestStatusRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RequestId = string(dAtA[iNdEx:postIndex]) + m.PageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Open", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Open = bool(v != 0) default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) @@ -442,7 +2413,7 @@ func (m *GetRequestStatusRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetRequestStatusResponse) Unmarshal(dAtA []byte) error { +func (m *GetRequestStatusesForNamespaceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -465,15 +2436,15 @@ func (m *GetRequestStatusResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRequestStatusResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetRequestStatusesForNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRequestStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetRequestStatusesForNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RequestStatuses", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -500,13 +2471,43 @@ func (m *GetRequestStatusResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RequestStatus == nil { - m.RequestStatus = &v1.RequestStatus{} - } - if err := m.RequestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RequestStatuses = append(m.RequestStatuses, &v1.RequestStatus{}) + if err := m.RequestStatuses[len(m.RequestStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRequestResponse + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestResponse + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) diff --git a/protogen/api/requestservice/v1/service.pb.go b/protogen/api/requestservice/v1/service.pb.go index 90c8feb0..d47370f5 100644 --- a/protogen/api/requestservice/v1/service.pb.go +++ b/protogen/api/requestservice/v1/service.pb.go @@ -6,12 +6,11 @@ package requestservice import ( context "context" fmt "fmt" - math "math" - proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -30,26 +29,30 @@ func init() { } var fileDescriptor_a6f283241a216f38 = []byte{ - // 209 bytes of a gzipped FileDescriptorProto + // 288 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0x2c, 0xc8, 0xd4, 0x2f, 0x4a, 0x2d, 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, + 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x83, 0x92, 0xdc, 0x82, 0xa2, 0x1c, + 0xbd, 0xe4, 0x9c, 0xfc, 0xd2, 0x14, 0x7d, 0xac, 0x69, 0xd5, 0x1a, 0x55, 0x24, 0x89, 0x0d, 0x9c, + 0x54, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xe7, 0xb3, 0xf8, 0x16, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -61,13 +64,19 @@ const _ = grpc.SupportPackageIsVersion4 type RequestServiceClient interface { // GetRequestStatus get the status of a request. GetRequestStatus(ctx context.Context, in *GetRequestStatusRequest, opts ...grpc.CallOption) (*GetRequestStatusResponse, error) + // GetRequestStatuses lists the statuses of all known requests. + GetRequestStatuses(ctx context.Context, in *GetRequestStatusesRequest, opts ...grpc.CallOption) (*GetRequestStatusesResponse, error) + // GetRequestStatuses lists the statuses started by a user. + GetRequestStatusesForUser(ctx context.Context, in *GetRequestStatusesForUserRequest, opts ...grpc.CallOption) (*GetRequestStatusesForUserResponse, error) + // GetRequestStatuses lists the statuses of requests started for a namespace. + GetRequestStatusesForNamespace(ctx context.Context, in *GetRequestStatusesForNamespaceRequest, opts ...grpc.CallOption) (*GetRequestStatusesForNamespaceResponse, error) } type requestServiceClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewRequestServiceClient(cc *grpc.ClientConn) RequestServiceClient { +func NewRequestServiceClient(cc grpc.ClientConnInterface) RequestServiceClient { return &requestServiceClient{cc} } @@ -80,10 +89,43 @@ func (c *requestServiceClient) GetRequestStatus(ctx context.Context, in *GetRequ return out, nil } +func (c *requestServiceClient) GetRequestStatuses(ctx context.Context, in *GetRequestStatusesRequest, opts ...grpc.CallOption) (*GetRequestStatusesResponse, error) { + out := new(GetRequestStatusesResponse) + err := c.cc.Invoke(ctx, "/api.requestservice.v1.RequestService/GetRequestStatuses", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *requestServiceClient) GetRequestStatusesForUser(ctx context.Context, in *GetRequestStatusesForUserRequest, opts ...grpc.CallOption) (*GetRequestStatusesForUserResponse, error) { + out := new(GetRequestStatusesForUserResponse) + err := c.cc.Invoke(ctx, "/api.requestservice.v1.RequestService/GetRequestStatusesForUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *requestServiceClient) GetRequestStatusesForNamespace(ctx context.Context, in *GetRequestStatusesForNamespaceRequest, opts ...grpc.CallOption) (*GetRequestStatusesForNamespaceResponse, error) { + out := new(GetRequestStatusesForNamespaceResponse) + err := c.cc.Invoke(ctx, "/api.requestservice.v1.RequestService/GetRequestStatusesForNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // RequestServiceServer is the server API for RequestService service. type RequestServiceServer interface { // GetRequestStatus get the status of a request. GetRequestStatus(context.Context, *GetRequestStatusRequest) (*GetRequestStatusResponse, error) + // GetRequestStatuses lists the statuses of all known requests. + GetRequestStatuses(context.Context, *GetRequestStatusesRequest) (*GetRequestStatusesResponse, error) + // GetRequestStatuses lists the statuses started by a user. + GetRequestStatusesForUser(context.Context, *GetRequestStatusesForUserRequest) (*GetRequestStatusesForUserResponse, error) + // GetRequestStatuses lists the statuses of requests started for a namespace. + GetRequestStatusesForNamespace(context.Context, *GetRequestStatusesForNamespaceRequest) (*GetRequestStatusesForNamespaceResponse, error) } // UnimplementedRequestServiceServer can be embedded to have forward compatible implementations. @@ -93,6 +135,15 @@ type UnimplementedRequestServiceServer struct { func (*UnimplementedRequestServiceServer) GetRequestStatus(ctx context.Context, req *GetRequestStatusRequest) (*GetRequestStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRequestStatus not implemented") } +func (*UnimplementedRequestServiceServer) GetRequestStatuses(ctx context.Context, req *GetRequestStatusesRequest) (*GetRequestStatusesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRequestStatuses not implemented") +} +func (*UnimplementedRequestServiceServer) GetRequestStatusesForUser(ctx context.Context, req *GetRequestStatusesForUserRequest) (*GetRequestStatusesForUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRequestStatusesForUser not implemented") +} +func (*UnimplementedRequestServiceServer) GetRequestStatusesForNamespace(ctx context.Context, req *GetRequestStatusesForNamespaceRequest) (*GetRequestStatusesForNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRequestStatusesForNamespace not implemented") +} func RegisterRequestServiceServer(s *grpc.Server, srv RequestServiceServer) { s.RegisterService(&_RequestService_serviceDesc, srv) @@ -116,6 +167,60 @@ func _RequestService_GetRequestStatus_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _RequestService_GetRequestStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequestStatusesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RequestServiceServer).GetRequestStatuses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.requestservice.v1.RequestService/GetRequestStatuses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RequestServiceServer).GetRequestStatuses(ctx, req.(*GetRequestStatusesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RequestService_GetRequestStatusesForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequestStatusesForUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RequestServiceServer).GetRequestStatusesForUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.requestservice.v1.RequestService/GetRequestStatusesForUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RequestServiceServer).GetRequestStatusesForUser(ctx, req.(*GetRequestStatusesForUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RequestService_GetRequestStatusesForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequestStatusesForNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RequestServiceServer).GetRequestStatusesForNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.requestservice.v1.RequestService/GetRequestStatusesForNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RequestServiceServer).GetRequestStatusesForNamespace(ctx, req.(*GetRequestStatusesForNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _RequestService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.requestservice.v1.RequestService", HandlerType: (*RequestServiceServer)(nil), @@ -124,6 +229,18 @@ var _RequestService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetRequestStatus", Handler: _RequestService_GetRequestStatus_Handler, }, + { + MethodName: "GetRequestStatuses", + Handler: _RequestService_GetRequestStatuses_Handler, + }, + { + MethodName: "GetRequestStatusesForUser", + Handler: _RequestService_GetRequestStatusesForUser_Handler, + }, + { + MethodName: "GetRequestStatusesForNamespace", + Handler: _RequestService_GetRequestStatusesForNamespace_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/requestservice/v1/service.proto", diff --git a/protogen/api/sink/v1/message.pb.go b/protogen/api/sink/v1/message.pb.go new file mode 100644 index 00000000..e5ea4264 --- /dev/null +++ b/protogen/api/sink/v1/message.pb.go @@ -0,0 +1,3568 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: api/sink/v1/message.proto + +package sink + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strconv "strconv" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type State int32 + +const ( + STATE_UNSPECIFIED State = 0 + STATE_CREATING State = 1 + STATE_ACTIVE State = 2 + STATE_DELETED State = 3 + STATE_INTERNAL_ERROR State = 4 + STATE_USER_ERROR State = 5 +) + +var State_name = map[int32]string{ + 0: "Unspecified", + 1: "Creating", + 2: "Active", + 3: "Deleted", + 4: "InternalError", + 5: "UserError", +} + +var State_value = map[string]int32{ + "Unspecified": 0, + "Creating": 1, + "Active": 2, + "Deleted": 3, + "InternalError": 4, + "UserError": 5, +} + +func (State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{0} +} + +type DestinationType int32 + +const ( + DESTINATION_TYPE_UNSPECIFIED DestinationType = 0 + DESTINATION_TYPE_KINESIS DestinationType = 1 + DESTINATION_TYPE_S3 DestinationType = 2 +) + +var DestinationType_name = map[int32]string{ + 0: "Unspecified", + 1: "Kinesis", + 2: "S3", +} + +var DestinationType_value = map[string]int32{ + "Unspecified": 0, + "Kinesis": 1, + "S3": 2, +} + +func (DestinationType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{1} +} + +type Type int32 + +const ( + TYPE_UNSPECIFIED Type = 0 + TYPE_AUDIT_LOG Type = 1 + TYPE_WORKFLOW_HISTORY_EXPORT Type = 2 +) + +var Type_name = map[int32]string{ + 0: "Unspecified", + 1: "AuditLog", + 2: "WorkflowHistoryExport", +} + +var Type_value = map[string]int32{ + "Unspecified": 0, + "AuditLog": 1, + "WorkflowHistoryExport": 2, +} + +func (Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{2} +} + +type ExportSinkState int32 + +const ( + EXPORT_SINK_STATE_UNSPECIFIED ExportSinkState = 0 + EXPORT_SINK_STATE_ACTIVATING ExportSinkState = 1 + EXPORT_SINK_STATE_ACTIVE ExportSinkState = 2 + EXPORT_SINK_STATE_ACTIVATION_FAILED ExportSinkState = 3 + EXPORT_SINK_STATE_DELETING ExportSinkState = 4 + EXPORT_SINK_STATE_DELETED ExportSinkState = 5 + EXPORT_SINK_STATE_UPDATING ExportSinkState = 6 + EXPORT_SINK_STATE_UPDATE_FAILED ExportSinkState = 7 +) + +var ExportSinkState_name = map[int32]string{ + 0: "Unspecified", + 1: "Activating", + 2: "Active", + 3: "ActivationFailed", + 4: "Deleting", + 5: "Deleted", + 6: "Updating", + 7: "UpdateFailed", +} + +var ExportSinkState_value = map[string]int32{ + "Unspecified": 0, + "Activating": 1, + "Active": 2, + "ActivationFailed": 3, + "Deleting": 4, + "Deleted": 5, + "Updating": 6, + "UpdateFailed": 7, +} + +func (ExportSinkState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{3} +} + +type ExportSinkHealth int32 + +const ( + EXPORT_SINK_HEALTH_UNSPECIFIED ExportSinkHealth = 0 + EXPORT_SINK_HEALTH_OK ExportSinkHealth = 1 + EXPORT_SINK_HEALTH_ERROR_INTERNAL ExportSinkHealth = 2 + EXPORT_SINK_HEALTH_ERROR_USER_CONFIGURATION ExportSinkHealth = 3 +) + +var ExportSinkHealth_name = map[int32]string{ + 0: "Unspecified", + 1: "Ok", + 2: "ErrorInternal", + 3: "ErrorUserConfiguration", +} + +var ExportSinkHealth_value = map[string]int32{ + "Unspecified": 0, + "Ok": 1, + "ErrorInternal": 2, + "ErrorUserConfiguration": 3, +} + +func (ExportSinkHealth) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{4} +} + +type ExportDestinationType int32 + +const ( + EXPORT_DESTINATION_TYPE_UNSPECIFIED ExportDestinationType = 0 + EXPORT_DESTINATION_TYPE_S3 ExportDestinationType = 1 + EXPORT_DESTINATION_TYPE_GCS ExportDestinationType = 2 +) + +var ExportDestinationType_name = map[int32]string{ + 0: "Unspecified", + 1: "S3", + 2: "Gcs", +} + +var ExportDestinationType_value = map[string]int32{ + "Unspecified": 0, + "S3": 1, + "Gcs": 2, +} + +func (ExportDestinationType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{5} +} + +type KinesisSpec struct { + // The role Temporal Cloud assumes when writing records to Kinesis + AssumedRole string `protobuf:"bytes,1,opt,name=assumed_role,json=assumedRole,proto3" json:"assumed_role,omitempty"` + // Destination Kinesis endpoint arn for us to send data to. + DestinationUri string `protobuf:"bytes,2,opt,name=destination_uri,json=destinationUri,proto3" json:"destination_uri,omitempty"` + // The sink's region. + Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` +} + +func (m *KinesisSpec) Reset() { *m = KinesisSpec{} } +func (*KinesisSpec) ProtoMessage() {} +func (*KinesisSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{0} +} +func (m *KinesisSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KinesisSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KinesisSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KinesisSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_KinesisSpec.Merge(m, src) +} +func (m *KinesisSpec) XXX_Size() int { + return m.Size() +} +func (m *KinesisSpec) XXX_DiscardUnknown() { + xxx_messageInfo_KinesisSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_KinesisSpec proto.InternalMessageInfo + +func (m *KinesisSpec) GetAssumedRole() string { + if m != nil { + return m.AssumedRole + } + return "" +} + +func (m *KinesisSpec) GetDestinationUri() string { + if m != nil { + return m.DestinationUri + } + return "" +} + +func (m *KinesisSpec) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +type SinkSpec struct { + // Name of the sink e.g. "audit_log_01" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Type of the sink. + SinkType Type `protobuf:"varint,2,opt,name=sink_type,json=sinkType,proto3,enum=api.sink.v1.Type" json:"sink_type,omitempty"` + // The receiving service type. + DestinationType DestinationType `protobuf:"varint,3,opt,name=destination_type,json=destinationType,proto3,enum=api.sink.v1.DestinationType" json:"destination_type,omitempty"` + // The KinesisSpec when destination_type is Kinesis + KinesisSink *KinesisSpec `protobuf:"bytes,4,opt,name=kinesis_sink,json=kinesisSink,proto3" json:"kinesis_sink,omitempty"` + // The S3spec when destination_type is S3 + S3Sink *S3Spec `protobuf:"bytes,5,opt,name=s3_sink,json=s3Sink,proto3" json:"s3_sink,omitempty"` + Enabled bool `protobuf:"varint,6,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *SinkSpec) Reset() { *m = SinkSpec{} } +func (*SinkSpec) ProtoMessage() {} +func (*SinkSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{1} +} +func (m *SinkSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SinkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SinkSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SinkSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_SinkSpec.Merge(m, src) +} +func (m *SinkSpec) XXX_Size() int { + return m.Size() +} +func (m *SinkSpec) XXX_DiscardUnknown() { + xxx_messageInfo_SinkSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_SinkSpec proto.InternalMessageInfo + +func (m *SinkSpec) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SinkSpec) GetSinkType() Type { + if m != nil { + return m.SinkType + } + return TYPE_UNSPECIFIED +} + +func (m *SinkSpec) GetDestinationType() DestinationType { + if m != nil { + return m.DestinationType + } + return DESTINATION_TYPE_UNSPECIFIED +} + +func (m *SinkSpec) GetKinesisSink() *KinesisSpec { + if m != nil { + return m.KinesisSink + } + return nil +} + +func (m *SinkSpec) GetS3Sink() *S3Spec { + if m != nil { + return m.S3Sink + } + return nil +} + +func (m *SinkSpec) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type Sink struct { + // Name of the sink e.g. "audit_log_01" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + State State `protobuf:"varint,2,opt,name=state,proto3,enum=api.sink.v1.State" json:"state,omitempty"` + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // The last succeeded timestamp for the internal workflow responsible for adding data to the sink. + LastSucceededTime *types.Timestamp `protobuf:"bytes,4,opt,name=last_succeeded_time,json=lastSucceededTime,proto3" json:"last_succeeded_time,omitempty"` +} + +func (m *Sink) Reset() { *m = Sink{} } +func (*Sink) ProtoMessage() {} +func (*Sink) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{2} +} +func (m *Sink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Sink) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sink.Merge(m, src) +} +func (m *Sink) XXX_Size() int { + return m.Size() +} +func (m *Sink) XXX_DiscardUnknown() { + xxx_messageInfo_Sink.DiscardUnknown(m) +} + +var xxx_messageInfo_Sink proto.InternalMessageInfo + +func (m *Sink) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Sink) GetState() State { + if m != nil { + return m.State + } + return STATE_UNSPECIFIED +} + +func (m *Sink) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" +} + +func (m *Sink) GetLastSucceededTime() *types.Timestamp { + if m != nil { + return m.LastSucceededTime + } + return nil +} + +type S3Spec struct { + // The role to be created that Temporal Cloud assumes for writing records to customer's S3 bucket + RoleName string `protobuf:"bytes,1,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + // Destination S3 bucket name for us to send data to + BucketName string `protobuf:"bytes,2,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` + // The region of the S3 bucket + Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` + // The kms key ARN used for encryption + KmsArn string `protobuf:"bytes,4,opt,name=kms_arn,json=kmsArn,proto3" json:"kms_arn,omitempty"` + // The aws account id of s3 bucket and assumed role + AwsAccountId string `protobuf:"bytes,5,opt,name=aws_account_id,json=awsAccountId,proto3" json:"aws_account_id,omitempty"` +} + +func (m *S3Spec) Reset() { *m = S3Spec{} } +func (*S3Spec) ProtoMessage() {} +func (*S3Spec) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{3} +} +func (m *S3Spec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *S3Spec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_S3Spec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *S3Spec) XXX_Merge(src proto.Message) { + xxx_messageInfo_S3Spec.Merge(m, src) +} +func (m *S3Spec) XXX_Size() int { + return m.Size() +} +func (m *S3Spec) XXX_DiscardUnknown() { + xxx_messageInfo_S3Spec.DiscardUnknown(m) +} + +var xxx_messageInfo_S3Spec proto.InternalMessageInfo + +func (m *S3Spec) GetRoleName() string { + if m != nil { + return m.RoleName + } + return "" +} + +func (m *S3Spec) GetBucketName() string { + if m != nil { + return m.BucketName + } + return "" +} + +func (m *S3Spec) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *S3Spec) GetKmsArn() string { + if m != nil { + return m.KmsArn + } + return "" +} + +func (m *S3Spec) GetAwsAccountId() string { + if m != nil { + return m.AwsAccountId + } + return "" +} + +type GCSSpec struct { + // The customer service account name to be created that Temporal Cloud impersonates for writing records to customer's gcs bucket + SaName string `protobuf:"bytes,1,opt,name=sa_name,json=saName,proto3" json:"sa_name,omitempty"` + // Destination gcs bucket name for us to send data to + BucketName string `protobuf:"bytes,2,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` + // The region of the gcs bucket + Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` + // The Customer-managed encryption key (CMEK) used for encryption + EnableCmek bool `protobuf:"varint,4,opt,name=enable_cmek,json=enableCmek,proto3" json:"enable_cmek,omitempty"` + // The gcp project name of gcs bucket and service account + GcpProjectName string `protobuf:"bytes,5,opt,name=gcp_project_name,json=gcpProjectName,proto3" json:"gcp_project_name,omitempty"` +} + +func (m *GCSSpec) Reset() { *m = GCSSpec{} } +func (*GCSSpec) ProtoMessage() {} +func (*GCSSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{4} +} +func (m *GCSSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GCSSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GCSSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GCSSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_GCSSpec.Merge(m, src) +} +func (m *GCSSpec) XXX_Size() int { + return m.Size() +} +func (m *GCSSpec) XXX_DiscardUnknown() { + xxx_messageInfo_GCSSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_GCSSpec proto.InternalMessageInfo + +func (m *GCSSpec) GetSaName() string { + if m != nil { + return m.SaName + } + return "" +} + +func (m *GCSSpec) GetBucketName() string { + if m != nil { + return m.BucketName + } + return "" +} + +func (m *GCSSpec) GetRegion() string { + if m != nil { + return m.Region + } + return "" +} + +func (m *GCSSpec) GetEnableCmek() bool { + if m != nil { + return m.EnableCmek + } + return false +} + +func (m *GCSSpec) GetGcpProjectName() string { + if m != nil { + return m.GcpProjectName + } + return "" +} + +type ExportSinkSpec struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + // The receiving service type. + DestinationType ExportDestinationType `protobuf:"varint,3,opt,name=destination_type,json=destinationType,proto3,enum=api.sink.v1.ExportDestinationType" json:"destination_type,omitempty"` + // The S3spec when destination_type is S3 + S3Sink *S3Spec `protobuf:"bytes,4,opt,name=s3_sink,json=s3Sink,proto3" json:"s3_sink,omitempty"` + // The GCSspec when destination_type is GCS + GcsSink *GCSSpec `protobuf:"bytes,5,opt,name=gcs_sink,json=gcsSink,proto3" json:"gcs_sink,omitempty"` +} + +func (m *ExportSinkSpec) Reset() { *m = ExportSinkSpec{} } +func (*ExportSinkSpec) ProtoMessage() {} +func (*ExportSinkSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{5} +} +func (m *ExportSinkSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportSinkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportSinkSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportSinkSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportSinkSpec.Merge(m, src) +} +func (m *ExportSinkSpec) XXX_Size() int { + return m.Size() +} +func (m *ExportSinkSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ExportSinkSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportSinkSpec proto.InternalMessageInfo + +func (m *ExportSinkSpec) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ExportSinkSpec) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func (m *ExportSinkSpec) GetDestinationType() ExportDestinationType { + if m != nil { + return m.DestinationType + } + return EXPORT_DESTINATION_TYPE_UNSPECIFIED +} + +func (m *ExportSinkSpec) GetS3Sink() *S3Spec { + if m != nil { + return m.S3Sink + } + return nil +} + +func (m *ExportSinkSpec) GetGcsSink() *GCSSpec { + if m != nil { + return m.GcsSink + } + return nil +} + +type ExportSink struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ResourceVersion string `protobuf:"bytes,2,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` + State ExportSinkState `protobuf:"varint,3,opt,name=state,proto3,enum=api.sink.v1.ExportSinkState" json:"state,omitempty"` + Spec *ExportSinkSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Health ExportSinkHealth `protobuf:"varint,5,opt,name=health,proto3,enum=api.sink.v1.ExportSinkHealth" json:"health,omitempty"` + ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + LatestDataExportTime *types.Timestamp `protobuf:"bytes,7,opt,name=latest_data_export_time,json=latestDataExportTime,proto3" json:"latest_data_export_time,omitempty"` + LastHealthCheckTime *types.Timestamp `protobuf:"bytes,8,opt,name=last_health_check_time,json=lastHealthCheckTime,proto3" json:"last_health_check_time,omitempty"` +} + +func (m *ExportSink) Reset() { *m = ExportSink{} } +func (*ExportSink) ProtoMessage() {} +func (*ExportSink) Descriptor() ([]byte, []int) { + return fileDescriptor_ef8b1808dc5a7594, []int{6} +} +func (m *ExportSink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportSink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportSink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportSink) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportSink.Merge(m, src) +} +func (m *ExportSink) XXX_Size() int { + return m.Size() +} +func (m *ExportSink) XXX_DiscardUnknown() { + xxx_messageInfo_ExportSink.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportSink proto.InternalMessageInfo + +func (m *ExportSink) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ExportSink) GetResourceVersion() string { + if m != nil { + return m.ResourceVersion + } + return "" +} + +func (m *ExportSink) GetState() ExportSinkState { + if m != nil { + return m.State + } + return EXPORT_SINK_STATE_UNSPECIFIED +} + +func (m *ExportSink) GetSpec() *ExportSinkSpec { + if m != nil { + return m.Spec + } + return nil +} + +func (m *ExportSink) GetHealth() ExportSinkHealth { + if m != nil { + return m.Health + } + return EXPORT_SINK_HEALTH_UNSPECIFIED +} + +func (m *ExportSink) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" +} + +func (m *ExportSink) GetLatestDataExportTime() *types.Timestamp { + if m != nil { + return m.LatestDataExportTime + } + return nil +} + +func (m *ExportSink) GetLastHealthCheckTime() *types.Timestamp { + if m != nil { + return m.LastHealthCheckTime + } + return nil +} + +func init() { + proto.RegisterEnum("api.sink.v1.State", State_name, State_value) + proto.RegisterEnum("api.sink.v1.DestinationType", DestinationType_name, DestinationType_value) + proto.RegisterEnum("api.sink.v1.Type", Type_name, Type_value) + proto.RegisterEnum("api.sink.v1.ExportSinkState", ExportSinkState_name, ExportSinkState_value) + proto.RegisterEnum("api.sink.v1.ExportSinkHealth", ExportSinkHealth_name, ExportSinkHealth_value) + proto.RegisterEnum("api.sink.v1.ExportDestinationType", ExportDestinationType_name, ExportDestinationType_value) + proto.RegisterType((*KinesisSpec)(nil), "api.sink.v1.KinesisSpec") + proto.RegisterType((*SinkSpec)(nil), "api.sink.v1.SinkSpec") + proto.RegisterType((*Sink)(nil), "api.sink.v1.Sink") + proto.RegisterType((*S3Spec)(nil), "api.sink.v1.S3Spec") + proto.RegisterType((*GCSSpec)(nil), "api.sink.v1.GCSSpec") + proto.RegisterType((*ExportSinkSpec)(nil), "api.sink.v1.ExportSinkSpec") + proto.RegisterType((*ExportSink)(nil), "api.sink.v1.ExportSink") +} + +func init() { proto.RegisterFile("api/sink/v1/message.proto", fileDescriptor_ef8b1808dc5a7594) } + +var fileDescriptor_ef8b1808dc5a7594 = []byte{ + // 1175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xbf, 0x53, 0xe3, 0x46, + 0x14, 0xb6, 0x8c, 0xb1, 0xcd, 0x33, 0x67, 0xc4, 0x1e, 0x77, 0xf8, 0xc0, 0x08, 0x63, 0x92, 0x39, + 0xe2, 0x64, 0xec, 0x39, 0x98, 0x54, 0x57, 0x39, 0xb6, 0x00, 0x05, 0x9f, 0x4d, 0x56, 0xe2, 0x2e, + 0x97, 0x66, 0x47, 0xc8, 0x1b, 0xa3, 0xf3, 0x0f, 0x29, 0x5a, 0x99, 0xcb, 0x75, 0x49, 0x95, 0x36, + 0x7f, 0x40, 0x52, 0xa4, 0xc9, 0x24, 0x5d, 0x9a, 0xfc, 0x0f, 0x29, 0x29, 0xaf, 0x0c, 0xa6, 0x49, + 0x91, 0xe2, 0xfe, 0x84, 0x8c, 0x76, 0xe5, 0x20, 0x83, 0x1d, 0x8a, 0x54, 0x58, 0xdf, 0xfb, 0xbe, + 0xb7, 0xef, 0xbd, 0xfd, 0xde, 0x0e, 0xf0, 0xc8, 0x74, 0xed, 0x0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 0x13, + 0x3d, 0x85, 0xc5, 0xae, 0x18, 0x06, 0x09, 0x34, 0xb9, 0x44, 0x41, 0xda, 0xc9, 0xec, 0xe6, 0x26, + 0x92, 0x44, 0xa6, 0x85, 0x33, 0x21, 0x3b, 0xe8, 0x06, 0x7d, 0x04, 0x29, 0xb6, 0x27, 0x74, 0xf3, + 0x5c, 0x77, 0x7f, 0x42, 0xa7, 0xef, 0x71, 0x49, 0x92, 0xed, 0x71, 0x76, 0x0e, 0x52, 0x74, 0x60, + 0x9e, 0xf6, 0x68, 0x3b, 0x97, 0x2c, 0x48, 0x3b, 0x69, 0x3c, 0xfe, 0x2c, 0xfe, 0x2e, 0x41, 0x82, + 0x53, 0xa6, 0x8d, 0x66, 0x07, 0xe6, 0x99, 0x6f, 0xfa, 0xe3, 0xb1, 0xa0, 0xc9, 0x23, 0x82, 0x08, + 0x16, 0x04, 0xb4, 0x0d, 0xf7, 0xa8, 0xe7, 0x39, 0x1e, 0x09, 0xdd, 0x11, 0x5e, 0xc2, 0x22, 0x07, + 0x9f, 0x09, 0x0c, 0x7d, 0x0a, 0xf7, 0x7b, 0x26, 0xf3, 0x09, 0x1b, 0x5a, 0x16, 0xa5, 0x6d, 0xda, + 0x26, 0x81, 0x3f, 0xc2, 0xbe, 0xd7, 0xca, 0xc2, 0x3c, 0xe5, 0xb1, 0x79, 0xca, 0xc6, 0xd8, 0x3c, + 0x78, 0x39, 0x90, 0xe9, 0x63, 0x55, 0x80, 0x17, 0x7f, 0x94, 0x20, 0x29, 0x9a, 0x44, 0xeb, 0xb0, + 0x10, 0xb8, 0x87, 0x44, 0xca, 0x4f, 0x07, 0x40, 0x33, 0x68, 0x61, 0x13, 0x32, 0xa7, 0x43, 0xab, + 0x4b, 0x7d, 0x11, 0x16, 0xde, 0x01, 0x01, 0x71, 0xc2, 0x0c, 0xdf, 0xa0, 0x55, 0x48, 0x75, 0xfb, + 0x8c, 0x98, 0xde, 0x80, 0x17, 0xb8, 0x80, 0x93, 0xdd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36, 0x8c, 0xc3, 0x1b, 0x53, 0x7a, + 0x04, 0x0f, 0xa6, 0x70, 0x5a, 0x47, 0xb2, 0x84, 0xde, 0x87, 0xad, 0x29, 0x21, 0xee, 0xaa, 0x7f, + 0xad, 0x27, 0xc7, 0x51, 0x05, 0x3e, 0x9c, 0x49, 0xe3, 0x3e, 0xac, 0xb5, 0x9a, 0xfb, 0xda, 0xc1, + 0x09, 0xe6, 0x63, 0x93, 0xe7, 0x4a, 0xdf, 0x4a, 0xf0, 0x60, 0xea, 0xb3, 0x1a, 0x19, 0xf9, 0x1d, + 0xee, 0xbc, 0x9e, 0xd9, 0x34, 0x1b, 0x4a, 0x68, 0x13, 0xd6, 0x67, 0xc5, 0x0f, 0x6a, 0xba, 0x1c, + 0xff, 0x04, 0x5f, 0x5c, 0x2a, 0xb1, 0xb7, 0x97, 0x4a, 0xec, 0xdd, 0xa5, 0x22, 0x7d, 0x33, 0x52, + 0xa4, 0x5f, 0x46, 0x8a, 0xf4, 0xc7, 0x48, 0x91, 0x2e, 0x46, 0x8a, 0xf4, 0xe7, 0x48, 0x91, 0xfe, + 0x1a, 0x29, 0xb1, 0x77, 0x23, 0x45, 0xfa, 0xfe, 0x4a, 0x89, 0x5d, 0x5c, 0x29, 0xb1, 0xb7, 0x57, + 0x4a, 0xec, 0x8b, 0xbc, 0xdf, 0x77, 0xbd, 0x5e, 0xd9, 0xea, 0x39, 0xc3, 0x76, 0x25, 0xf2, 0xdf, + 0xe5, 0xd3, 0xe0, 0xef, 0x69, 0x92, 0x3f, 0x0d, 0x7b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbe, + 0xee, 0xb3, 0x55, 0x78, 0x0a, 0x00, 0x00, +} + +func (x State) String() string { + s, ok := State_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x DestinationType) String() string { + s, ok := DestinationType_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Type) String() string { + s, ok := Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ExportSinkState) String() string { + s, ok := ExportSinkState_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ExportSinkHealth) String() string { + s, ok := ExportSinkHealth_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ExportDestinationType) String() string { + s, ok := ExportDestinationType_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *KinesisSpec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KinesisSpec) + if !ok { + that2, ok := that.(KinesisSpec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.AssumedRole != that1.AssumedRole { + return false + } + if this.DestinationUri != that1.DestinationUri { + return false + } + if this.Region != that1.Region { + return false + } + return true +} +func (this *SinkSpec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SinkSpec) + if !ok { + that2, ok := that.(SinkSpec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.SinkType != that1.SinkType { + return false + } + if this.DestinationType != that1.DestinationType { + return false + } + if !this.KinesisSink.Equal(that1.KinesisSink) { + return false + } + if !this.S3Sink.Equal(that1.S3Sink) { + return false + } + if this.Enabled != that1.Enabled { + return false + } + return true +} +func (this *Sink) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Sink) + if !ok { + that2, ok := that.(Sink) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.State != that1.State { + return false + } + if this.ErrorMessage != that1.ErrorMessage { + return false + } + if !this.LastSucceededTime.Equal(that1.LastSucceededTime) { + return false + } + return true +} +func (this *S3Spec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*S3Spec) + if !ok { + that2, ok := that.(S3Spec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RoleName != that1.RoleName { + return false + } + if this.BucketName != that1.BucketName { + return false + } + if this.Region != that1.Region { + return false + } + if this.KmsArn != that1.KmsArn { + return false + } + if this.AwsAccountId != that1.AwsAccountId { + return false + } + return true +} +func (this *GCSSpec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GCSSpec) + if !ok { + that2, ok := that.(GCSSpec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SaName != that1.SaName { + return false + } + if this.BucketName != that1.BucketName { + return false + } + if this.Region != that1.Region { + return false + } + if this.EnableCmek != that1.EnableCmek { + return false + } + if this.GcpProjectName != that1.GcpProjectName { + return false + } + return true +} +func (this *ExportSinkSpec) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExportSinkSpec) + if !ok { + that2, ok := that.(ExportSinkSpec) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Enabled != that1.Enabled { + return false + } + if this.DestinationType != that1.DestinationType { + return false + } + if !this.S3Sink.Equal(that1.S3Sink) { + return false + } + if !this.GcsSink.Equal(that1.GcsSink) { + return false + } + return true +} +func (this *ExportSink) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExportSink) + if !ok { + that2, ok := that.(ExportSink) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.ResourceVersion != that1.ResourceVersion { + return false + } + if this.State != that1.State { + return false + } + if !this.Spec.Equal(that1.Spec) { + return false + } + if this.Health != that1.Health { + return false + } + if this.ErrorMessage != that1.ErrorMessage { + return false + } + if !this.LatestDataExportTime.Equal(that1.LatestDataExportTime) { + return false + } + if !this.LastHealthCheckTime.Equal(that1.LastHealthCheckTime) { + return false + } + return true +} +func (this *KinesisSpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&sink.KinesisSpec{") + s = append(s, "AssumedRole: "+fmt.Sprintf("%#v", this.AssumedRole)+",\n") + s = append(s, "DestinationUri: "+fmt.Sprintf("%#v", this.DestinationUri)+",\n") + s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SinkSpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&sink.SinkSpec{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "SinkType: "+fmt.Sprintf("%#v", this.SinkType)+",\n") + s = append(s, "DestinationType: "+fmt.Sprintf("%#v", this.DestinationType)+",\n") + if this.KinesisSink != nil { + s = append(s, "KinesisSink: "+fmt.Sprintf("%#v", this.KinesisSink)+",\n") + } + if this.S3Sink != nil { + s = append(s, "S3Sink: "+fmt.Sprintf("%#v", this.S3Sink)+",\n") + } + s = append(s, "Enabled: "+fmt.Sprintf("%#v", this.Enabled)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Sink) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&sink.Sink{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") + s = append(s, "ErrorMessage: "+fmt.Sprintf("%#v", this.ErrorMessage)+",\n") + if this.LastSucceededTime != nil { + s = append(s, "LastSucceededTime: "+fmt.Sprintf("%#v", this.LastSucceededTime)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *S3Spec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&sink.S3Spec{") + s = append(s, "RoleName: "+fmt.Sprintf("%#v", this.RoleName)+",\n") + s = append(s, "BucketName: "+fmt.Sprintf("%#v", this.BucketName)+",\n") + s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") + s = append(s, "KmsArn: "+fmt.Sprintf("%#v", this.KmsArn)+",\n") + s = append(s, "AwsAccountId: "+fmt.Sprintf("%#v", this.AwsAccountId)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GCSSpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&sink.GCSSpec{") + s = append(s, "SaName: "+fmt.Sprintf("%#v", this.SaName)+",\n") + s = append(s, "BucketName: "+fmt.Sprintf("%#v", this.BucketName)+",\n") + s = append(s, "Region: "+fmt.Sprintf("%#v", this.Region)+",\n") + s = append(s, "EnableCmek: "+fmt.Sprintf("%#v", this.EnableCmek)+",\n") + s = append(s, "GcpProjectName: "+fmt.Sprintf("%#v", this.GcpProjectName)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExportSinkSpec) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&sink.ExportSinkSpec{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Enabled: "+fmt.Sprintf("%#v", this.Enabled)+",\n") + s = append(s, "DestinationType: "+fmt.Sprintf("%#v", this.DestinationType)+",\n") + if this.S3Sink != nil { + s = append(s, "S3Sink: "+fmt.Sprintf("%#v", this.S3Sink)+",\n") + } + if this.GcsSink != nil { + s = append(s, "GcsSink: "+fmt.Sprintf("%#v", this.GcsSink)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExportSink) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 12) + s = append(s, "&sink.ExportSink{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "ResourceVersion: "+fmt.Sprintf("%#v", this.ResourceVersion)+",\n") + s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "Health: "+fmt.Sprintf("%#v", this.Health)+",\n") + s = append(s, "ErrorMessage: "+fmt.Sprintf("%#v", this.ErrorMessage)+",\n") + if this.LatestDataExportTime != nil { + s = append(s, "LatestDataExportTime: "+fmt.Sprintf("%#v", this.LatestDataExportTime)+",\n") + } + if this.LastHealthCheckTime != nil { + s = append(s, "LastHealthCheckTime: "+fmt.Sprintf("%#v", this.LastHealthCheckTime)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMessage(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *KinesisSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KinesisSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KinesisSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationUri) > 0 { + i -= len(m.DestinationUri) + copy(dAtA[i:], m.DestinationUri) + i = encodeVarintMessage(dAtA, i, uint64(len(m.DestinationUri))) + i-- + dAtA[i] = 0x12 + } + if len(m.AssumedRole) > 0 { + i -= len(m.AssumedRole) + copy(dAtA[i:], m.AssumedRole) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AssumedRole))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SinkSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SinkSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SinkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.S3Sink != nil { + { + size, err := m.S3Sink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.KinesisSink != nil { + { + size, err := m.KinesisSink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.DestinationType != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.DestinationType)) + i-- + dAtA[i] = 0x18 + } + if m.SinkType != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.SinkType)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Sink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Sink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastSucceededTime != nil { + { + size, err := m.LastSucceededTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *S3Spec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *S3Spec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *S3Spec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AwsAccountId) > 0 { + i -= len(m.AwsAccountId) + copy(dAtA[i:], m.AwsAccountId) + i = encodeVarintMessage(dAtA, i, uint64(len(m.AwsAccountId))) + i-- + dAtA[i] = 0x2a + } + if len(m.KmsArn) > 0 { + i -= len(m.KmsArn) + copy(dAtA[i:], m.KmsArn) + i = encodeVarintMessage(dAtA, i, uint64(len(m.KmsArn))) + i-- + dAtA[i] = 0x22 + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x1a + } + if len(m.BucketName) > 0 { + i -= len(m.BucketName) + copy(dAtA[i:], m.BucketName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.BucketName))) + i-- + dAtA[i] = 0x12 + } + if len(m.RoleName) > 0 { + i -= len(m.RoleName) + copy(dAtA[i:], m.RoleName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.RoleName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GCSSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GCSSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GCSSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GcpProjectName) > 0 { + i -= len(m.GcpProjectName) + copy(dAtA[i:], m.GcpProjectName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.GcpProjectName))) + i-- + dAtA[i] = 0x2a + } + if m.EnableCmek { + i-- + if m.EnableCmek { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Region) > 0 { + i -= len(m.Region) + copy(dAtA[i:], m.Region) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Region))) + i-- + dAtA[i] = 0x1a + } + if len(m.BucketName) > 0 { + i -= len(m.BucketName) + copy(dAtA[i:], m.BucketName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.BucketName))) + i-- + dAtA[i] = 0x12 + } + if len(m.SaName) > 0 { + i -= len(m.SaName) + copy(dAtA[i:], m.SaName) + i = encodeVarintMessage(dAtA, i, uint64(len(m.SaName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportSinkSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportSinkSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportSinkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GcsSink != nil { + { + size, err := m.GcsSink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.S3Sink != nil { + { + size, err := m.S3Sink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.DestinationType != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.DestinationType)) + i-- + dAtA[i] = 0x18 + } + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportSink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportSink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportSink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastHealthCheckTime != nil { + { + size, err := m.LastHealthCheckTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.LatestDataExportTime != nil { + { + size, err := m.LatestDataExportTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x32 + } + if m.Health != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.Health)) + i-- + dAtA[i] = 0x28 + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.State != 0 { + i = encodeVarintMessage(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x18 + } + if len(m.ResourceVersion) > 0 { + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintMessage(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMessage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { + offset -= sovMessage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *KinesisSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AssumedRole) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.DestinationUri) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *SinkSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.SinkType != 0 { + n += 1 + sovMessage(uint64(m.SinkType)) + } + if m.DestinationType != 0 { + n += 1 + sovMessage(uint64(m.DestinationType)) + } + if m.KinesisSink != nil { + l = m.KinesisSink.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.S3Sink != nil { + l = m.S3Sink.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Enabled { + n += 2 + } + return n +} + +func (m *Sink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.State != 0 { + n += 1 + sovMessage(uint64(m.State)) + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.LastSucceededTime != nil { + l = m.LastSucceededTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *S3Spec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RoleName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.BucketName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.KmsArn) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.AwsAccountId) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *GCSSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SaName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.BucketName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.Region) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.EnableCmek { + n += 2 + } + l = len(m.GcpProjectName) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *ExportSinkSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.Enabled { + n += 2 + } + if m.DestinationType != 0 { + n += 1 + sovMessage(uint64(m.DestinationType)) + } + if m.S3Sink != nil { + l = m.S3Sink.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.GcsSink != nil { + l = m.GcsSink.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func (m *ExportSink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + l = len(m.ResourceVersion) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.State != 0 { + n += 1 + sovMessage(uint64(m.State)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.Health != 0 { + n += 1 + sovMessage(uint64(m.Health)) + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovMessage(uint64(l)) + } + if m.LatestDataExportTime != nil { + l = m.LatestDataExportTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + if m.LastHealthCheckTime != nil { + l = m.LastHealthCheckTime.Size() + n += 1 + l + sovMessage(uint64(l)) + } + return n +} + +func sovMessage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMessage(x uint64) (n int) { + return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *KinesisSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KinesisSpec{`, + `AssumedRole:` + fmt.Sprintf("%v", this.AssumedRole) + `,`, + `DestinationUri:` + fmt.Sprintf("%v", this.DestinationUri) + `,`, + `Region:` + fmt.Sprintf("%v", this.Region) + `,`, + `}`, + }, "") + return s +} +func (this *SinkSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SinkSpec{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `SinkType:` + fmt.Sprintf("%v", this.SinkType) + `,`, + `DestinationType:` + fmt.Sprintf("%v", this.DestinationType) + `,`, + `KinesisSink:` + strings.Replace(this.KinesisSink.String(), "KinesisSpec", "KinesisSpec", 1) + `,`, + `S3Sink:` + strings.Replace(this.S3Sink.String(), "S3Spec", "S3Spec", 1) + `,`, + `Enabled:` + fmt.Sprintf("%v", this.Enabled) + `,`, + `}`, + }, "") + return s +} +func (this *Sink) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Sink{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `ErrorMessage:` + fmt.Sprintf("%v", this.ErrorMessage) + `,`, + `LastSucceededTime:` + strings.Replace(fmt.Sprintf("%v", this.LastSucceededTime), "Timestamp", "types.Timestamp", 1) + `,`, + `}`, + }, "") + return s +} +func (this *S3Spec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&S3Spec{`, + `RoleName:` + fmt.Sprintf("%v", this.RoleName) + `,`, + `BucketName:` + fmt.Sprintf("%v", this.BucketName) + `,`, + `Region:` + fmt.Sprintf("%v", this.Region) + `,`, + `KmsArn:` + fmt.Sprintf("%v", this.KmsArn) + `,`, + `AwsAccountId:` + fmt.Sprintf("%v", this.AwsAccountId) + `,`, + `}`, + }, "") + return s +} +func (this *GCSSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GCSSpec{`, + `SaName:` + fmt.Sprintf("%v", this.SaName) + `,`, + `BucketName:` + fmt.Sprintf("%v", this.BucketName) + `,`, + `Region:` + fmt.Sprintf("%v", this.Region) + `,`, + `EnableCmek:` + fmt.Sprintf("%v", this.EnableCmek) + `,`, + `GcpProjectName:` + fmt.Sprintf("%v", this.GcpProjectName) + `,`, + `}`, + }, "") + return s +} +func (this *ExportSinkSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExportSinkSpec{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Enabled:` + fmt.Sprintf("%v", this.Enabled) + `,`, + `DestinationType:` + fmt.Sprintf("%v", this.DestinationType) + `,`, + `S3Sink:` + strings.Replace(this.S3Sink.String(), "S3Spec", "S3Spec", 1) + `,`, + `GcsSink:` + strings.Replace(this.GcsSink.String(), "GCSSpec", "GCSSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExportSink) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExportSink{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `Spec:` + strings.Replace(this.Spec.String(), "ExportSinkSpec", "ExportSinkSpec", 1) + `,`, + `Health:` + fmt.Sprintf("%v", this.Health) + `,`, + `ErrorMessage:` + fmt.Sprintf("%v", this.ErrorMessage) + `,`, + `LatestDataExportTime:` + strings.Replace(fmt.Sprintf("%v", this.LatestDataExportTime), "Timestamp", "types.Timestamp", 1) + `,`, + `LastHealthCheckTime:` + strings.Replace(fmt.Sprintf("%v", this.LastHealthCheckTime), "Timestamp", "types.Timestamp", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringMessage(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *KinesisSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KinesisSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KinesisSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssumedRole", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssumedRole = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SinkSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SinkSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SinkSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SinkType", wireType) + } + m.SinkType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SinkType |= Type(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationType", wireType) + } + m.DestinationType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DestinationType |= DestinationType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KinesisSink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.KinesisSink == nil { + m.KinesisSink = &KinesisSpec{} + } + if err := m.KinesisSink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S3Sink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.S3Sink == nil { + m.S3Sink = &S3Spec{} + } + if err := m.S3Sink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Sink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Sink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastSucceededTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastSucceededTime == nil { + m.LastSucceededTime = &types.Timestamp{} + } + if err := m.LastSucceededTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *S3Spec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: S3Spec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: S3Spec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RoleName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BucketName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KmsArn", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KmsArn = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AwsAccountId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AwsAccountId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GCSSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GCSSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GCSSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SaName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SaName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BucketName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Region = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableCmek", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableCmek = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GcpProjectName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GcpProjectName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportSinkSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportSinkSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportSinkSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationType", wireType) + } + m.DestinationType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DestinationType |= ExportDestinationType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S3Sink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.S3Sink == nil { + m.S3Sink = &S3Spec{} + } + if err := m.S3Sink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GcsSink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GcsSink == nil { + m.GcsSink = &GCSSpec{} + } + if err := m.GcsSink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportSink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportSink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportSink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= ExportSinkState(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &ExportSinkSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) + } + m.Health = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Health |= ExportSinkHealth(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestDataExportTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LatestDataExportTime == nil { + m.LatestDataExportTime = &types.Timestamp{} + } + if err := m.LatestDataExportTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastHealthCheckTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastHealthCheckTime == nil { + m.LastHealthCheckTime = &types.Timestamp{} + } + if err := m.LastHealthCheckTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMessage(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMessage + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMessage + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMessage + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") +) \ No newline at end of file diff --git a/protogen/apimock/accountservice/v1/service.pb.mock.go b/protogen/apimock/accountservice/v1/service.pb.mock.go index 7bb73915..05fe3bb6 100644 --- a/protogen/apimock/accountservice/v1/service.pb.mock.go +++ b/protogen/apimock/accountservice/v1/service.pb.mock.go @@ -116,6 +116,26 @@ func (mr *MockAccountServiceClientMockRecorder) GetNamespacesUsage(ctx, in inter return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespacesUsage", reflect.TypeOf((*MockAccountServiceClient)(nil).GetNamespacesUsage), varargs...) } +// GetRegions mocks base method. +func (m *MockAccountServiceClient) GetRegions(ctx context.Context, in *accountservice.GetRegionsRequest, opts ...grpc.CallOption) (*accountservice.GetRegionsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRegions", varargs...) + ret0, _ := ret[0].(*accountservice.GetRegionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRegions indicates an expected call of GetRegions. +func (mr *MockAccountServiceClientMockRecorder) GetRegions(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegions", reflect.TypeOf((*MockAccountServiceClient)(nil).GetRegions), varargs...) +} + // UpdateAccount mocks base method. func (m *MockAccountServiceClient) UpdateAccount(ctx context.Context, in *accountservice.UpdateAccountRequest, opts ...grpc.CallOption) (*accountservice.UpdateAccountResponse, error) { m.ctrl.T.Helper() @@ -219,6 +239,21 @@ func (mr *MockAccountServiceServerMockRecorder) GetNamespacesUsage(arg0, arg1 in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespacesUsage", reflect.TypeOf((*MockAccountServiceServer)(nil).GetNamespacesUsage), arg0, arg1) } +// GetRegions mocks base method. +func (m *MockAccountServiceServer) GetRegions(arg0 context.Context, arg1 *accountservice.GetRegionsRequest) (*accountservice.GetRegionsResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRegions", arg0, arg1) + ret0, _ := ret[0].(*accountservice.GetRegionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRegions indicates an expected call of GetRegions. +func (mr *MockAccountServiceServerMockRecorder) GetRegions(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegions", reflect.TypeOf((*MockAccountServiceServer)(nil).GetRegions), arg0, arg1) +} + // UpdateAccount mocks base method. func (m *MockAccountServiceServer) UpdateAccount(arg0 context.Context, arg1 *accountservice.UpdateAccountRequest) (*accountservice.UpdateAccountResponse, error) { m.ctrl.T.Helper() diff --git a/protogen/apimock/authservice/v1/service.pb.mock.go b/protogen/apimock/authservice/v1/service.pb.mock.go index f765bacd..33b07480 100644 --- a/protogen/apimock/authservice/v1/service.pb.mock.go +++ b/protogen/apimock/authservice/v1/service.pb.mock.go @@ -36,6 +36,66 @@ func (m *MockAuthServiceClient) EXPECT() *MockAuthServiceClientMockRecorder { return m.recorder } +// CreateAPIKey mocks base method. +func (m *MockAuthServiceClient) CreateAPIKey(ctx context.Context, in *authservice.CreateAPIKeyRequest, opts ...grpc.CallOption) (*authservice.CreateAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.CreateAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateAPIKey indicates an expected call of CreateAPIKey. +func (mr *MockAuthServiceClientMockRecorder) CreateAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).CreateAPIKey), varargs...) +} + +// DeleteAPIKey mocks base method. +func (m *MockAuthServiceClient) DeleteAPIKey(ctx context.Context, in *authservice.DeleteAPIKeyRequest, opts ...grpc.CallOption) (*authservice.DeleteAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.DeleteAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteAPIKey indicates an expected call of DeleteAPIKey. +func (mr *MockAuthServiceClientMockRecorder) DeleteAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).DeleteAPIKey), varargs...) +} + +// DeleteAnyAPIKey mocks base method. +func (m *MockAuthServiceClient) DeleteAnyAPIKey(ctx context.Context, in *authservice.DeleteAnyAPIKeyRequest, opts ...grpc.CallOption) (*authservice.DeleteAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteAnyAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.DeleteAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteAnyAPIKey indicates an expected call of DeleteAnyAPIKey. +func (mr *MockAuthServiceClientMockRecorder) DeleteAnyAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAnyAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).DeleteAnyAPIKey), varargs...) +} + // DeleteUser mocks base method. func (m *MockAuthServiceClient) DeleteUser(ctx context.Context, in *authservice.DeleteUserRequest, opts ...grpc.CallOption) (*authservice.DeleteUserResponse, error) { m.ctrl.T.Helper() @@ -56,6 +116,106 @@ func (mr *MockAuthServiceClientMockRecorder) DeleteUser(ctx, in interface{}, opt return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUser", reflect.TypeOf((*MockAuthServiceClient)(nil).DeleteUser), varargs...) } +// GetAPIKey mocks base method. +func (m *MockAuthServiceClient) GetAPIKey(ctx context.Context, in *authservice.GetAPIKeyRequest, opts ...grpc.CallOption) (*authservice.GetAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.GetAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAPIKey indicates an expected call of GetAPIKey. +func (mr *MockAuthServiceClientMockRecorder) GetAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAPIKey), varargs...) +} + +// GetAPIKeys mocks base method. +func (m *MockAuthServiceClient) GetAPIKeys(ctx context.Context, in *authservice.GetAPIKeysRequest, opts ...grpc.CallOption) (*authservice.GetAPIKeysResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAPIKeys", varargs...) + ret0, _ := ret[0].(*authservice.GetAPIKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAPIKeys indicates an expected call of GetAPIKeys. +func (mr *MockAuthServiceClientMockRecorder) GetAPIKeys(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKeys", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAPIKeys), varargs...) +} + +// GetAllAPIKeys mocks base method. +func (m *MockAuthServiceClient) GetAllAPIKeys(ctx context.Context, in *authservice.GetAllAPIKeysRequest, opts ...grpc.CallOption) (*authservice.GetAllAPIKeysResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAllAPIKeys", varargs...) + ret0, _ := ret[0].(*authservice.GetAllAPIKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllAPIKeys indicates an expected call of GetAllAPIKeys. +func (mr *MockAuthServiceClientMockRecorder) GetAllAPIKeys(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAPIKeys", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAllAPIKeys), varargs...) +} + +// GetAnyAPIKey mocks base method. +func (m *MockAuthServiceClient) GetAnyAPIKey(ctx context.Context, in *authservice.GetAnyAPIKeyRequest, opts ...grpc.CallOption) (*authservice.GetAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAnyAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.GetAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAnyAPIKey indicates an expected call of GetAnyAPIKey. +func (mr *MockAuthServiceClientMockRecorder) GetAnyAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnyAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAnyAPIKey), varargs...) +} + +// GetRole mocks base method. +func (m *MockAuthServiceClient) GetRole(ctx context.Context, in *authservice.GetRoleRequest, opts ...grpc.CallOption) (*authservice.GetRoleResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRole", varargs...) + ret0, _ := ret[0].(*authservice.GetRoleResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRole indicates an expected call of GetRole. +func (mr *MockAuthServiceClientMockRecorder) GetRole(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRole", reflect.TypeOf((*MockAuthServiceClient)(nil).GetRole), varargs...) +} + // GetRoles mocks base method. func (m *MockAuthServiceClient) GetRoles(ctx context.Context, in *authservice.GetRolesRequest, opts ...grpc.CallOption) (*authservice.GetRolesResponse, error) { m.ctrl.T.Helper() @@ -176,6 +336,46 @@ func (mr *MockAuthServiceClientMockRecorder) ResendUserInvite(ctx, in interface{ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResendUserInvite", reflect.TypeOf((*MockAuthServiceClient)(nil).ResendUserInvite), varargs...) } +// UpdateAPIKey mocks base method. +func (m *MockAuthServiceClient) UpdateAPIKey(ctx context.Context, in *authservice.UpdateAPIKeyRequest, opts ...grpc.CallOption) (*authservice.UpdateAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.UpdateAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateAPIKey indicates an expected call of UpdateAPIKey. +func (mr *MockAuthServiceClientMockRecorder) UpdateAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).UpdateAPIKey), varargs...) +} + +// UpdateAnyAPIKey mocks base method. +func (m *MockAuthServiceClient) UpdateAnyAPIKey(ctx context.Context, in *authservice.UpdateAnyAPIKeyRequest, opts ...grpc.CallOption) (*authservice.UpdateAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateAnyAPIKey", varargs...) + ret0, _ := ret[0].(*authservice.UpdateAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateAnyAPIKey indicates an expected call of UpdateAnyAPIKey. +func (mr *MockAuthServiceClientMockRecorder) UpdateAnyAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAnyAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).UpdateAnyAPIKey), varargs...) +} + // UpdateUser mocks base method. func (m *MockAuthServiceClient) UpdateUser(ctx context.Context, in *authservice.UpdateUserRequest, opts ...grpc.CallOption) (*authservice.UpdateUserResponse, error) { m.ctrl.T.Helper() @@ -239,6 +439,51 @@ func (m *MockAuthServiceServer) EXPECT() *MockAuthServiceServerMockRecorder { return m.recorder } +// CreateAPIKey mocks base method. +func (m *MockAuthServiceServer) CreateAPIKey(arg0 context.Context, arg1 *authservice.CreateAPIKeyRequest) (*authservice.CreateAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.CreateAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateAPIKey indicates an expected call of CreateAPIKey. +func (mr *MockAuthServiceServerMockRecorder) CreateAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).CreateAPIKey), arg0, arg1) +} + +// DeleteAPIKey mocks base method. +func (m *MockAuthServiceServer) DeleteAPIKey(arg0 context.Context, arg1 *authservice.DeleteAPIKeyRequest) (*authservice.DeleteAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.DeleteAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteAPIKey indicates an expected call of DeleteAPIKey. +func (mr *MockAuthServiceServerMockRecorder) DeleteAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).DeleteAPIKey), arg0, arg1) +} + +// DeleteAnyAPIKey mocks base method. +func (m *MockAuthServiceServer) DeleteAnyAPIKey(arg0 context.Context, arg1 *authservice.DeleteAnyAPIKeyRequest) (*authservice.DeleteAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAnyAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.DeleteAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteAnyAPIKey indicates an expected call of DeleteAnyAPIKey. +func (mr *MockAuthServiceServerMockRecorder) DeleteAnyAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAnyAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).DeleteAnyAPIKey), arg0, arg1) +} + // DeleteUser mocks base method. func (m *MockAuthServiceServer) DeleteUser(arg0 context.Context, arg1 *authservice.DeleteUserRequest) (*authservice.DeleteUserResponse, error) { m.ctrl.T.Helper() @@ -254,6 +499,81 @@ func (mr *MockAuthServiceServerMockRecorder) DeleteUser(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUser", reflect.TypeOf((*MockAuthServiceServer)(nil).DeleteUser), arg0, arg1) } +// GetAPIKey mocks base method. +func (m *MockAuthServiceServer) GetAPIKey(arg0 context.Context, arg1 *authservice.GetAPIKeyRequest) (*authservice.GetAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.GetAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAPIKey indicates an expected call of GetAPIKey. +func (mr *MockAuthServiceServerMockRecorder) GetAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAPIKey), arg0, arg1) +} + +// GetAPIKeys mocks base method. +func (m *MockAuthServiceServer) GetAPIKeys(arg0 context.Context, arg1 *authservice.GetAPIKeysRequest) (*authservice.GetAPIKeysResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAPIKeys", arg0, arg1) + ret0, _ := ret[0].(*authservice.GetAPIKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAPIKeys indicates an expected call of GetAPIKeys. +func (mr *MockAuthServiceServerMockRecorder) GetAPIKeys(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIKeys", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAPIKeys), arg0, arg1) +} + +// GetAllAPIKeys mocks base method. +func (m *MockAuthServiceServer) GetAllAPIKeys(arg0 context.Context, arg1 *authservice.GetAllAPIKeysRequest) (*authservice.GetAllAPIKeysResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllAPIKeys", arg0, arg1) + ret0, _ := ret[0].(*authservice.GetAllAPIKeysResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllAPIKeys indicates an expected call of GetAllAPIKeys. +func (mr *MockAuthServiceServerMockRecorder) GetAllAPIKeys(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAPIKeys", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAllAPIKeys), arg0, arg1) +} + +// GetAnyAPIKey mocks base method. +func (m *MockAuthServiceServer) GetAnyAPIKey(arg0 context.Context, arg1 *authservice.GetAnyAPIKeyRequest) (*authservice.GetAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAnyAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.GetAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAnyAPIKey indicates an expected call of GetAnyAPIKey. +func (mr *MockAuthServiceServerMockRecorder) GetAnyAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAnyAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAnyAPIKey), arg0, arg1) +} + +// GetRole mocks base method. +func (m *MockAuthServiceServer) GetRole(arg0 context.Context, arg1 *authservice.GetRoleRequest) (*authservice.GetRoleResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRole", arg0, arg1) + ret0, _ := ret[0].(*authservice.GetRoleResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRole indicates an expected call of GetRole. +func (mr *MockAuthServiceServerMockRecorder) GetRole(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRole", reflect.TypeOf((*MockAuthServiceServer)(nil).GetRole), arg0, arg1) +} + // GetRoles mocks base method. func (m *MockAuthServiceServer) GetRoles(arg0 context.Context, arg1 *authservice.GetRolesRequest) (*authservice.GetRolesResponse, error) { m.ctrl.T.Helper() @@ -344,6 +664,36 @@ func (mr *MockAuthServiceServerMockRecorder) ResendUserInvite(arg0, arg1 interfa return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResendUserInvite", reflect.TypeOf((*MockAuthServiceServer)(nil).ResendUserInvite), arg0, arg1) } +// UpdateAPIKey mocks base method. +func (m *MockAuthServiceServer) UpdateAPIKey(arg0 context.Context, arg1 *authservice.UpdateAPIKeyRequest) (*authservice.UpdateAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.UpdateAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateAPIKey indicates an expected call of UpdateAPIKey. +func (mr *MockAuthServiceServerMockRecorder) UpdateAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).UpdateAPIKey), arg0, arg1) +} + +// UpdateAnyAPIKey mocks base method. +func (m *MockAuthServiceServer) UpdateAnyAPIKey(arg0 context.Context, arg1 *authservice.UpdateAnyAPIKeyRequest) (*authservice.UpdateAnyAPIKeyResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateAnyAPIKey", arg0, arg1) + ret0, _ := ret[0].(*authservice.UpdateAnyAPIKeyResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateAnyAPIKey indicates an expected call of UpdateAnyAPIKey. +func (mr *MockAuthServiceServerMockRecorder) UpdateAnyAPIKey(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAnyAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).UpdateAnyAPIKey), arg0, arg1) +} + // UpdateUser mocks base method. func (m *MockAuthServiceServer) UpdateUser(arg0 context.Context, arg1 *authservice.UpdateUserRequest) (*authservice.UpdateUserResponse, error) { m.ctrl.T.Helper() diff --git a/protogen/apimock/namespaceservice/v1/service.pb.mock.go b/protogen/apimock/namespaceservice/v1/service.pb.mock.go index b9dbeba0..83cb5c74 100644 --- a/protogen/apimock/namespaceservice/v1/service.pb.mock.go +++ b/protogen/apimock/namespaceservice/v1/service.pb.mock.go @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - v1 "github.com/temporalio/tcld/protogen/api/namespaceservice/v1" + namespaceservice "github.com/temporalio/tcld/protogen/api/namespaceservice/v1" grpc "google.golang.org/grpc" ) @@ -36,15 +36,35 @@ func (m *MockNamespaceServiceClient) EXPECT() *MockNamespaceServiceClientMockRec return m.recorder } +// CreateExportSink mocks base method. +func (m *MockNamespaceServiceClient) CreateExportSink(ctx context.Context, in *namespaceservice.CreateExportSinkRequest, opts ...grpc.CallOption) (*namespaceservice.CreateExportSinkResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateExportSink", varargs...) + ret0, _ := ret[0].(*namespaceservice.CreateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateExportSink indicates an expected call of CreateExportSink. +func (mr *MockNamespaceServiceClientMockRecorder) CreateExportSink(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateExportSink", reflect.TypeOf((*MockNamespaceServiceClient)(nil).CreateExportSink), varargs...) +} + // CreateNamespace mocks base method. -func (m *MockNamespaceServiceClient) CreateNamespace(ctx context.Context, in *v1.CreateNamespaceRequest, opts ...grpc.CallOption) (*v1.CreateNamespaceResponse, error) { +func (m *MockNamespaceServiceClient) CreateNamespace(ctx context.Context, in *namespaceservice.CreateNamespaceRequest, opts ...grpc.CallOption) (*namespaceservice.CreateNamespaceResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "CreateNamespace", varargs...) - ret0, _ := ret[0].(*v1.CreateNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.CreateNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -56,15 +76,35 @@ func (mr *MockNamespaceServiceClientMockRecorder) CreateNamespace(ctx, in interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNamespace", reflect.TypeOf((*MockNamespaceServiceClient)(nil).CreateNamespace), varargs...) } +// DeleteExportSink mocks base method. +func (m *MockNamespaceServiceClient) DeleteExportSink(ctx context.Context, in *namespaceservice.DeleteExportSinkRequest, opts ...grpc.CallOption) (*namespaceservice.DeleteExportSinkResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteExportSink", varargs...) + ret0, _ := ret[0].(*namespaceservice.DeleteExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteExportSink indicates an expected call of DeleteExportSink. +func (mr *MockNamespaceServiceClientMockRecorder) DeleteExportSink(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExportSink", reflect.TypeOf((*MockNamespaceServiceClient)(nil).DeleteExportSink), varargs...) +} + // DeleteNamespace mocks base method. -func (m *MockNamespaceServiceClient) DeleteNamespace(ctx context.Context, in *v1.DeleteNamespaceRequest, opts ...grpc.CallOption) (*v1.DeleteNamespaceResponse, error) { +func (m *MockNamespaceServiceClient) DeleteNamespace(ctx context.Context, in *namespaceservice.DeleteNamespaceRequest, opts ...grpc.CallOption) (*namespaceservice.DeleteNamespaceResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "DeleteNamespace", varargs...) - ret0, _ := ret[0].(*v1.DeleteNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.DeleteNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -76,15 +116,55 @@ func (mr *MockNamespaceServiceClientMockRecorder) DeleteNamespace(ctx, in interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNamespace", reflect.TypeOf((*MockNamespaceServiceClient)(nil).DeleteNamespace), varargs...) } +// GetExportSink mocks base method. +func (m *MockNamespaceServiceClient) GetExportSink(ctx context.Context, in *namespaceservice.GetExportSinkRequest, opts ...grpc.CallOption) (*namespaceservice.GetExportSinkResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetExportSink", varargs...) + ret0, _ := ret[0].(*namespaceservice.GetExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetExportSink indicates an expected call of GetExportSink. +func (mr *MockNamespaceServiceClientMockRecorder) GetExportSink(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExportSink", reflect.TypeOf((*MockNamespaceServiceClient)(nil).GetExportSink), varargs...) +} + +// GetExportSinks mocks base method. +func (m *MockNamespaceServiceClient) GetExportSinks(ctx context.Context, in *namespaceservice.GetExportSinksRequest, opts ...grpc.CallOption) (*namespaceservice.GetExportSinksResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetExportSinks", varargs...) + ret0, _ := ret[0].(*namespaceservice.GetExportSinksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetExportSinks indicates an expected call of GetExportSinks. +func (mr *MockNamespaceServiceClientMockRecorder) GetExportSinks(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExportSinks", reflect.TypeOf((*MockNamespaceServiceClient)(nil).GetExportSinks), varargs...) +} + // GetNamespace mocks base method. -func (m *MockNamespaceServiceClient) GetNamespace(ctx context.Context, in *v1.GetNamespaceRequest, opts ...grpc.CallOption) (*v1.GetNamespaceResponse, error) { +func (m *MockNamespaceServiceClient) GetNamespace(ctx context.Context, in *namespaceservice.GetNamespaceRequest, opts ...grpc.CallOption) (*namespaceservice.GetNamespaceResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetNamespace", varargs...) - ret0, _ := ret[0].(*v1.GetNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.GetNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -97,14 +177,14 @@ func (mr *MockNamespaceServiceClientMockRecorder) GetNamespace(ctx, in interface } // GetNamespaces mocks base method. -func (m *MockNamespaceServiceClient) GetNamespaces(ctx context.Context, in *v1.GetNamespacesRequest, opts ...grpc.CallOption) (*v1.GetNamespacesResponse, error) { +func (m *MockNamespaceServiceClient) GetNamespaces(ctx context.Context, in *namespaceservice.GetNamespacesRequest, opts ...grpc.CallOption) (*namespaceservice.GetNamespacesResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetNamespaces", varargs...) - ret0, _ := ret[0].(*v1.GetNamespacesResponse) + ret0, _ := ret[0].(*namespaceservice.GetNamespacesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -116,15 +196,35 @@ func (mr *MockNamespaceServiceClientMockRecorder) GetNamespaces(ctx, in interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespaces", reflect.TypeOf((*MockNamespaceServiceClient)(nil).GetNamespaces), varargs...) } +// ListExportSinks mocks base method. +func (m *MockNamespaceServiceClient) ListExportSinks(ctx context.Context, in *namespaceservice.ListExportSinksRequest, opts ...grpc.CallOption) (*namespaceservice.ListExportSinksResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListExportSinks", varargs...) + ret0, _ := ret[0].(*namespaceservice.ListExportSinksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListExportSinks indicates an expected call of ListExportSinks. +func (mr *MockNamespaceServiceClientMockRecorder) ListExportSinks(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExportSinks", reflect.TypeOf((*MockNamespaceServiceClient)(nil).ListExportSinks), varargs...) +} + // ListNamespaces mocks base method. -func (m *MockNamespaceServiceClient) ListNamespaces(ctx context.Context, in *v1.ListNamespacesRequest, opts ...grpc.CallOption) (*v1.ListNamespacesResponse, error) { +func (m *MockNamespaceServiceClient) ListNamespaces(ctx context.Context, in *namespaceservice.ListNamespacesRequest, opts ...grpc.CallOption) (*namespaceservice.ListNamespacesResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ListNamespaces", varargs...) - ret0, _ := ret[0].(*v1.ListNamespacesResponse) + ret0, _ := ret[0].(*namespaceservice.ListNamespacesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -137,14 +237,14 @@ func (mr *MockNamespaceServiceClientMockRecorder) ListNamespaces(ctx, in interfa } // RenameCustomSearchAttribute mocks base method. -func (m *MockNamespaceServiceClient) RenameCustomSearchAttribute(ctx context.Context, in *v1.RenameCustomSearchAttributeRequest, opts ...grpc.CallOption) (*v1.RenameCustomSearchAttributeResponse, error) { +func (m *MockNamespaceServiceClient) RenameCustomSearchAttribute(ctx context.Context, in *namespaceservice.RenameCustomSearchAttributeRequest, opts ...grpc.CallOption) (*namespaceservice.RenameCustomSearchAttributeResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "RenameCustomSearchAttribute", varargs...) - ret0, _ := ret[0].(*v1.RenameCustomSearchAttributeResponse) + ret0, _ := ret[0].(*namespaceservice.RenameCustomSearchAttributeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -156,15 +256,35 @@ func (mr *MockNamespaceServiceClientMockRecorder) RenameCustomSearchAttribute(ct return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameCustomSearchAttribute", reflect.TypeOf((*MockNamespaceServiceClient)(nil).RenameCustomSearchAttribute), varargs...) } +// UpdateExportSink mocks base method. +func (m *MockNamespaceServiceClient) UpdateExportSink(ctx context.Context, in *namespaceservice.UpdateExportSinkRequest, opts ...grpc.CallOption) (*namespaceservice.UpdateExportSinkResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateExportSink", varargs...) + ret0, _ := ret[0].(*namespaceservice.UpdateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateExportSink indicates an expected call of UpdateExportSink. +func (mr *MockNamespaceServiceClientMockRecorder) UpdateExportSink(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExportSink", reflect.TypeOf((*MockNamespaceServiceClient)(nil).UpdateExportSink), varargs...) +} + // UpdateNamespace mocks base method. -func (m *MockNamespaceServiceClient) UpdateNamespace(ctx context.Context, in *v1.UpdateNamespaceRequest, opts ...grpc.CallOption) (*v1.UpdateNamespaceResponse, error) { +func (m *MockNamespaceServiceClient) UpdateNamespace(ctx context.Context, in *namespaceservice.UpdateNamespaceRequest, opts ...grpc.CallOption) (*namespaceservice.UpdateNamespaceResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "UpdateNamespace", varargs...) - ret0, _ := ret[0].(*v1.UpdateNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.UpdateNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -176,6 +296,26 @@ func (mr *MockNamespaceServiceClientMockRecorder) UpdateNamespace(ctx, in interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNamespace", reflect.TypeOf((*MockNamespaceServiceClient)(nil).UpdateNamespace), varargs...) } +// ValidateExportSink mocks base method. +func (m *MockNamespaceServiceClient) ValidateExportSink(ctx context.Context, in *namespaceservice.ValidateExportSinkRequest, opts ...grpc.CallOption) (*namespaceservice.ValidateExportSinkResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ValidateExportSink", varargs...) + ret0, _ := ret[0].(*namespaceservice.ValidateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ValidateExportSink indicates an expected call of ValidateExportSink. +func (mr *MockNamespaceServiceClientMockRecorder) ValidateExportSink(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateExportSink", reflect.TypeOf((*MockNamespaceServiceClient)(nil).ValidateExportSink), varargs...) +} + // MockNamespaceServiceServer is a mock of NamespaceServiceServer interface. type MockNamespaceServiceServer struct { ctrl *gomock.Controller @@ -199,11 +339,26 @@ func (m *MockNamespaceServiceServer) EXPECT() *MockNamespaceServiceServerMockRec return m.recorder } +// CreateExportSink mocks base method. +func (m *MockNamespaceServiceServer) CreateExportSink(arg0 context.Context, arg1 *namespaceservice.CreateExportSinkRequest) (*namespaceservice.CreateExportSinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateExportSink", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.CreateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateExportSink indicates an expected call of CreateExportSink. +func (mr *MockNamespaceServiceServerMockRecorder) CreateExportSink(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateExportSink", reflect.TypeOf((*MockNamespaceServiceServer)(nil).CreateExportSink), arg0, arg1) +} + // CreateNamespace mocks base method. -func (m *MockNamespaceServiceServer) CreateNamespace(arg0 context.Context, arg1 *v1.CreateNamespaceRequest) (*v1.CreateNamespaceResponse, error) { +func (m *MockNamespaceServiceServer) CreateNamespace(arg0 context.Context, arg1 *namespaceservice.CreateNamespaceRequest) (*namespaceservice.CreateNamespaceResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateNamespace", arg0, arg1) - ret0, _ := ret[0].(*v1.CreateNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.CreateNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -214,11 +369,26 @@ func (mr *MockNamespaceServiceServerMockRecorder) CreateNamespace(arg0, arg1 int return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNamespace", reflect.TypeOf((*MockNamespaceServiceServer)(nil).CreateNamespace), arg0, arg1) } +// DeleteExportSink mocks base method. +func (m *MockNamespaceServiceServer) DeleteExportSink(arg0 context.Context, arg1 *namespaceservice.DeleteExportSinkRequest) (*namespaceservice.DeleteExportSinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteExportSink", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.DeleteExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteExportSink indicates an expected call of DeleteExportSink. +func (mr *MockNamespaceServiceServerMockRecorder) DeleteExportSink(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExportSink", reflect.TypeOf((*MockNamespaceServiceServer)(nil).DeleteExportSink), arg0, arg1) +} + // DeleteNamespace mocks base method. -func (m *MockNamespaceServiceServer) DeleteNamespace(arg0 context.Context, arg1 *v1.DeleteNamespaceRequest) (*v1.DeleteNamespaceResponse, error) { +func (m *MockNamespaceServiceServer) DeleteNamespace(arg0 context.Context, arg1 *namespaceservice.DeleteNamespaceRequest) (*namespaceservice.DeleteNamespaceResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteNamespace", arg0, arg1) - ret0, _ := ret[0].(*v1.DeleteNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.DeleteNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -229,11 +399,41 @@ func (mr *MockNamespaceServiceServerMockRecorder) DeleteNamespace(arg0, arg1 int return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNamespace", reflect.TypeOf((*MockNamespaceServiceServer)(nil).DeleteNamespace), arg0, arg1) } +// GetExportSink mocks base method. +func (m *MockNamespaceServiceServer) GetExportSink(arg0 context.Context, arg1 *namespaceservice.GetExportSinkRequest) (*namespaceservice.GetExportSinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetExportSink", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.GetExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetExportSink indicates an expected call of GetExportSink. +func (mr *MockNamespaceServiceServerMockRecorder) GetExportSink(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExportSink", reflect.TypeOf((*MockNamespaceServiceServer)(nil).GetExportSink), arg0, arg1) +} + +// GetExportSinks mocks base method. +func (m *MockNamespaceServiceServer) GetExportSinks(arg0 context.Context, arg1 *namespaceservice.GetExportSinksRequest) (*namespaceservice.GetExportSinksResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetExportSinks", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.GetExportSinksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetExportSinks indicates an expected call of GetExportSinks. +func (mr *MockNamespaceServiceServerMockRecorder) GetExportSinks(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExportSinks", reflect.TypeOf((*MockNamespaceServiceServer)(nil).GetExportSinks), arg0, arg1) +} + // GetNamespace mocks base method. -func (m *MockNamespaceServiceServer) GetNamespace(arg0 context.Context, arg1 *v1.GetNamespaceRequest) (*v1.GetNamespaceResponse, error) { +func (m *MockNamespaceServiceServer) GetNamespace(arg0 context.Context, arg1 *namespaceservice.GetNamespaceRequest) (*namespaceservice.GetNamespaceResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetNamespace", arg0, arg1) - ret0, _ := ret[0].(*v1.GetNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.GetNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -245,10 +445,10 @@ func (mr *MockNamespaceServiceServerMockRecorder) GetNamespace(arg0, arg1 interf } // GetNamespaces mocks base method. -func (m *MockNamespaceServiceServer) GetNamespaces(arg0 context.Context, arg1 *v1.GetNamespacesRequest) (*v1.GetNamespacesResponse, error) { +func (m *MockNamespaceServiceServer) GetNamespaces(arg0 context.Context, arg1 *namespaceservice.GetNamespacesRequest) (*namespaceservice.GetNamespacesResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetNamespaces", arg0, arg1) - ret0, _ := ret[0].(*v1.GetNamespacesResponse) + ret0, _ := ret[0].(*namespaceservice.GetNamespacesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -259,11 +459,26 @@ func (mr *MockNamespaceServiceServerMockRecorder) GetNamespaces(arg0, arg1 inter return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNamespaces", reflect.TypeOf((*MockNamespaceServiceServer)(nil).GetNamespaces), arg0, arg1) } +// ListExportSinks mocks base method. +func (m *MockNamespaceServiceServer) ListExportSinks(arg0 context.Context, arg1 *namespaceservice.ListExportSinksRequest) (*namespaceservice.ListExportSinksResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListExportSinks", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.ListExportSinksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListExportSinks indicates an expected call of ListExportSinks. +func (mr *MockNamespaceServiceServerMockRecorder) ListExportSinks(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExportSinks", reflect.TypeOf((*MockNamespaceServiceServer)(nil).ListExportSinks), arg0, arg1) +} + // ListNamespaces mocks base method. -func (m *MockNamespaceServiceServer) ListNamespaces(arg0 context.Context, arg1 *v1.ListNamespacesRequest) (*v1.ListNamespacesResponse, error) { +func (m *MockNamespaceServiceServer) ListNamespaces(arg0 context.Context, arg1 *namespaceservice.ListNamespacesRequest) (*namespaceservice.ListNamespacesResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListNamespaces", arg0, arg1) - ret0, _ := ret[0].(*v1.ListNamespacesResponse) + ret0, _ := ret[0].(*namespaceservice.ListNamespacesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -275,10 +490,10 @@ func (mr *MockNamespaceServiceServerMockRecorder) ListNamespaces(arg0, arg1 inte } // RenameCustomSearchAttribute mocks base method. -func (m *MockNamespaceServiceServer) RenameCustomSearchAttribute(arg0 context.Context, arg1 *v1.RenameCustomSearchAttributeRequest) (*v1.RenameCustomSearchAttributeResponse, error) { +func (m *MockNamespaceServiceServer) RenameCustomSearchAttribute(arg0 context.Context, arg1 *namespaceservice.RenameCustomSearchAttributeRequest) (*namespaceservice.RenameCustomSearchAttributeResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RenameCustomSearchAttribute", arg0, arg1) - ret0, _ := ret[0].(*v1.RenameCustomSearchAttributeResponse) + ret0, _ := ret[0].(*namespaceservice.RenameCustomSearchAttributeResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -289,11 +504,26 @@ func (mr *MockNamespaceServiceServerMockRecorder) RenameCustomSearchAttribute(ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RenameCustomSearchAttribute", reflect.TypeOf((*MockNamespaceServiceServer)(nil).RenameCustomSearchAttribute), arg0, arg1) } +// UpdateExportSink mocks base method. +func (m *MockNamespaceServiceServer) UpdateExportSink(arg0 context.Context, arg1 *namespaceservice.UpdateExportSinkRequest) (*namespaceservice.UpdateExportSinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateExportSink", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.UpdateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateExportSink indicates an expected call of UpdateExportSink. +func (mr *MockNamespaceServiceServerMockRecorder) UpdateExportSink(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateExportSink", reflect.TypeOf((*MockNamespaceServiceServer)(nil).UpdateExportSink), arg0, arg1) +} + // UpdateNamespace mocks base method. -func (m *MockNamespaceServiceServer) UpdateNamespace(arg0 context.Context, arg1 *v1.UpdateNamespaceRequest) (*v1.UpdateNamespaceResponse, error) { +func (m *MockNamespaceServiceServer) UpdateNamespace(arg0 context.Context, arg1 *namespaceservice.UpdateNamespaceRequest) (*namespaceservice.UpdateNamespaceResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateNamespace", arg0, arg1) - ret0, _ := ret[0].(*v1.UpdateNamespaceResponse) + ret0, _ := ret[0].(*namespaceservice.UpdateNamespaceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -303,3 +533,18 @@ func (mr *MockNamespaceServiceServerMockRecorder) UpdateNamespace(arg0, arg1 int mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNamespace", reflect.TypeOf((*MockNamespaceServiceServer)(nil).UpdateNamespace), arg0, arg1) } + +// ValidateExportSink mocks base method. +func (m *MockNamespaceServiceServer) ValidateExportSink(arg0 context.Context, arg1 *namespaceservice.ValidateExportSinkRequest) (*namespaceservice.ValidateExportSinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidateExportSink", arg0, arg1) + ret0, _ := ret[0].(*namespaceservice.ValidateExportSinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ValidateExportSink indicates an expected call of ValidateExportSink. +func (mr *MockNamespaceServiceServerMockRecorder) ValidateExportSink(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateExportSink", reflect.TypeOf((*MockNamespaceServiceServer)(nil).ValidateExportSink), arg0, arg1) +} \ No newline at end of file diff --git a/protogen/apimock/requestservice/v1/service.pb.mock.go b/protogen/apimock/requestservice/v1/service.pb.mock.go index 4b49a606..db3a8f38 100644 --- a/protogen/apimock/requestservice/v1/service.pb.mock.go +++ b/protogen/apimock/requestservice/v1/service.pb.mock.go @@ -56,6 +56,66 @@ func (mr *MockRequestServiceClientMockRecorder) GetRequestStatus(ctx, in interfa return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatus", reflect.TypeOf((*MockRequestServiceClient)(nil).GetRequestStatus), varargs...) } +// GetRequestStatuses mocks base method. +func (m *MockRequestServiceClient) GetRequestStatuses(ctx context.Context, in *requestservice.GetRequestStatusesRequest, opts ...grpc.CallOption) (*requestservice.GetRequestStatusesResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRequestStatuses", varargs...) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatuses indicates an expected call of GetRequestStatuses. +func (mr *MockRequestServiceClientMockRecorder) GetRequestStatuses(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatuses", reflect.TypeOf((*MockRequestServiceClient)(nil).GetRequestStatuses), varargs...) +} + +// GetRequestStatusesForNamespace mocks base method. +func (m *MockRequestServiceClient) GetRequestStatusesForNamespace(ctx context.Context, in *requestservice.GetRequestStatusesForNamespaceRequest, opts ...grpc.CallOption) (*requestservice.GetRequestStatusesForNamespaceResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRequestStatusesForNamespace", varargs...) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesForNamespaceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatusesForNamespace indicates an expected call of GetRequestStatusesForNamespace. +func (mr *MockRequestServiceClientMockRecorder) GetRequestStatusesForNamespace(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatusesForNamespace", reflect.TypeOf((*MockRequestServiceClient)(nil).GetRequestStatusesForNamespace), varargs...) +} + +// GetRequestStatusesForUser mocks base method. +func (m *MockRequestServiceClient) GetRequestStatusesForUser(ctx context.Context, in *requestservice.GetRequestStatusesForUserRequest, opts ...grpc.CallOption) (*requestservice.GetRequestStatusesForUserResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRequestStatusesForUser", varargs...) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesForUserResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatusesForUser indicates an expected call of GetRequestStatusesForUser. +func (mr *MockRequestServiceClientMockRecorder) GetRequestStatusesForUser(ctx, in interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatusesForUser", reflect.TypeOf((*MockRequestServiceClient)(nil).GetRequestStatusesForUser), varargs...) +} + // MockRequestServiceServer is a mock of RequestServiceServer interface. type MockRequestServiceServer struct { ctrl *gomock.Controller @@ -93,3 +153,48 @@ func (mr *MockRequestServiceServerMockRecorder) GetRequestStatus(arg0, arg1 inte mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatus", reflect.TypeOf((*MockRequestServiceServer)(nil).GetRequestStatus), arg0, arg1) } + +// GetRequestStatuses mocks base method. +func (m *MockRequestServiceServer) GetRequestStatuses(arg0 context.Context, arg1 *requestservice.GetRequestStatusesRequest) (*requestservice.GetRequestStatusesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRequestStatuses", arg0, arg1) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatuses indicates an expected call of GetRequestStatuses. +func (mr *MockRequestServiceServerMockRecorder) GetRequestStatuses(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatuses", reflect.TypeOf((*MockRequestServiceServer)(nil).GetRequestStatuses), arg0, arg1) +} + +// GetRequestStatusesForNamespace mocks base method. +func (m *MockRequestServiceServer) GetRequestStatusesForNamespace(arg0 context.Context, arg1 *requestservice.GetRequestStatusesForNamespaceRequest) (*requestservice.GetRequestStatusesForNamespaceResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRequestStatusesForNamespace", arg0, arg1) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesForNamespaceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatusesForNamespace indicates an expected call of GetRequestStatusesForNamespace. +func (mr *MockRequestServiceServerMockRecorder) GetRequestStatusesForNamespace(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatusesForNamespace", reflect.TypeOf((*MockRequestServiceServer)(nil).GetRequestStatusesForNamespace), arg0, arg1) +} + +// GetRequestStatusesForUser mocks base method. +func (m *MockRequestServiceServer) GetRequestStatusesForUser(arg0 context.Context, arg1 *requestservice.GetRequestStatusesForUserRequest) (*requestservice.GetRequestStatusesForUserResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRequestStatusesForUser", arg0, arg1) + ret0, _ := ret[0].(*requestservice.GetRequestStatusesForUserResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRequestStatusesForUser indicates an expected call of GetRequestStatusesForUser. +func (mr *MockRequestServiceServerMockRecorder) GetRequestStatusesForUser(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRequestStatusesForUser", reflect.TypeOf((*MockRequestServiceServer)(nil).GetRequestStatusesForUser), arg0, arg1) +} diff --git a/services/loginservice.go b/services/loginservice.go index 42544b60..51606f16 100644 --- a/services/loginservice.go +++ b/services/loginservice.go @@ -1,7 +1,6 @@ package services import ( - "io/ioutil" "os" "os/exec" "runtime" @@ -41,7 +40,7 @@ func (c *loginService) OpenBrowser(url string) error { func (c *loginService) WriteToConfigFile(configPath string, data string) error { // Write file as 0600 since it contains private keys. - return ioutil.WriteFile(configPath, []byte(data), 0600) + return os.WriteFile(configPath, []byte(data), 0600) } func (c *loginService) DeleteConfigFile(configPath string) error {